RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
Abstract base class for GeoModelMeshEntity. More...
#include <geomodel_mesh_entity.h>
Public Member Functions | |
virtual | ~GeoModelMeshEntity () |
virtual MeshEntityType | type_name () const =0 |
gmme_id | gmme () const |
MeshEntityType | mesh_entity_type () const |
bool | is_valid () const final |
Global validity of the entity. More... | |
virtual bool | is_connectivity_valid () const |
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 |
Boundary relationship functions | |
index_t | nb_boundaries () const |
const gmme_id & | boundary_gmme (index_t x) const |
const GeoModelMeshEntity< DIMENSION > & | boundary (index_t x) const |
index_t | nb_incident_entities () const |
const gmme_id & | incident_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... | |
Parents/children relationship functions | |
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_id & | parent_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 |
Local access to the GeoModelMeshEntity geometry | |
index_t | nb_vertices () const |
const vecn< DIMENSION > & | vertex (index_t vertex_index) const |
Coordinates of the vertex_index . More... | |
virtual index_t | nb_mesh_elements () const =0 |
Get the number constitutive elements of the mesh. More... | |
virtual index_t | nb_mesh_element_vertices (index_t mesh_element_index) const =0 |
Number of vertices of a constitutive element of the mesh. More... | |
virtual index_t | mesh_element_vertex_index (const ElementLocalVertex &element_local_vertex) const =0 |
Convert the index in a mesh element to an index in the Entity. More... | |
const vecn< DIMENSION > & | mesh_element_vertex (const ElementLocalVertex &element_local_vertex) const |
Coordinates of a vertex of a mesh element. More... | |
Geometrical request on Entity | |
virtual double | mesh_element_size (index_t mesh_element_index) const =0 |
virtual vecn< DIMENSION > | mesh_element_barycenter (index_t mesh_element_index) const =0 |
vecn< DIMENSION > | entity_barycenter () const |
virtual double | size () const |
Public Member Functions inherited from RINGMesh::GeoModelEntity< DIMENSION > | |
virtual | ~GeoModelEntity ()=default |
virtual bool | is_on_voi () const =0 |
const GeoModel< DIMENSION > & | geomodel () const |
const std::string & | name () const |
index_t | index () const |
Protected Member Functions | |
GeoModelMeshEntity (const GeoModel< DIMENSION > &geomodel, index_t id) | |
virtual void | copy_mesh_entity (const GeoModelMeshEntity< DIMENSION > &from) |
virtual bool | is_index_valid () const final |
virtual bool | is_mesh_valid () const |
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 |
virtual void | change_mesh_data_structure (const MeshType &type)=0 |
Protected Member Functions inherited from RINGMesh::GeoModelEntity< DIMENSION > | |
GeoModelEntity (const GeoModel< DIMENSION > &geomodel, index_t id) | |
void | copy_name (const GeoModelEntity< DIMENSION > &from) |
Protected Attributes | |
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 (GeoModelMeshEntity) | |
ringmesh_template_assert_2d_or_3d (DIMENSION) | |
gmge_id | defined_parent_gmge (const GeologicalEntityType &parent_type) const |
gmge_id | could_be_undefined_parent_gmge (const GeologicalEntityType &parent_type) const |
Private Attributes | |
std::shared_ptr< MeshBase< DIMENSION > > | mesh_ {} |
The RINGMesh::Mesh giving the geometry of this entity. More... | |
Friends | |
class | GeoModelMeshEntityAccess< DIMENSION > |
class | GeoModelMeshEntityConstAccess< DIMENSION > |
Abstract base class for GeoModelMeshEntity.
The GeoModelMeshEntity geometrical representation is stored as a RINGMesh::Mesh. We defines generic access to the RINGMesh::Mesh geometry.
Definition at line 77 of file geomodel_mesh_entity.h.
|
virtual |
Definition at line 243 of file geomodel_mesh_entity.cpp.
|
inlineprotected |
Definition at line 301 of file geomodel_mesh_entity.h.
|
protected |
Check that geomodel vertex indices are consistent with what is stored at the GeoModel level.
Definition at line 269 of file geomodel_mesh_entity.cpp.
|
protected |
Definition at line 261 of file geomodel_mesh_entity.cpp.
const GeoModelMeshEntity< DIMENSION > & RINGMesh::GeoModelMeshEntity< DIMENSION >::boundary | ( | index_t | x | ) | const |
Definition at line 529 of file geomodel_mesh_entity.cpp.
const gmme_id & RINGMesh::GeoModelMeshEntity< DIMENSION >::boundary_gmme | ( | index_t | x | ) | const |
Definition at line 518 of file geomodel_mesh_entity.cpp.
|
protectedpure virtual |
|
inlineprotectedvirtual |
Reimplemented in RINGMesh::Region< DIMENSION >.
Definition at line 306 of file geomodel_mesh_entity.h.
|
private |
Definition at line 494 of file geomodel_mesh_entity.cpp.
|
private |
Definition at line 509 of file geomodel_mesh_entity.cpp.
|
inline |
Definition at line 273 of file geomodel_mesh_entity.h.
|
inline |
Definition at line 89 of file geomodel_mesh_entity.h.
bool RINGMesh::GeoModelMeshEntity< DIMENSION >::has_inside_border | ( | ) | const |
Check if one entity is twice in the boundary.
Definition at line 230 of file geomodel_mesh_entity.cpp.
|
inline |
Definition at line 152 of file geomodel_mesh_entity.h.
|
inline |
Check if the entity has a parent of the given type.
Definition at line 160 of file geomodel_mesh_entity.h.
const GeoModelMeshEntity< DIMENSION > & RINGMesh::GeoModelMeshEntity< DIMENSION >::incident_entity | ( | index_t | x | ) | const |
Definition at line 536 of file geomodel_mesh_entity.cpp.
const gmme_id & RINGMesh::GeoModelMeshEntity< DIMENSION >::incident_entity_gmme | ( | index_t | x | ) | const |
Definition at line 542 of file geomodel_mesh_entity.cpp.
|
protected |
All entities in the boundary must have this in their incident_entity vector
Definition at line 318 of file geomodel_mesh_entity.cpp.
|
virtual |
Check that required information for the TYPE is defined and that reverse information is stored by the corresponding entities
Reimplemented in RINGMesh::Region< DIMENSION >, and RINGMesh::Line< DIMENSION >.
Definition at line 461 of file geomodel_mesh_entity.cpp.
|
protected |
All entities must be at least in the boundary of another entity and all entities in the incident_entity must have this entity in their boundary vector
Definition at line 356 of file geomodel_mesh_entity.cpp.
|
finalprotectedvirtual |
Implements RINGMesh::GeoModelEntity< DIMENSION >.
Definition at line 312 of file geomodel_mesh_entity.cpp.
bool RINGMesh::GeoModelMeshEntity< DIMENSION >::is_inside_border | ( | const GeoModelMeshEntity< DIMENSION > & | rhs | ) | const |
|
inlineprotectedvirtual |
Reimplemented in RINGMesh::Region< DIMENSION >, RINGMesh::SurfaceBase< DIMENSION >, RINGMesh::SurfaceBase< 2 >, RINGMesh::SurfaceBase< 3 >, RINGMesh::Line< DIMENSION >, and RINGMesh::Corner< DIMENSION >.
Definition at line 317 of file geomodel_mesh_entity.h.
bool RINGMesh::GeoModelMeshEntity< DIMENSION >::is_parent_connectivity_valid | ( | ) | const |
Check that for each parent type, this entity has one and only one parent of that type.
Definition at line 401 of file geomodel_mesh_entity.cpp.
|
inlinefinalvirtual |
Global validity of the entity.
Implements RINGMesh::GeoModelEntity< DIMENSION >.
Definition at line 100 of file geomodel_mesh_entity.h.
|
pure virtual |
|
pure virtual |
|
inline |
Coordinates of a vertex of a mesh element.
[in] | mesh_element_index | Index of a constitutive element of the mesh |
[in] | vertex_local_index | Local index of a vertex in the constitutive mesh element |
Definition at line 258 of file geomodel_mesh_entity.h.
|
pure virtual |
Convert the index in a mesh element to an index in the Entity.
[in] | mesh_element_index | Index of a constitutive element of the mesh |
[in] | vertex_local_index | Local index of a vertex in the constitutive mesh element |
Implemented in RINGMesh::Region< DIMENSION >, RINGMesh::SurfaceBase< DIMENSION >, RINGMesh::SurfaceBase< 2 >, RINGMesh::SurfaceBase< 3 >, RINGMesh::Line< DIMENSION >, and RINGMesh::Corner< DIMENSION >.
|
inline |
Definition at line 93 of file geomodel_mesh_entity.h.
|
inline |
Definition at line 121 of file geomodel_mesh_entity.h.
|
inline |
Definition at line 128 of file geomodel_mesh_entity.h.
|
pure virtual |
Number of vertices of a constitutive element of the mesh.
Implemented in RINGMesh::Region< DIMENSION >, RINGMesh::SurfaceBase< DIMENSION >, RINGMesh::SurfaceBase< 2 >, RINGMesh::SurfaceBase< 3 >, RINGMesh::Line< DIMENSION >, and RINGMesh::Corner< DIMENSION >.
|
pure virtual |
Get the number constitutive elements of the mesh.
Constitutive elements are those of the dimension of the object. segments for lines, polygons for surfaces and cells for volumetric meshes.
Implemented in RINGMesh::Region< DIMENSION >, RINGMesh::SurfaceBase< DIMENSION >, RINGMesh::SurfaceBase< 2 >, RINGMesh::SurfaceBase< 3 >, RINGMesh::Line< DIMENSION >, and RINGMesh::Corner< DIMENSION >.
|
inline |
Definition at line 165 of file geomodel_mesh_entity.h.
|
inline |
Definition at line 213 of file geomodel_mesh_entity.h.
const GeoModelGeologicalEntity< DIMENSION > & RINGMesh::GeoModelMeshEntity< DIMENSION >::parent | ( | index_t | parent_index | ) | const |
Definition at line 469 of file geomodel_mesh_entity.cpp.
const GeoModelGeologicalEntity< DIMENSION > & RINGMesh::GeoModelMeshEntity< DIMENSION >::parent | ( | const GeologicalEntityType & | parent_type | ) | const |
Definition at line 478 of file geomodel_mesh_entity.cpp.
const gmge_id & RINGMesh::GeoModelMeshEntity< DIMENSION >::parent_gmge | ( | index_t | id | ) | const |
Definition at line 552 of file geomodel_mesh_entity.cpp.
const gmge_id RINGMesh::GeoModelMeshEntity< DIMENSION >::parent_gmge | ( | const GeologicalEntityType & | parent_type | ) | const |
Returns the gmge_id of the parent of the given type.
parent_type_name
, else it will crash in debug and return an invalid entity in release. The method has_parent(GeologicalEntityType) is a safe way to check if the type parent_type_name
is a valid parent type for the GeoModelMeshEntity. [in] | parent_type_name | the asking parent type |
Definition at line 487 of file geomodel_mesh_entity.cpp.
|
private |
|
private |
|
inline |
Definition at line 195 of file geomodel_mesh_entity.h.
|
inlineprotected |
Definition at line 322 of file geomodel_mesh_entity.h.
|
inlinevirtual |
Reimplemented in RINGMesh::Region< DIMENSION >, and RINGMesh::Corner< DIMENSION >.
Definition at line 284 of file geomodel_mesh_entity.h.
|
pure virtual |
|
protected |
Definition at line 253 of file geomodel_mesh_entity.cpp.
|
inline |
Coordinates of the vertex_index
.
Definition at line 220 of file geomodel_mesh_entity.h.
|
inline |
Definition at line 295 of file geomodel_mesh_entity.h.
|
inline |
Return the NNSearch for the Entity vertices.
Definition at line 203 of file geomodel_mesh_entity.h.
|
friend |
Definition at line 81 of file geomodel_mesh_entity.h.
|
friend |
Definition at line 82 of file geomodel_mesh_entity.h.
|
protected |
Boundary relations of this entity.
Definition at line 362 of file geomodel_mesh_entity.h.
|
protected |
Incident-entity relations of this entity.
Definition at line 365 of file geomodel_mesh_entity.h.
|
private |
The RINGMesh::Mesh giving the geometry of this entity.
Definition at line 372 of file geomodel_mesh_entity.h.
|
protected |
Parents relations of this entity.
Definition at line 368 of file geomodel_mesh_entity.h.