RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
#include <geomodel_mesh.h>
Classes | |
class | GeoModelVertexMapper |
Public Member Functions | |
GEO::AttributesManager & | attribute_manager () const |
bool | is_initialized () const |
void | test_and_initialize () const |
index_t | nb () const |
Number of non colocated vertices stored. More... | |
const vecn< DIMENSION > & | vertex (index_t v) const |
Coordinates of a vertex of the GeoModel. More... | |
index_t | index (const vecn< DIMENSION > &p) const |
Returns the index of the given vertex in the geomodel. More... | |
index_t | geomodel_vertex_id (const gmme_id &mesh_entity, index_t entity_vertex_index=0) const |
Get the GeoModelMesh index of a GeoModelMeshEntity vertex from its index in that GeoModelMeshEntity. More... | |
index_t | geomodel_vertex_id (const gmme_id &mesh_entity, const ElementLocalVertex &element_local_vertex) const |
Get the GeoModelMesh index of a GeoModelMeshEntity vertex from its index in that GeoModelMeshEntity. More... | |
std::vector< index_t > | mesh_entity_vertex_id (const gmme_id &mesh_entity, index_t geomodel_vertex_id) const |
Get the GeoModelMeshEntity vertices from its index in the GeoModelMesh. More... | |
const std::vector< GMEVertex > & | gme_vertices (index_t v) const |
Get the vertices in GeoModelEntity corresponding to the given unique vertex. More... | |
std::vector< GMEVertex > | gme_type_vertices (const MeshEntityType &entity_type, index_t vertex) const |
Get the vertex indices in the specified MeshEntity type corresponding to the given unique vertex. More... | |
index_t | add_vertex (const vecn< DIMENSION > &point) |
To use when building the geomodel by first adding its vertices. More... | |
index_t | add_vertices (const std::vector< vecn< DIMENSION > > &points) |
void | update_point (index_t v, const vecn< DIMENSION > &point) |
Set the point coordinates of all the vertices that share this unique vertex, including the unique vertex itself. More... | |
void | update_vertex_mapping (const gmme_id &entity_id, index_t entity_vertex_index, index_t geomodel_vertex_index) |
virtual void | clear () |
Clear the vertices - clear the gme_vertices_ - clear global vertex information in the all BMME. More... | |
void | unbind_geomodel_vertex_map (const gmme_id &mesh_entity_id) |
void | bind_geomodel_vertex_map (const gmme_id &mesh_entity_id) |
const NNSearch< DIMENSION > & | nn_search () const |
void | remove_colocated () |
Remove colocated vertices. More... | |
void | erase_vertices (std::vector< index_t > &to_delete) |
Delete vertices for which to_delete[i] != i The global vertices are deleted, gme_vertices_ is updated and the geomodel_vertx_id in the GeoModelMeshEntity of the GeoModel are updated too. More... | |
Protected Member Functions | |
GeoModelMeshVerticesBase (GeoModelMesh< DIMENSION > &gmm, GeoModel< DIMENSION > &gm, std::unique_ptr< PointSetMesh< DIMENSION > > &mesh) | |
virtual index_t | nb_total_vertices () const |
return the number of all vertices it is computed summing all entities.nb(). More... | |
virtual index_t | fill_vertices () |
void | fill_vertices_for_entity_type (const GeoModel< DIMENSION > &M, const MeshEntityType &entity_type, index_t &count) |
Protected Member Functions inherited from RINGMesh::GeoModelMeshCommon< DIMENSION > | |
GeoModelMeshCommon (GeoModelMesh< DIMENSION > &gmm, GeoModel< DIMENSION > &geomodel) | |
virtual | ~GeoModelMeshCommon ()=default |
void | set_mesh (MeshBase< DIMENSION > *mesh) |
void | save_mesh (const std::string &filename) const |
Protected Attributes | |
std::unique_ptr< PointSetMesh< DIMENSION > > & | mesh_ |
Attached Mesh. More... | |
GeoModelVertexMapper | vertex_mapper_ |
Mapper from/to GeoModelMeshEntity vertices. More... | |
Protected Attributes inherited from RINGMesh::GeoModelMeshCommon< DIMENSION > | |
GeoModelMesh< DIMENSION > & | gmm_ |
Attached GeoModelMesh. More... | |
GeoModel< DIMENSION > & | geomodel_ |
Attached GeoModel. More... | |
MeshBase< DIMENSION > * | mesh_base_ |
Attached MeshBase. More... | |
Private Member Functions | |
void | initialize () |
Initialize the vertices from the vertices of the GeoModel Corners, Lines, Surfaces and Regions. More... | |
Friends | |
class | GeoModelMeshWells< DIMENSION > |
class | GeoModelMeshEdges< DIMENSION > |
class | GeoModelMeshPolygonsBase< DIMENSION > |
class | GeoModelMeshCells< DIMENSION > |
Definition at line 109 of file geomodel_mesh.h.
|
protected |
Definition at line 427 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::add_vertex | ( | const vecn< DIMENSION > & | point | ) |
To use when building the geomodel by first adding its vertices.
Definition at line 655 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::add_vertices | ( | const std::vector< vecn< DIMENSION > > & | points | ) |
Definition at line 666 of file geomodel_mesh.cpp.
|
inline |
Definition at line 118 of file geomodel_mesh.h.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::bind_geomodel_vertex_map | ( | const gmme_id & | mesh_entity_id | ) |
Definition at line 569 of file geomodel_mesh.cpp.
|
virtual |
Clear the vertices - clear the gme_vertices_ - clear global vertex information in the all BMME.
Reimplemented in RINGMesh::GeoModelMeshVertices< 3 >.
Definition at line 550 of file geomodel_mesh.cpp.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::erase_vertices | ( | std::vector< index_t > & | to_delete | ) |
Delete vertices for which to_delete[i] != i The global vertices are deleted, gme_vertices_ is updated and the geomodel_vertx_id in the GeoModelMeshEntity of the GeoModel are updated too.
[in,out] | to_delete | can be NO_ID or give the index of a kept vertex with which information should be merged. It is recycled to give the mapping between old and new vertex indices |
Definition at line 737 of file geomodel_mesh.cpp.
|
protectedvirtual |
Reimplemented in RINGMesh::GeoModelMeshVertices< 3 >.
Definition at line 537 of file geomodel_mesh.cpp.
|
protected |
Definition at line 466 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::geomodel_vertex_id | ( | const gmme_id & | mesh_entity, |
index_t | entity_vertex_index = 0 |
||
) | const |
Get the GeoModelMesh index of a GeoModelMeshEntity vertex from its index in that GeoModelMeshEntity.
[in] | mesh_entity | GeoModelMeshEntity that vertex belongs to |
[in] | entity_vertex_index | index of the query vertex in the GeoModelMeshEntity |
Definition at line 607 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::geomodel_vertex_id | ( | const gmme_id & | mesh_entity, |
const ElementLocalVertex & | element_local_vertex | ||
) | const |
Get the GeoModelMesh index of a GeoModelMeshEntity vertex from its index in that GeoModelMeshEntity.
[in] | mesh_entity | GeoModelMeshEntity that vertex belongs to |
[in] | element_local_vertex | local vertex in the element |
Definition at line 616 of file geomodel_mesh.cpp.
std::vector< GMEVertex > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::gme_type_vertices | ( | const MeshEntityType & | entity_type, |
index_t | vertex | ||
) | const |
Get the vertex indices in the specified MeshEntity type corresponding to the given unique vertex.
Definition at line 647 of file geomodel_mesh.cpp.
const std::vector< GMEVertex > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::gme_vertices | ( | index_t | v | ) | const |
Get the vertices in GeoModelEntity corresponding to the given unique vertex.
[in] | vertex | Vertex index in the geomodel |
Definition at line 639 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::index | ( | const vecn< DIMENSION > & | p | ) | const |
Returns the index of the given vertex in the geomodel.
[in] | p | input point coordinates |
Definition at line 592 of file geomodel_mesh.cpp.
|
private |
Initialize the vertices from the vertices of the GeoModel Corners, Lines, Surfaces and Regions.
Fills the mesh_->vertices, computes the vertex mapping and delete colocated vertices
Definition at line 511 of file geomodel_mesh.cpp.
bool RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::is_initialized | ( | ) | const |
Tests if the mesh vertices are initialized
Definition at line 439 of file geomodel_mesh.cpp.
std::vector< index_t > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::mesh_entity_vertex_id | ( | const gmme_id & | mesh_entity, |
index_t | geomodel_vertex_id | ||
) | const |
Get the GeoModelMeshEntity vertices from its index in the GeoModelMesh.
[in] | mesh_entity | Unique id to a GeoModelMeshEntity |
[in] | geomodel_vertex_id | Index of the query vertex in the geomodel |
Definition at line 628 of file geomodel_mesh.cpp.
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::nb | ( | ) | const |
Number of non colocated vertices stored.
Definition at line 576 of file geomodel_mesh.cpp.
|
protectedvirtual |
return the number of all vertices it is computed summing all entities.nb().
Reimplemented in RINGMesh::GeoModelMeshVertices< 3 >.
Definition at line 498 of file geomodel_mesh.cpp.
|
inline |
Definition at line 234 of file geomodel_mesh.h.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::remove_colocated | ( | ) |
Remove colocated vertices.
Definition at line 716 of file geomodel_mesh.cpp.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::test_and_initialize | ( | ) | const |
Tests if the mesh vertices need to be initialized, if so initialize them.
Definition at line 445 of file geomodel_mesh.cpp.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::unbind_geomodel_vertex_map | ( | const gmme_id & | mesh_entity_id | ) |
Definition at line 562 of file geomodel_mesh.cpp.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::update_point | ( | index_t | v, |
const vecn< DIMENSION > & | point | ||
) |
Set the point coordinates of all the vertices that share this unique vertex, including the unique vertex itself.
[in] | vertex | Index of the vertex |
[in] | point | New coordinates |
Definition at line 682 of file geomodel_mesh.cpp.
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::update_vertex_mapping | ( | const gmme_id & | entity_id, |
index_t | entity_vertex_index, | ||
index_t | geomodel_vertex_index | ||
) |
Definition at line 703 of file geomodel_mesh.cpp.
const vecn< DIMENSION > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::vertex | ( | index_t | v | ) | const |
Coordinates of a vertex of the GeoModel.
Definition at line 583 of file geomodel_mesh.cpp.
|
friend |
Definition at line 116 of file geomodel_mesh.h.
|
friend |
Definition at line 114 of file geomodel_mesh.h.
|
friend |
Definition at line 115 of file geomodel_mesh.h.
|
friend |
Definition at line 113 of file geomodel_mesh.h.
|
protected |
Attached Mesh.
Definition at line 504 of file geomodel_mesh.h.
|
protected |
Mapper from/to GeoModelMeshEntity vertices.
Definition at line 506 of file geomodel_mesh.h.