ug4
|
Volumes are 3-dimensional objects. More...
#include <grid_base_objects.h>
Public Types | |
typedef Volume | grid_base_object |
typedef void | higher_dim_base_object |
typedef Face | lower_dim_base_object |
typedef Face | 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< Volume * > &vNewVolumesOut, int edgeIndex, Vertex *newVertex, std::vector< Vertex * > *pvSubstituteVertices=NULL) |
virtual int | container_section () const |
virtual Edge * | create_edge (int index) |
create the edge with index i and return it. More... | |
virtual Face * | create_face (int index) |
create the face with index i and return it. More... | |
virtual EdgeDescriptor | edge_desc (int index) const |
virtual void | edge_desc (int index, EdgeDescriptor &edOut) const |
virtual FaceDescriptor | face_desc (int index) const |
virtual void | face_desc (int index, FaceDescriptor &fdOut) const |
virtual int | get_edge_index_from_vertices (const size_t vi0, const size_t vi1) const |
returns the local index of the edge which connects the two vertex indices. More... | |
virtual int | get_face_edge_index (const size_t faceInd, const size_t faceEdgeInd) const |
returns the local index of the j-th edge of the i-th face of the volume More... | |
virtual void | get_flipped_orientation (VolumeDescriptor &vdOut) const |
int | get_local_side_index (FaceVertices *f) const |
returns the local index of the given face or -1, if the face is not part of the volume. 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 volume to the given vertex. More... | |
virtual bool | get_opposing_side (FaceVertices *f, FaceDescriptor &fdOut) const |
retrieves the face-descriptor for the opposing side to the specified one. More... | |
virtual void | get_vertex_indices_of_edge (size_t &ind1Out, size_t &ind2Out, size_t edgeInd) const |
returns the local indices of an edge of the volume. More... | |
virtual void | get_vertex_indices_of_face (std::vector< size_t > &indsOut, size_t side) const |
returns the local indices of a face of the volume. More... | |
virtual bool | is_regular_ref_rule (int edgeMarks) const |
returns true if the specified edgeMarks would lead to a regular refinement More... | |
virtual uint | num_edges () const |
virtual uint | num_faces () const |
uint | num_sides () const |
virtual ReferenceObjectID | reference_object_id () const |
virtual bool | refine (std::vector< Volume * > &vNewVolumesOut, Vertex **ppNewVertexOut, Vertex **newEdgeVertices, Vertex **newFaceVertices, Vertex *newVolumeVertex, const Vertex &prototypeVertex, Vertex **pSubstituteVertices=NULL, vector3 *corners=NULL, bool *isSnapPoint=NULL) |
virtual | ~Volume () |
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::VolumeVertices | |
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 | ~VolumeVertices () |
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 = VOLUME |
static const bool | CAN_BE_SIDE = false |
static const int | dim = 3 |
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 |
Volumes are 3-dimensional objects.
Base class for all 3-dimensional objects. Volumes connect four or more vertices.
default implementations of all methods are 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 those methods.
typedef Volume ug::Volume::grid_base_object |
typedef void ug::Volume::higher_dim_base_object |
typedef Face ug::Volume::side |
typedef Volume ug::Volume::sideof |
|
inlinevirtual |
|
inlinevirtual |
Implements ug::GridObject.
References ug::VOLUME.
|
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 volumes 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::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::CollapseEdge().
|
inlinevirtual |
Implements ug::GridObject.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
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_volume(), ug::Grid::replace_vertex(), and ug::Grid::unregister_volume().
|
inlinevirtual |
create the edge with index i and return it.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::Grid::register_volume(), and ug::Grid::volume_autogenerate_edges().
|
inlinevirtual |
create the face with index i and return it.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::Grid::register_volume(), and ug::Grid::volume_autogenerate_faces().
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::grid_unit_tests::CheckAssociatedEdgesOfVolumes(), ug::ComputeOrientationOffsetLagrange(), ug::ContainsPoint(), ug::Grid::edge_store_associated_volumes(), ug::Grid::flip_orientation(), ug::Grid::get_edge(), ug::GetEdgeIndex(), ug::GetMaxEdgeLength(), ug::Grid::register_edge(), ug::Grid::register_volume(), ug::Grid::replace_vertex(), ug::Grid::volume_autogenerate_edges(), ug::Grid::volume_sort_associated_edge_container(), and ug::VolumeContains().
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::CalculateBoundaryVertexNormal3D(), ug::CalculateCreaseNormal(), ug::CalculateOuterNormal(), ug::CheckOrientation(), ug::ComputeOrientationOffsetLagrange(), ug::ContainsPoint(), ug::Grid::flip_orientation(), ug::Grid::get_face(), get_local_side_index(), ug::GetFaceIndex(), ug::GetNeighbours(), ug::GetRightLeftUnitIndex(), ug::InsertCenterVertex(), ug::OrientationMatches(), ug::Grid::register_volume(), ug::Grid::replace_vertex(), ug::Grid::volume_autogenerate_faces(), ug::Grid::volume_store_associated_faces(), and ug::VolumeContains().
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
|
inlinevirtual |
returns the local index of the edge which connects the two vertex indices.
Default implementation throws a UGError
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References UG_THROW.
Referenced by ug::HangingNodeRefinerBase< TSelector >::assign_hnode_marks(), and ug::IRefiner::get_local_face_mark().
|
inlinevirtual |
returns the local index of the j-th edge of the i-th face of the volume
Default implementation throws a UGError
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References UG_THROW.
|
virtual |
Writes vertices to the volume-descriptor so that it defines a volume with flipped orientation. If you want to flip the orientation of a volume in a grid, please consider using the grids flip_orientation method.
Please note: The default implementation returns the original volume and has to be reimplemented by derived classes.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::Grid::flip_orientation().
int ug::Volume::get_local_side_index | ( | FaceVertices * | f | ) | const |
returns the local index of the given face or -1, if the face is not part of the volume.
References ug::CompareVertices(), face_desc(), and num_sides().
|
inlinevirtual |
returns an index to the obbject, which lies on the opposite side of the volume to the given vertex.
The method returs a pair <GridBaseObjectId, int>, where GridBaseObjectId is either VERTEX, EDGE, or FACE and where the second entry specifies the local index of the object in the given volume.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References UG_THROW.
Referenced by ug::CalculateConstrainedSmoothVolumePosInTopLevel(), ug::CalculateSmoothVolumePosInTopLevel(), and ug::Grid::get_opposing_object().
|
inlinevirtual |
retrieves the face-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::Prism, and ug::Hexahedron.
Referenced by ug::GetOpposingSide().
|
inlinevirtual |
returns the local indices of an edge of the volume.
Default implementation throws a UGError
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References UG_THROW.
Referenced by ug::ArteExpandFracs3D::createNewElements(), and ug::ExpandFractures3d().
|
inlinevirtual |
returns the local indices of a face of the volume.
Default implementation throws a UGError
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References UG_THROW.
Referenced by ug::ArteExpandFracs3D::createNewElements(), and ug::ExpandFractures3d().
|
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::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::CalculateAngles(), ug::CalculateMaxDihedral(), ug::CalculateMinDihedral(), ug::grid_unit_tests::CheckAssociatedEdgesOfVolumes(), ug::CollectEdges(), ug::CollectEdgesSorted(), ug::CreateEdgeSplitGeometry(), ug::ArteExpandFracs3D::createNewElements(), ug::Grid::edge_store_associated_volumes(), ug::ExpandFractures3d(), ug::Grid::flip_orientation(), ug::Grid::get_associated_sorted(), ug::GetEdgeIndex(), ug::GetMaxEdgeLength(), ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::LocalMarkAdjuster::ref_marks_changed(), ug::Refine(), ug::HangingNodeRefinerBase< TSelector >::refine_volume_with_normal_vertex(), ug::Grid::register_edge(), ug::Grid::register_volume(), ug::Grid::replace_vertex(), ug::Grid::unregister_volume(), ug::Grid::volume_autogenerate_edges(), ug::Grid::volume_sort_associated_edge_container(), ug::Grid::volume_store_associated_edges(), and ug::VolumeContains().
|
inlinevirtual |
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::AssignRegionToSubset(), ug::CheckOrientation(), ug::CollectFaces(), ug::CollectFacesSorted(), ug::ContainsPoint(), ug::ArteExpandFracs3D::countAndSelectFracBaseNums(), ug::ArteExpandFracs3D::createNewElements(), ug::ExpandFractures3d(), ug::Grid::face_store_associated_volumes(), ug::Grid::flip_orientation(), ug::GetFaceIndex(), ug::GetRightLeftUnitIndex(), ug::InsertCenterVertex(), ug::OrientationMatches(), ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::Refine(), ug::HangingNodeRefinerBase< TSelector >::refine_volume_with_normal_vertex(), ug::Grid::register_volume(), ug::Grid::replace_vertex(), ug::Grid::unregister_volume(), ug::Grid::volume_autogenerate_faces(), ug::Grid::volume_store_associated_faces(), and ug::VolumeContains().
|
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::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
References ug::ROID_UNKNOWN.
Referenced by ug::CalculateAspectRatio(), ug::CalculateConstrainedSmoothVolumePosInTopLevel(), ug::CalculateNumElemsVertexAttachmentInTopLevel(), ug::CalculateSmoothVolumePosInTopLevel(), ug::CalculateVolToRMSFaceAreaRatio(), ug::CalculateVolume(), ug::ConvertToTetrahedra(), and ug::GlobalMultiGridRefiner::perform_refinement().
|
inlinevirtual |
The refine method can be used to create new elements by inserting new vertices on the volume.
New volumes will be returned in vNewFacesOut. If a new vertex has to be created from the prototypeVertex (this happens in more complicated situations) the pointer to the new vertex is returned in ppNewVertexOut. ppNewVertexOut contains NULL if no new vertex has been created.
The user that calls this function is responsible to either register the new volumes and the new vertex with a grid (the grid from which the referenced vertices are), or to take responsibility for deletion of the acquired memory (delete each element in vNewVolumesOut and ppNewVertexOut - if it is not NULL).
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
Referenced by ug::AdaptiveRegularRefiner_MultiGrid::create_closure_elements_3d(), ug::CreateEdgeSplitGeometry(), ug::GlobalFracturedMediaRefiner::perform_refinement(), ug::GlobalMultiGridRefiner::perform_refinement(), ug::Refine(), and ug::HangingNodeRefinerBase< TSelector >::refine_volume_with_normal_vertex().
creates the volumes that result from the splitting of the edge with index 'splitEdgeIndex'. creates the volumes that result from the collapsing of the edge with index 'splitEdgeIndex'.
Reimplemented in ug::Octahedron, ug::Pyramid, ug::Prism, ug::Hexahedron, and ug::Tetrahedron.
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 |