ug4
|
Faces are 2-dimensional objects. More...
#include <grid_base_objects.h>
Public Types | |
typedef Face | grid_base_object |
typedef Volume | higher_dim_base_object |
typedef Edge | lower_dim_base_object |
typedef Edge | side |
typedef Volume | sideof |
Public Types inherited from ug::IVertexGroup | |
typedef Vertex *const * | ConstVertexArray |
Public Member Functions | |
virtual int | base_object_id () const |
virtual bool | collapse_edge (std::vector< Face * > &vNewFacesOut, int edgeIndex, Vertex *newVertex, Vertex **pSubstituteVertices=NULL) |
virtual bool | collapse_edges (std::vector< Face * > &vNewFacesOut, std::vector< Vertex * > &vNewEdgeVertices, Vertex **pSubstituteVertices=NULL) |
virtual int | container_section () const |
virtual Edge * | create_edge (int index) |
create the edge with index i and return it. More... | |
virtual void | create_faces_by_edge_split (int splitEdgeIndex, Vertex *newVertex, std::vector< Face * > &vNewFacesOut, Vertex **pSubstituteVertices=NULL) |
virtual EdgeDescriptor | edge_desc (int index) const |
returns the i-th edge of the face. More... | |
virtual void | edge_desc (int index, EdgeDescriptor &edOut) const |
returns the i-th edge of the face. More... | |
int | get_local_side_index (EdgeVertices *e) const |
returns the local index of the specified edge. More... | |
virtual std::pair< GridBaseObjectId, int > | get_opposing_object (Vertex *vrt) const |
returns an index to the obbject, which lies on the opposite side of the face to the given vertex. More... | |
virtual bool | get_opposing_side (EdgeVertices *e, EdgeDescriptor &edOut) const |
retrieves the edge-descriptor for the opposing side to the specified one. More... | |
virtual bool | is_regular_ref_rule (int edgeMarks) const |
returns true if the specified edgeMarks would lead to a regular refinement More... | |
uint | num_edges () const |
uint | num_sides () const |
virtual ReferenceObjectID | reference_object_id () const |
virtual bool | refine (std::vector< Face * > &vNewFacesOut, Vertex **newFaceVertexOut, Vertex **newEdgeVertices, Vertex *newFaceVertex=NULL, Vertex **pSubstituteVertices=NULL, int snapPointIndex=-1) |
virtual | ~Face () |
Public Member Functions inherited from ug::GridObject | |
virtual GridObject * | create_empty_instance () const |
create an instance of the derived type More... | |
uint | grid_data_index () const |
Returns the grid attachment data index of a geometric object. More... | |
virtual bool | is_constrained () const |
returns true if the object is constrained by other objects. More... | |
virtual bool | is_constraining () const |
returns the id of the reference-object. More... | |
virtual | ~GridObject () |
virtual void | remove_constraint_link (const Vertex *vrt) |
removes a constraint link to the grid object. More... | |
virtual void | remove_constraint_link (const Edge *e) |
removes a constraint link to the grid object. More... | |
virtual void | remove_constraint_link (const Face *f) |
removes a constraint link to the grid object. More... | |
Public Member Functions inherited from ug::FaceVertices | |
virtual size_t | num_vertices () const |
Vertex * | operator[] (size_t index) const |
returns the i-th vertex. More... | |
size_t | size () const |
returns the number of vertices. More... | |
virtual Vertex * | vertex (size_t index) const |
virtual ConstVertexArray | vertices () const |
virtual | ~FaceVertices () |
Public Member Functions inherited from ug::IVertexGroup | |
Vertex * | operator[] (size_t index) const |
returns the i-th vertex. More... | |
size_t | size () const |
returns the number of vertices. More... | |
virtual | ~IVertexGroup () |
Static Public Member Functions | |
static bool | type_match (GridObject *pObj) |
Static Public Attributes | |
static const int | BASE_OBJECT_ID = FACE |
static const bool | CAN_BE_SIDE = true |
static const int | dim = 2 |
reference dimension More... | |
static const bool | HAS_SIDES = true |
Protected Member Functions | |
virtual void | set_vertex (uint index, Vertex *pVrt) |
Protected Member Functions inherited from ug::GridObject | |
void | set_grid_data_index (uint index) |
ATTENTION: Use this method with extreme care! More... | |
Friends | |
class | Grid |
Additional Inherited Members | |
Protected Attributes inherited from ug::GridObject | |
uint | m_gridDataIndex |
Faces are 2-dimensional objects.
Base class for all 2-dimensional objects. Faces connect three or more vertices. A face should always be flat (if viewed in 3 dimensions). You can not create an instance of Face. grids are constructed from derivatives of face. The vertices of a face have always to be specified in counterclockwise order!
typedef Face ug::Face::grid_base_object |
typedef Edge ug::Face::lower_dim_base_object |
typedef Edge ug::Face::side |
typedef Volume ug::Face::sideof |
|
inlinevirtual |
|
inlinevirtual |
Implements ug::GridObject.
References ug::FACE.
|
inlinevirtual |
The collapse_edge method creates new geometric objects by collapsing the specified edge. The user that calls this function is responsible to either register the new faces with a grid (the grid from which the vertices are), or to take responsibility for deletion of the acquired memory (delete each element in vNewFacesOut).
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
Referenced by ug::CollapseEdge().
|
inlinevirtual |
The collapse_edgea method creates new geometric objects by collapsing the specified edges simultaneously. This method makes sense only for faces with more than 4 edges. The user that calls this function is responsible to either register the new faces with a grid (the grid from which the vertices are), or to take responsibility for deletion of the acquired memory (delete each element in vNewFacesOut).
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
|
inlinevirtual |
Implements ug::GridObject.
Reimplemented in ug::ConstrainingQuadrilateral, ug::ConstrainingTriangle, ug::ConstrainedQuadrilateral, ug::ConstrainedTriangle, ug::Quadrilateral, and ug::Triangle.
Referenced by ug::Selector::add_to_list(), ug::MGSelector::add_to_list(), ug::Grid::erase(), ug::Selector::erase_from_list(), ug::MGSelector::erase_from_list(), ug::Grid::register_and_replace_element(), ug::Grid::register_face(), ug::Grid::replace_vertex(), and ug::Grid::unregister_face().
|
inlinevirtual |
create the edge with index i and return it.
A default implementation is featured to allow empty instances of this class. This is required to allow the use of this class for compile-time method selection by dummy-parameters. It is cruical that derived classes overload this method.
Reimplemented in ug::ConstrainingQuadrilateral, ug::ConstrainingTriangle, ug::ConstrainedQuadrilateral, ug::ConstrainedTriangle, ug::Quadrilateral, and ug::Triangle.
Referenced by ug::Grid::face_autogenerate_edges(), and ug::Grid::register_face().
|
inlinevirtual |
creates the faces that result from the splitting of the edge with index 'splitEdgeIndex'. The user that calls this function is responsible to either register those faces with the same grid in which 'this' was registered, or to take over responsibility for deletion of the acquired memory. With pvSubstituteVertices you can optionally pass a vector of vertices, which will be used instead of the original vertices of this face. If specified, pvSubstituteVertices has to contain exactly as many vertices as the face itself.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
Referenced by ug::CreateEdgeSplitGeometry().
|
inlinevirtual |
returns the i-th edge of the face.
This default implementation is reimplemented by derived classes for optimal speed.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
Referenced by ug::FracturedMediaRefiner< TGrid, TAPosition >::aspect_ratio(), ug::CalculateBoundaryVertexNormal2D(), ug::CalculateOuterNormal(), ug::ComputeOrientationOffsetLagrange(), ug::Grid::face_autogenerate_edges(), ug::FaceContains(), ug::FixFaceOrientation(), ug::Grid::flip_orientation(), ug::Grid::get_edge(), get_local_side_index(), ug::GetConnectedEdge(), ug::GetEdgeIndex(), ug::InsertCenterVertex(), ug::Grid::register_edge(), ug::Grid::register_face(), ug::Grid::replace_vertex(), and ug::ResolveVertexFaceIntersection().
|
inlinevirtual |
returns the i-th edge of the face.
This default implementation is reimplemented by derived classes for optimal speed.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
References ug::EdgeDescriptor::set_vertices().
int ug::Face::get_local_side_index | ( | EdgeVertices * | e | ) | const |
returns the local index of the specified edge.
If the edge is not part of the face, then -1 is returned.
References ug::CompareVertices(), edge_desc(), and num_sides().
|
inlinevirtual |
returns an index to the obbject, which lies on the opposite side of the face to the given vertex.
The method returs a pair <GridBaseObjectId, int>, where GridBaseObjectId is either VERTEX or EDGE and where the second entry specifies the local index of the object in the given face.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
References UG_THROW.
Referenced by ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), and ug::Grid::get_opposing_object().
|
inlinevirtual |
retrieves the edge-descriptor for the opposing side to the specified one.
If no opposing side exists false is returned. If an opposing side exists, the method returns true and fills the specified descriptor.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, and ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >.
Referenced by ug::GetOpposingSide().
|
inlinevirtual |
returns true if the specified edgeMarks would lead to a regular refinement
A regular refinement leads to new elements which are all similar to the original element. I.e. which are of the same type and which have similar angles.
edgeMarks | If the i-th edge shall be refined, the expression 'edgeMarks & (1<<i) != 0' has to be true. You can specify multiple refine-edges using or-combinations: 'edgeMarks = (1<<i) | (1<<j)' would indicate that the i-th and the j-th edge shall be refined. |
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
|
inline |
References boost::num_vertices().
Referenced by ug::FracturedMediaRefiner< TGrid, TAPosition >::aspect_ratio(), ug::CollapseEdge(), ug::CollectEdges(), ug::CollectEdgesSorted(), ug::Grid::edge_store_associated_faces(), ug::ExpandFractures2d(), ug::ExpandFractures2dArte(), ug::ExportGridToUG_2D(), ug::Grid::face_autogenerate_edges(), ug::Grid::face_store_associated_edges(), ug::FaceContains(), ug::FixFaceOrientation(), ug::Grid::flip_orientation(), ug::Grid::get_associated_sorted(), ug::IRefiner::get_local_face_mark(), ug::GetConnectedEdge(), ug::GetEdgeIndex(), ug::InsertCenterVertex(), ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::QualityGridGeneration(), ug::LocalMarkAdjuster::ref_marks_changed(), ug::Refine(), ug::HangingNodeRefinerBase< TSelector >::refine_face_with_hanging_vertex(), ug::HangingNodeRefinerBase< TSelector >::refine_face_with_normal_vertex(), ug::Grid::register_edge(), ug::Grid::register_face(), ug::Grid::replace_vertex(), ug::ResolveVertexFaceIntersection(), ug::TryCollapse(), and ug::Grid::unregister_face().
|
inline |
|
inlinevirtual |
A reference object represents a class of geometric objects. Tetrahedrons, Triangles etc are such classes. Reference ids should be defined in the file in which concrete geometric objects are defined.
Implements ug::GridObject.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
References ug::ROID_UNKNOWN.
Referenced by ug::CalculateAspectRatio(), ug::CalculateNumManifoldFacesVertexAttachmentInTopLevel(), ug::CalculateSmoothManifoldPosInTopLevelAveragingScheme(), and ug::HangingNodeRefiner_MultiGrid::perform_coarsening().
|
inlinevirtual |
The refine method can be used to create new elements by inserting new vertices on the face. The user that calls this function is responsible to either register the new faces with a grid (the grid from which the vertices are), or to take responsibility for deletion of the acquired memory (delete each element in vNewFacesOut).
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
Referenced by ug::AdaptiveRegularRefiner_MultiGrid::create_closure_elements_2d(), ug::AdaptiveRegularRefiner_MultiGrid::create_closure_elements_3d(), ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::Refine(), ug::HangingNodeRefinerBase< TSelector >::refine_face_with_normal_vertex(), ug::ResolveEdgeFaceIntersection(), and ug::ResolveVertexFaceIntersection().
creates the faces that result from the collapsing of the edge with index 'splitEdgeIndex'.
Reimplemented in ug::CustomQuadrilateral< ConstrainedQuadrilateral, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomQuadrilateral< Quadrilateral, Face, Triangle, Quadrilateral >, ug::CustomQuadrilateral< ConstrainingQuadrilateral, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, ug::CustomTriangle< ConstrainedTriangle, ConstrainedFace, ConstrainedTriangle, ConstrainedQuadrilateral >, ug::CustomTriangle< ConstrainingTriangle, ConstrainingFace, ConstrainingTriangle, ConstrainingQuadrilateral >, and ug::CustomTriangle< Triangle, Face, Triangle, Quadrilateral >.
References UG_ASSERT.
Referenced by ug::Grid::create_by_cloning(), ug::Grid::flip_orientation(), ug::Grid::register_and_replace_element(), and ug::Grid::replace_vertex().
|
inlinestatic |
|
friend |
|
static |
|
static |
|
static |
reference dimension
|
static |