RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::Region< DIMENSION > Class Template Referencefinal

A GeoModelEntity of type REGION. More...

#include <geomodel_mesh_entity.h>

Inheritance diagram for RINGMesh::Region< DIMENSION >:
RINGMesh::GeoModelMeshEntity< DIMENSION > RINGMesh::GeoModelEntity< DIMENSION >

Public Member Functions

virtual ~Region ()
 
MeshEntityType type_name () const final
 
bool is_on_voi () const final
 
const Surface< DIMENSION > & boundary (index_t x) const
 
bool is_connectivity_valid () const final
 
bool is_meshed () const
 
bool is_simplicial () const
 
const VolumeAABBTree< DIMENSION > & cell_aabb () const
 
const NNSearch< DIMENSION > & cell_nn_search () const
 Return the NNSearch for the cells of the region. More...
 
GEO::AttributesManager & cell_attribute_manager () const
 
const VolumeMesh< DIMENSION > & mesh () const
 Get the low level mesh data structure. More...
 
Accessors to Region cells, facets, edges and vertices
index_t nb_mesh_elements () const final
 
index_t nb_mesh_element_vertices (index_t cell_index) const final
 
index_t mesh_element_vertex_index (const ElementLocalVertex &element_local_vertex) const final
 Index of a vertex in the Region from its index in a cell. More...
 
CellType cell_type (index_t cell_index) const
 
index_t nb_cell_edges (index_t cell_index) const
 
index_t nb_cell_facets (index_t cell_index) const
 
index_t nb_cell_facet_vertices (index_t cell_index, index_t facet_index) const
 
index_t cell_edge_vertex_index (index_t cell_index, index_t edge_index, index_t vertex_index) const
 
index_t cell_facet_vertex_index (index_t cell_index, index_t facet_index, index_t vertex_index) const
 
index_t cell_adjacent_index (index_t cell_index, index_t facet_index) const
 
ElementLocalVertex find_cell_from_colocated_vertex_if_any (const vecn< DIMENSION > &vertex_vec) const
 
Geometrical request on Region Entity
double mesh_element_size (index_t cell_index) const final
 Volume of a cell. More...
 
double size () const final
 Compute the volume of the Region. More...
 
vecn< DIMENSION > mesh_element_barycenter (index_t cell_index) const final
 Get the center of the cell. More...
 
std::vector< index_t > cells_around_vertex (index_t vertex_id, index_t cell_hint) const
 
bool side (index_t i) const
 
- Public Member Functions inherited from RINGMesh::GeoModelMeshEntity< DIMENSION >
virtual ~GeoModelMeshEntity ()
 
gmme_id gmme () const
 
MeshEntityType mesh_entity_type () const
 
bool is_valid () const final
 Global validity of the entity. More...
 
bool is_parent_connectivity_valid () const
 
void save (const std::string &filename) const
 
const NNSearch< DIMENSION > & vertex_nn_search () const
 Return the NNSearch for the Entity vertices. More...
 
GEO::AttributesManager & vertex_attribute_manager () const
 
index_t nb_boundaries () const
 
const gmme_idboundary_gmme (index_t x) const
 
const GeoModelMeshEntity< DIMENSION > & boundary (index_t x) const
 
index_t nb_incident_entities () const
 
const gmme_idincident_entity_gmme (index_t x) const
 
const GeoModelMeshEntity< DIMENSION > & incident_entity (index_t x) const
 
bool has_inside_border () const
 Check if one entity is twice in the boundary. More...
 
bool is_inside_border (const GeoModelMeshEntity &rhs) const
 Check if this entity is an inside border of rhs. More...
 
bool has_parent () const
 
bool has_parent (const GeologicalEntityType &parent_type) const
 Check if the entity has a parent of the given type. More...
 
index_t nb_parents () const
 
const gmge_idparent_gmge (index_t id) const
 
const gmge_id parent_gmge (const GeologicalEntityType &parent_type) const
 Returns the gmge_id of the parent of the given type. More...
 
const GeoModelGeologicalEntity< DIMENSION > & parent (index_t parent_index) const
 
const GeoModelGeologicalEntity< DIMENSION > & parent (const GeologicalEntityType &parent_type) const
 
index_t nb_vertices () const
 
