![]() |
Functions | |
template<class G , class GT > | |
bool | GrAL::get_orientation (G const &g, GT &orientation) |
Determine relative orientation of cells. | |
template<class G , class C > | |
bool | GrAL::fix_orientation (G &g, C guide_cell) |
Change orientation of cells such that it is consistent. | |
template<class G > | |
bool | GrAL::fix_orientation (G &g) |
Convenience wrapper for orientation. |
bool GrAL::get_orientation | ( | G const & | g, | |
GT & | orientation | |||
) | [inline] |
Determine relative orientation of cells.
G
FacetOnCellIterator
int relative_orientation(FacetOnCellIterator f1, FacetOnCellIterator f2)
has been overloaded for G::FacetOnCellIterator
and returns the relative orientation of the facet *f1 == *f2
induced by f1
and f2
. For instance, in a 2D grid, this means that if the edge *f1
is represented with opposite vertex ordering by f1
and f2
, the result should be -1, and +1 otherwise.GF
g | input grid | |
orientation | output grid function indicating orientation changes |
g
is a manifold-with-boundary grid
orientation
is bound to g
orientation(c)
is positive if the orientation does not need to be changed, and negative otherwise. The absolute value of orientation(c)
indicates the connected component of c
.orientation
are computed on a purely combinatorial basis. If an orientation with a geometric meaning is wanted (e.g. producing outward pointing normals in the case of a manifold grid embedded in an dim(g)+1
dimensional space, one has to flip, orientations of either all cells with positive or all cells with negative flags, for each component independently.Definition at line 76 of file orientation.h.
References relative_orientation().
Referenced by GrAL::fix_orientation().
bool GrAL::fix_orientation | ( | G & | g, | |
C | guide_cell | |||
) | [inline] |
Change orientation of cells such that it is consistent.
G
FacetOnCellIterator
swap_orientation(Cell)
int relative_orientation(FacetOnCellIterator f1, FacetOnCellIterator f2)
has been overloaded for G::FacetOnCellIterator
and returns the relative orientation of the facet *f1 == *f2
induced by f1
and f2
. For instance, in a 2D grid, this means that if the edge *f1
is represented with opposite vertex ordering by f1
and f2
, the result should be -1, and +1 otherwise.
C
g | input grid, orientation of some cells will be changed on output | |
\c | guide_cell Cell with reference orientation |
g
is a manifold-with-boundary grid
c
g
g
is oriented consistent with guide_cell
, such that a call to get_orientation(g, orient)
will yield orientation(c) == 1
for each cell c
of g
.Definition at line 154 of file orientation.h.
References GrAL::get_orientation().
Referenced by GrAL::fix_orientation().
bool GrAL::fix_orientation | ( | G & | g | ) | [inline] |
Convenience wrapper for orientation.
Equivalent to fix_orientation(g, * g.FirstCell())
Definition at line 173 of file orientation.h.
References GrAL::fix_orientation().