RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper Class Reference

Public Member Functions

 GeoModelVertexMapper (GeoModelMeshVerticesBase &geomodel_vertices, const GeoModel< DIMENSION > &geomodel)
 
 ~GeoModelVertexMapper ()=default
 
template<>
 GeoModelVertexMapper (GeoModelMeshVerticesBase &geomodel_vertices, const GeoModel3D &geomodel)
 
Query
index_t geomodel_vertex_index (const gmme_id &mesh_entity_id, index_t mesh_entity_vertex_index) const
 Returns the index of a GeoModelMeshEntity vertex in the geomodel global indexing. More...
 
const std::vector< GMEVertex > & mesh_entity_vertex_indices (index_t v) const
 Returns all the corresponding vertices in GeoModelMeshEntities to a given geomodel vertex. More...
 
std::vector< GMEVertexmesh_entity_vertex_indices (index_t v, const MeshEntityType &mesh_entity_type) const
 Returns all the corresponding vertices in GeoModelMeshEntities of a specific type to a given geomodel vertex. More...
 
std::vector< index_t > mesh_entity_vertex_indices (index_t v, const gmme_id &mesh_entity_id) const
 Returns all the corresponding vertices to a geomodel vertex in a specific GeoModelMeshEntities. More...
 
const std::vector< index_t > & vertex_map (const gmme_id &mesh_entity_id) const
 
std::vector< index_t > & vertex_map (const gmme_id &mesh_entity_id)
 
Updating
void set_vertex_map_value (const gmme_id &mesh_entity_id, index_t mesh_entity_vertex_index, index_t geomodel_entity_vertex_index)
 Sets the geomodel vertex mapping value of a given vertex in a GeoModelMeshEntity. More...
 
void add_to_gme_vertices (const GMEVertex &gme_vertex, index_t geomodel_vertex_index)
 
void update_mesh_entity_maps_and_gmes (const std::vector< index_t > &old2new)
 Updates all the vertex maps with regards to the global indexing changes. More...
 
Initialization
void resize_geomodel_vertex_gmes (const index_t nb)
 Resizes the GME_Vertex vectors. More...
 
void clear_and_resize_geomodel_vertex_gmes (const index_t nb)
 Clears and resizes the GME_Vertex vectors. More...
 
void bind_all_mesh_entity_vertex_maps ()
 