const vecn< DIMENSION > & vertex (index_t vertex_index) const
 Coordinates of the vertex_index. More...
 
const vecn< DIMENSION > & mesh_element_vertex (const ElementLocalVertex &element_local_vertex) const
 Coordinates of a vertex of a mesh element. More...
 
vecn< DIMENSION > entity_barycenter () const
 
- Public Member Functions inherited from RINGMesh::GeoModelEntity< DIMENSION >
virtual ~GeoModelEntity ()=default
 
const GeoModel< DIMENSION > & geomodel () const
 
const std::string & name () const
 
index_t index () const
 

Static Public Member Functions

static MeshEntityType type_name_static ()
 

Protected Attributes

std::vector< boolsides_ {}
 
- Protected Attributes inherited from RINGMesh::GeoModelMeshEntity< DIMENSION >
std::vector< index_t > boundaries_ {}
 Boundary relations of this entity. More...
 
std::vector< index_t > incident_entities_ {}
 Incident-entity relations of this entity. More...
 
std::vector< index_t > parents_ {}
 Parents relations of this entity. More...
 
- Protected Attributes inherited from RINGMesh::GeoModelEntity< DIMENSION >
const GeoModel< DIMENSION > & geomodel_
 Reference to the GeoModel owning this entity. More...
 
std::string name_ = std::string{ "Unnamed" }
 Name of the entity - default is "Unnamed". More...
 
index_t id_ { NO_ID }
 Index of the entity. More...
 

Private Member Functions

 ringmesh_disable_copy_and_move (Region)
 
 ringmesh_template_assert_3d (DIMENSION)
 
 Region (const GeoModel< DIMENSION > &geomodel, index_t id, const MeshType type)
 
bool is_mesh_valid () const final
 
void update_mesh_storage_type (std::unique_ptr< VolumeMesh< DIMENSION > > mesh)
 
void change_mesh_data_structure (const MeshType &type) final
 
void copy_mesh_entity (const GeoModelMeshEntity< DIMENSION > &from) final
 

Private Attributes

std::shared_ptr< VolumeMesh< DIMENSION > > volume_mesh_ {}
 

Friends

class GeoModelMeshEntityAccess< DIMENSION >
 

Additional Inherited Members

- Protected Member Functions inherited from RINGMesh::GeoModelMeshEntity< DIMENSION >
 GeoModelMeshEntity (const GeoModel< DIMENSION > &geomodel, index_t id)
 
virtual bool is_index_valid () const final
 
void set_mesh (std::shared_ptr< MeshBase< DIMENSION > > mesh)
 
bool is_boundary_connectivity_valid () const
 
bool is_incident_entity_connectivity_valid () const
 
bool are_geomodel_vertex_indices_valid () const
 Check that geomodel vertex indices are consistent with what is stored at the GeoModel level. More...
 
void unbind_vertex_mapping_attribute () const
 
void bind_vertex_mapping_attribute () const
 
- Protected Member Functions inherited from RINGMesh::GeoModelEntity< DIMENSION >
 GeoModelEntity (const GeoModel< DIMENSION > &geomodel, index_t id)
 
void copy_name (const GeoModelEntity< DIMENSION > &from)
 

Detailed Description

template<index_t DIMENSION>
class RINGMesh::Region< DIMENSION >

A GeoModelEntity of type REGION.

A Region a volumetric connected component of the geomodel defined by a set of surfaces. The Region can be only defined by its boundary Surfaces. Its volumetric mesh is optional.

Definition at line 930 of file geomodel_mesh_entity.h.

Constructor & Destructor Documentation

◆ ~Region()

template<index_t DIMENSION>
virtual RINGMesh::Region< DIMENSION >::~Region ( )
inlinevirtual

Definition at line 938 of file geomodel_mesh_entity.h.

◆ Region()

template<index_t DIMENSION>
RINGMesh::Region< DIMENSION >::Region ( const GeoModel< DIMENSION > &  geomodel,
index_t  id,
const MeshType  type 
)
inlineprivate

Definition at line 1218 of file geomodel_mesh_entity.h.

Member Function Documentation

◆ boundary()

template<index_t DIMENSION>
const Surface< DIMENSION > & RINGMesh::Region< DIMENSION >::boundary ( index_t  x) const

Definition at line 831 of file geomodel_mesh_entity.cpp.

◆ cell_aabb()

template<index_t DIMENSION>
const VolumeAABBTree< DIMENSION >& RINGMesh::Region< DIMENSION >::cell_aabb ( ) const
inline

Definition at line 969 of file geomodel_mesh_entity.h.

◆ cell_adjacent_index()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::cell_adjacent_index ( index_t  cell_index,
index_t  facet_index 
) const
inline

Definition at line 1118 of file geomodel_mesh_entity.h.

◆ cell_attribute_manager()

template<index_t DIMENSION>
GEO::AttributesManager& RINGMesh::Region< DIMENSION >::cell_attribute_manager ( ) const
inline

Definition at line 983 of file geomodel_mesh_entity.h.

◆ cell_edge_vertex_index()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::cell_edge_vertex_index ( index_t  cell_index,
index_t  edge_index,
index_t  vertex_index 
) const
inline

Definition at line 1085 of file geomodel_mesh_entity.h.

◆ cell_facet_vertex_index()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::cell_facet_vertex_index ( index_t  cell_index,
index_t  facet_index,
index_t  vertex_index 
) const
inline

Definition at line 1101 of file geomodel_mesh_entity.h.

◆ cell_nn_search()

template<index_t DIMENSION>
const NNSearch< DIMENSION >& RINGMesh::Region< DIMENSION >::cell_nn_search ( ) const
inline

Return the NNSearch for the cells of the region.

The barycenter of the cells is used.

Definition at line 978 of file geomodel_mesh_entity.h.

◆ cell_type()

template<index_t DIMENSION>
CellType RINGMesh::Region< DIMENSION >::cell_type ( index_t  cell_index) const
inline

Get the type of a given cell.

Precondition
The Region must be meshed

Definition at line 1038 of file geomodel_mesh_entity.h.

◆ cells_around_vertex()

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::Region< DIMENSION >::cells_around_vertex ( index_t  vertex_id,
index_t  cell_hint 
) const
inline

Definition at line 1197 of file geomodel_mesh_entity.h.

◆ change_mesh_data_structure()

template<index_t DIMENSION>
void RINGMesh::Region< DIMENSION >::change_mesh_data_structure ( const MeshType type)
finalprivatevirtual

◆ copy_mesh_entity()

template<index_t DIMENSION>
void RINGMesh::Region< DIMENSION >::copy_mesh_entity ( const GeoModelMeshEntity< DIMENSION > &  from)
inlinefinalprivatevirtual

Reimplemented from RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1238 of file geomodel_mesh_entity.h.

◆ find_cell_from_colocated_vertex_if_any()

template<index_t DIMENSION>
ElementLocalVertex RINGMesh::Region< DIMENSION >::find_cell_from_colocated_vertex_if_any ( const vecn< DIMENSION > &  vertex_vec) const

Definition at line 951 of file geomodel_mesh_entity.cpp.

◆ is_connectivity_valid()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::is_connectivity_valid ( ) const
finalvirtual

Check that required information for the TYPE is defined and that reverse information is stored by the corresponding entities

Reimplemented from RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 844 of file geomodel_mesh_entity.cpp.

◆ is_mesh_valid()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::is_mesh_valid ( ) const
finalprivatevirtual

Reimplemented from RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 864 of file geomodel_mesh_entity.cpp.

◆ is_meshed()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::is_meshed ( ) const
inline

Definition at line 959 of file geomodel_mesh_entity.h.

◆ is_on_voi()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::is_on_voi ( ) const
finalvirtual

Implements RINGMesh::GeoModelEntity< DIMENSION >.

Definition at line 838 of file geomodel_mesh_entity.cpp.

◆ is_simplicial()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::is_simplicial ( ) const
inline

Definition at line 964 of file geomodel_mesh_entity.h.

◆ mesh()

template<index_t DIMENSION>
const VolumeMesh< DIMENSION >& RINGMesh::Region< DIMENSION >::mesh ( ) const
inline

Get the low level mesh data structure.

Definition at line 1212 of file geomodel_mesh_entity.h.

◆ mesh_element_barycenter()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::Region< DIMENSION >::mesh_element_barycenter ( index_t  cell_index) const
inlinefinalvirtual