Clearing
void clear ()
 Clears all the information about vertex mapping (vector maps and vectors of GME_Vertices. More...
 
void clear_geomodel_vertex_gmes (index_t v)
 Clears the GME_Vertices about one geomodel vertex. More...
 
void clear_vertex_map (const gmme_id &mesh_entity_id)
 
std::vector< index_t > & resize_vertex_map (const gmme_id &mesh_entity_id)
 

Private Member Functions

 ringmesh_disable_copy_and_move (GeoModelVertexMapper)
 
void initialize_mesh_entity_vertex_map (const gmme_id &mesh_entity_id)
 Initializes the given GeoModelMeshEntity vertex map. More...
 
bool test_and_initialize_mesh_entity_vertex_map (const gmme_id &mesh_entity_id)
 Tests if the given GeoModelMeshEntity vertex map is initialized. If not, initializes it. More...
 
bool is_mesh_entity_vertex_map_initialized (const gmme_id &mesh_entity_id) const
 Tests if the given GeoModelMeshEntity vertex map exists. More...
 
void clear_all_mesh_entity_vertex_map ()
 Unbinds all the GeoModelMeshEntity vertex maps. More...
 
void resize_all_mesh_entity_vertex_maps (const MeshEntityType &type)
 
GEO::AttributesManager & mesh_entity_vertex_attribute_manager (const gmme_id &mesh_entity_id) const
 Returns the vertex attribute of a GeoModelMeshEntity. More...
 

Private Attributes

GeoModelMeshVerticesBase< DIMENSION > & geomodel_vertices_
 
const GeoModel< DIMENSION > & geomodel_
 
std::vector< std::vector< index_t > > corner_vertex_maps_
 Vertex maps. More...
 
std::vector< std::vector< index_t > > line_vertex_maps_
 
std::vector< std::vector< index_t > > surface_vertex_maps_
 
std::vector< std::vector< index_t > > region_vertex_maps_
 
std::map< MeshEntityType, std::vector< std::vector< index_t > > *> vertex_maps_
 
std::vector< std::vector< GMEVertex > > gme_vertices_
 GeoModelEntity Vertices for each geomodel vertex. More...
 

Detailed Description

template<index_t DIMENSION>
class RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper

Class which manages the mapping informations between vertices of GeoModelMeshEntites (entity_index) and GeoModelMeshVerticesBase (global index)

Definition at line 290 of file geomodel_mesh.h.

Constructor & Destructor Documentation

◆ GeoModelVertexMapper() [1/2]

template<index_t DIMENSION>
RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::GeoModelVertexMapper ( GeoModelMeshVerticesBase geomodel_vertices,
const GeoModel< DIMENSION > &  geomodel 
)

Definition at line 165 of file geomodel_mesh.cpp.

◆ ~GeoModelVertexMapper()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::~GeoModelVertexMapper ( )
default

◆ GeoModelVertexMapper() [2/2]

template<>
RINGMesh::GeoModelMeshVerticesBase::GeoModelVertexMapper< 3 >::GeoModelVertexMapper ( GeoModelMeshVerticesBase geomodel_vertices,
const GeoModel3D &  geomodel 
)

Definition at line 833 of file geomodel_mesh.cpp.

Member Function Documentation

◆ add_to_gme_vertices()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::add_to_gme_vertices ( const GMEVertex gme_vertex,
index_t  geomodel_vertex_index 
)

Definition at line 269 of file geomodel_mesh.cpp.

◆ bind_all_mesh_entity_vertex_maps()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::bind_all_mesh_entity_vertex_maps ( )

Definition at line 277 of file geomodel_mesh.cpp.

◆ clear()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::clear ( )

Clears all the information about vertex mapping (vector maps and vectors of GME_Vertices.

Definition at line 178 of file geomodel_mesh.cpp.

◆ clear_all_mesh_entity_vertex_map()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::clear_all_mesh_entity_vertex_map ( )
private

Unbinds all the GeoModelMeshEntity vertex maps.

Definition at line 398 of file geomodel_mesh.cpp.

◆ clear_and_resize_geomodel_vertex_gmes()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::clear_and_resize_geomodel_vertex_gmes ( const index_t  nb)
inline

Clears and resizes the GME_Vertex vectors.

Parameters
[in]nbSize of the vector

Definition at line 407 of file geomodel_mesh.h.

◆ clear_geomodel_vertex_gmes()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::clear_geomodel_vertex_gmes ( index_t  v)
inline

Clears the GME_Vertices about one geomodel vertex.

Definition at line 430 of file geomodel_mesh.h.

◆ clear_vertex_map()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::clear_vertex_map ( const gmme_id mesh_entity_id)

Definition at line 345 of file geomodel_mesh.cpp.

◆ geomodel_vertex_index()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::geomodel_vertex_index ( const gmme_id mesh_entity_id,
index_t  mesh_entity_vertex_index 
) const

Returns the index of a GeoModelMeshEntity vertex in the geomodel global indexing.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity
[in]mesh_entity_vertex_indexIndex of query vertex in the GeoModelMeshEntity indexing
Returns
Model index of the GeoModelMeshEntity vertex

Definition at line 186 of file geomodel_mesh.cpp.

◆ initialize_mesh_entity_vertex_map()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::initialize_mesh_entity_vertex_map ( const gmme_id mesh_entity_id)
private

Initializes the given GeoModelMeshEntity vertex map.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity

Definition at line 360 of file geomodel_mesh.cpp.

◆ is_mesh_entity_vertex_map_initialized()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::is_mesh_entity_vertex_map_initialized ( const gmme_id mesh_entity_id) const
private

Tests if the given GeoModelMeshEntity vertex map exists.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity
Returns
True is the map exists, false if not.

Definition at line 388 of file geomodel_mesh.cpp.

◆ mesh_entity_vertex_attribute_manager()

template<index_t DIMENSION>
GEO::AttributesManager & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::mesh_entity_vertex_attribute_manager ( const gmme_id mesh_entity_id) const
private

Returns the vertex attribute of a GeoModelMeshEntity.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity

Definition at line 419 of file geomodel_mesh.cpp.

◆ mesh_entity_vertex_indices() [1/3]

template<index_t DIMENSION>
const std::vector< GMEVertex > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::mesh_entity_vertex_indices ( index_t  v) const

Returns all the corresponding vertices in GeoModelMeshEntities to a given geomodel vertex.

Parameters
[in]vertexModel vertex index
Returns
All the corresponding vertices in their local indexing

Definition at line 198 of file geomodel_mesh.cpp.

◆ mesh_entity_vertex_indices() [2/3]

template<index_t DIMENSION>
std::vector< GMEVertex > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::mesh_entity_vertex_indices ( index_t  v,
const MeshEntityType mesh_entity_type 
) const

Returns all the corresponding vertices in GeoModelMeshEntities of a specific type to a given geomodel vertex.

Parameters
[in]vertexModel vertex index
[in]mesh_entity_typeType of GeoModelMeshEntity
Returns
corresponding vertices in GeoModelMeshEntities of a specific type

Definition at line 206 of file geomodel_mesh.cpp.

◆ mesh_entity_vertex_indices() [3/3]

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::mesh_entity_vertex_indices ( index_t  v,
const gmme_id mesh_entity_id 
) const

Returns all the corresponding vertices to a geomodel vertex in a specific GeoModelMeshEntities.

Parameters
[in]vertexModel vertex index
[in]mesh_entity_idUnique id to a GeoModelMeshEntity
Returns
corresponding vertices in the GeoModelMeshEntity
All the corresponding vertices in their local indexing

Definition at line 224 of file geomodel_mesh.cpp.

◆ resize_all_mesh_entity_vertex_maps()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::resize_all_mesh_entity_vertex_maps ( const MeshEntityType type)
private

Definition at line 412 of file geomodel_mesh.cpp.

◆ resize_geomodel_vertex_gmes()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::resize_geomodel_vertex_gmes ( const index_t  nb)
inline

Resizes the GME_Vertex vectors.

Parameters
[in]nbSize of the vector

Definition at line 398 of file geomodel_mesh.h.

◆ resize_vertex_map()

template<index_t DIMENSION>
std::vector< index_t > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::resize_vertex_map ( const gmme_id mesh_entity_id)

Definition at line 297 of file geomodel_mesh.cpp.

◆ ringmesh_disable_copy_and_move()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::ringmesh_disable_copy_and_move ( GeoModelVertexMapper  )
private

◆ set_vertex_map_value()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::set_vertex_map_value ( const gmme_id mesh_entity_id,
index_t  mesh_entity_vertex_index,
index_t  geomodel_entity_vertex_index 
)

Sets the geomodel vertex mapping value of a given vertex in a GeoModelMeshEntity.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity
[in]mesh_entity_vertex_indexIndex of query vertex in the GeoModelMeshEntity indexing
[in]geomodel_entity_vertex_indexModel vertex index to map with

Definition at line 258 of file geomodel_mesh.cpp.

◆ test_and_initialize_mesh_entity_vertex_map()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::test_and_initialize_mesh_entity_vertex_map ( const gmme_id mesh_entity_id)
private

Tests if the given GeoModelMeshEntity vertex map is initialized. If not, initializes it.

Parameters
[in]mesh_entity_idUnique id to a GeoModelMeshEntity
Returns
True is the map was initialized, false if not.

Definition at line 374 of file geomodel_mesh.cpp.

◆ update_mesh_entity_maps_and_gmes()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::update_mesh_entity_maps_and_gmes ( const std::vector< index_t > &  old2new)

Updates all the vertex maps with regards to the global indexing changes.

Parameters
[in]old2newMap between actual geomodel indexing and wanted geomodel indexing. Its size is equal to the number of geomodel vertices.

Definition at line 313 of file geomodel_mesh.cpp.

◆ vertex_map() [1/2]

template<index_t DIMENSION>
const std::vector< index_t > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::vertex_map ( const gmme_id mesh_entity_id) const

Definition at line 241 of file geomodel_mesh.cpp.

◆ vertex_map() [2/2]

template<index_t DIMENSION>
std::vector< index_t > & RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::vertex_map ( const gmme_id mesh_entity_id)

Definition at line 250 of file geomodel_mesh.cpp.

Member Data Documentation

◆ corner_vertex_maps_

template<index_t DIMENSION>
std::vector< std::vector< index_t > > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::corner_vertex_maps_
private

Vertex maps.

Definition at line 491 of file geomodel_mesh.h.

◆ geomodel_

template<index_t DIMENSION>
const GeoModel< DIMENSION >& RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::geomodel_
private

Definition at line 488 of file geomodel_mesh.h.

◆ geomodel_vertices_

template<index_t DIMENSION>
GeoModelMeshVerticesBase< DIMENSION >& RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::geomodel_vertices_
private

Definition at line 487 of file geomodel_mesh.h.

◆ gme_vertices_

template<index_t DIMENSION>
std::vector< std::vector< GMEVertex > > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::gme_vertices_
private

GeoModelEntity Vertices for each geomodel vertex.

Definition at line 499 of file geomodel_mesh.h.

◆ line_vertex_maps_

template<index_t DIMENSION>
std::vector< std::vector< index_t > > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::line_vertex_maps_
private

Definition at line 492 of file geomodel_mesh.h.

◆ region_vertex_maps_

template<index_t DIMENSION>
std::vector< std::vector< index_t > > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::region_vertex_maps_
private

Definition at line 494 of file geomodel_mesh.h.

◆ surface_vertex_maps_

template<index_t DIMENSION>
std::vector< std::vector< index_t > > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::surface_vertex_maps_
private

Definition at line 493 of file geomodel_mesh.h.

◆ vertex_maps_

template<index_t DIMENSION>
std::map< MeshEntityType, std::vector< std::vector< index_t > >* > RINGMesh::GeoModelMeshVerticesBase< DIMENSION >::GeoModelVertexMapper::vertex_maps_
private

Definition at line 496 of file geomodel_mesh.h.


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