Get the center of the cell.

Parameters
cell_index

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1185 of file geomodel_mesh_entity.h.

◆ mesh_element_size()

template<index_t DIMENSION>
double RINGMesh::Region< DIMENSION >::mesh_element_size ( index_t  cell_index) const
inlinefinalvirtual

Volume of a cell.

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1143 of file geomodel_mesh_entity.h.

◆ mesh_element_vertex_index()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::mesh_element_vertex_index ( const ElementLocalVertex element_local_vertex) const
inlinefinalvirtual

Index of a vertex in the Region from its index in a cell.

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1018 of file geomodel_mesh_entity.h.

◆ nb_cell_edges()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::nb_cell_edges ( index_t  cell_index) const
inline

Definition at line 1049 of file geomodel_mesh_entity.h.

◆ nb_cell_facet_vertices()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::nb_cell_facet_vertices ( index_t  cell_index,
index_t  facet_index 
) const
inline

Definition at line 1071 of file geomodel_mesh_entity.h.

◆ nb_cell_facets()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::nb_cell_facets ( index_t  cell_index) const
inline

Definition at line 1060 of file geomodel_mesh_entity.h.

◆ nb_mesh_element_vertices()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::nb_mesh_element_vertices ( index_t  cell_index) const
inlinefinalvirtual

Get the number of vertex in the cell

Parameters
cell_indexof the Region.

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1004 of file geomodel_mesh_entity.h.

◆ nb_mesh_elements()

template<index_t DIMENSION>
index_t RINGMesh::Region< DIMENSION >::nb_mesh_elements ( ) const
inlinefinalvirtual

Get the number of cells of the Region.

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 996 of file geomodel_mesh_entity.h.

◆ ringmesh_disable_copy_and_move()

template<index_t DIMENSION>
RINGMesh::Region< DIMENSION >::ringmesh_disable_copy_and_move ( Region< DIMENSION >  )
private

◆ ringmesh_template_assert_3d()

template<index_t DIMENSION>
RINGMesh::Region< DIMENSION >::ringmesh_template_assert_3d ( DIMENSION  )
private

◆ side()

template<index_t DIMENSION>
bool RINGMesh::Region< DIMENSION >::side ( index_t  i) const
inline

Definition at line 1203 of file geomodel_mesh_entity.h.

◆ size()

template<index_t DIMENSION>
double RINGMesh::Region< DIMENSION >::size ( ) const
inlinefinalvirtual

Compute the volume of the Region.

Reimplemented from RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 1156 of file geomodel_mesh_entity.h.

◆ type_name()

template<index_t DIMENSION>
MeshEntityType RINGMesh::Region< DIMENSION >::type_name ( ) const
inlinefinalvirtual

Implements RINGMesh::GeoModelMeshEntity< DIMENSION >.

Definition at line 948 of file geomodel_mesh_entity.h.

◆ type_name_static()

template<index_t DIMENSION>
static MeshEntityType RINGMesh::Region< DIMENSION >::type_name_static ( )
inlinestatic

Definition at line 943 of file geomodel_mesh_entity.h.

◆ update_mesh_storage_type()

template<index_t DIMENSION>
void RINGMesh::Region< DIMENSION >::update_mesh_storage_type ( std::unique_ptr< VolumeMesh< DIMENSION > >  mesh)
inlineprivate

Definition at line 1229 of file geomodel_mesh_entity.h.

Friends And Related Function Documentation

◆ GeoModelMeshEntityAccess< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelMeshEntityAccess< DIMENSION >
friend

Definition at line 936 of file geomodel_mesh_entity.h.

Member Data Documentation

◆ sides_

template<index_t DIMENSION>
std::vector< bool > RINGMesh::Region< DIMENSION >::sides_ {}
protected

Additional information to store oriented boundary Surfaces Side: + (true) or - (false) The size of this vector must be the same than boundary_

Definition at line 1252 of file geomodel_mesh_entity.h.

◆ volume_mesh_

template<index_t DIMENSION>
std::shared_ptr< VolumeMesh< DIMENSION > > RINGMesh::Region< DIMENSION >::volume_mesh_ {}
private

Definition at line 1255 of file geomodel_mesh_entity.h.


The documentation for this class was generated from the following files: