RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::VertexMap Struct Reference

Structure which maps the vertex indices in Gocad::TSolid to the pair (region, index in region) in the RINGMesh::GeoModel. More...

#include <geomodel_builder_gocad.h>

Classes

struct  RegionLocalVertex
 

Public Member Functions

index_t gocad_vertex_id (index_t id) const
 
index_t region_id (index_t id) const
 
void add_new_region (index_t region_id, const std::string &region_name)
 
void record_vertex_with_its_region (index_t gocad_vertex_id, index_t region_id)
 
index_t nb_regions () const
 
std::tuple< bool, index_t > find_region_id_from_name (const std::string &region_name)
 
const std::vector< index_t > & get_regions () const
 
void get_tetra_corners_with_this_region_id (index_t region_id, std::vector< index_t > &region_tetra_corners_local) const
 
void get_vertices_attributes_list_from_gocad_ids (const std::vector< std::vector< double > > &stored_attributes, index_t region_id, const std::map< index_t, index_t > &lighttsolid_atom_map, std::vector< std::vector< double > > &region_tetra_attributes) const
 
std::vector< RegionLocalVertexget_vertices_list_and_local_ids_from_gocad_ids (const std::vector< vec3 > &stored_vertices, const index_t region_id, const std::map< index_t, index_t > &lighttsolid_atom_map) const
 
index_t local_id (index_t gocad_vertex_id) const
 
index_t region (index_t gocad_vertex_id) const
 
void add_vertex (index_t local_vertex_id, index_t region_id)
 
void reserve (index_t capacity)
 
void reserve_nb_vertices (index_t capacity)
 
void fill_with_lighttsolid_region_ids ()
 
void fill_with_lighttsolid_local_ids ()
 
void deal_with_same_region_atoms (const std::map< index_t, index_t > &lighttsolid_atom_map)
 

Public Attributes

std::vector< std::vector< index_t > > local_ids_
 

Private Attributes

std::vector< index_t > vertices_gocad_id_
 
std::vector< index_t > vertices_region_id_
 
std::vector< index_t > region_ids_
 
std::vector< std::string > region_names_
 
std::vector< index_t > gocad_ids2local_ids_
 
std::vector< index_t > gocad_ids2region_ids_
 

Detailed Description

Structure which maps the vertex indices in Gocad::TSolid to the pair (region, index in region) in the RINGMesh::GeoModel.

Definition at line 173 of file geomodel_builder_gocad.h.

Member Function Documentation

◆ add_new_region()

void RINGMesh::VertexMap::add_new_region ( index_t  region_id,
const std::string &  region_name 
)
inline

Definition at line 187 of file geomodel_builder_gocad.h.

◆ add_vertex()

void RINGMesh::VertexMap::add_vertex ( index_t  local_vertex_id,
index_t  region_id 
)
inline

Definition at line 340 of file geomodel_builder_gocad.h.

◆ deal_with_same_region_atoms()

void RINGMesh::VertexMap::deal_with_same_region_atoms ( const std::map< index_t, index_t > &  lighttsolid_atom_map)
inline

Definition at line 420 of file geomodel_builder_gocad.h.

◆ fill_with_lighttsolid_local_ids()

void RINGMesh::VertexMap::fill_with_lighttsolid_local_ids ( )
inline

Definition at line 386 of file geomodel_builder_gocad.h.

◆ fill_with_lighttsolid_region_ids()

void RINGMesh::VertexMap::fill_with_lighttsolid_region_ids ( )
inline

Definition at line 358 of file geomodel_builder_gocad.h.

◆ find_region_id_from_name()

std::tuple< bool, index_t > RINGMesh::VertexMap::find_region_id_from_name ( const std::string &  region_name)
inline

Definition at line 206 of file geomodel_builder_gocad.h.

◆ get_regions()

const std::vector< index_t >& RINGMesh::VertexMap::get_regions ( ) const
inline

Definition at line 222 of file geomodel_builder_gocad.h.

◆ get_tetra_corners_with_this_region_id()

void RINGMesh::VertexMap::get_tetra_corners_with_this_region_id ( index_t  region_id,
std::vector< index_t > &  region_tetra_corners_local 
) const
inline

Definition at line 227 of file geomodel_builder_gocad.h.

◆ get_vertices_attributes_list_from_gocad_ids()

void RINGMesh::VertexMap::get_vertices_attributes_list_from_gocad_ids ( const std::vector< std::vector< double > > &  stored_attributes,
index_t  region_id,
const std::map< index_t, index_t > &  lighttsolid_atom_map,
std::vector< std::vector< double > > &  region_tetra_attributes 
) const
inline

Definition at line 242 of file geomodel_builder_gocad.h.

◆ get_vertices_list_and_local_ids_from_gocad_ids()

std::vector< RegionLocalVertex > RINGMesh::VertexMap::get_vertices_list_and_local_ids_from_gocad_ids ( const std::vector< vec3 > &  stored_vertices,
const index_t  region_id,
const std::map< index_t, index_t > &  lighttsolid_atom_map 
) const
inline

Definition at line 289 of file geomodel_builder_gocad.h.

◆ gocad_vertex_id()

index_t RINGMesh::VertexMap::gocad_vertex_id ( index_t  id) const
inline

Definition at line 175 of file geomodel_builder_gocad.h.

◆ local_id()

index_t RINGMesh::VertexMap::local_id ( index_t  gocad_vertex_id) const
inline

Definition at line 328 of file geomodel_builder_gocad.h.

◆ nb_regions()

index_t RINGMesh::VertexMap::nb_regions ( ) const
inline

Definition at line 200 of file geomodel_builder_gocad.h.

◆ record_vertex_with_its_region()

void RINGMesh::VertexMap::record_vertex_with_its_region ( index_t  gocad_vertex_id,
index_t  region_id 
)
inline

Definition at line 193 of file geomodel_builder_gocad.h.

◆ region()

index_t RINGMesh::VertexMap::region ( index_t  gocad_vertex_id) const
inline

Definition at line 334 of file geomodel_builder_gocad.h.

◆ region_id()

index_t RINGMesh::VertexMap::region_id ( index_t  id) const
inline

Definition at line 181 of file geomodel_builder_gocad.h.

◆ reserve()

void RINGMesh::VertexMap::reserve ( index_t  capacity)
inline

Definition at line 346 of file geomodel_builder_gocad.h.

◆ reserve_nb_vertices()

void RINGMesh::VertexMap::reserve_nb_vertices ( index_t  capacity)
inline

Definition at line 352 of file geomodel_builder_gocad.h.

Member Data Documentation

◆ gocad_ids2local_ids_

std::vector< index_t > RINGMesh::VertexMap::gocad_ids2local_ids_
private

TSolids & LightTSolids Mapping the indices of vertices from Gocad .so file to the local (in region) indices of vertices

Definition at line 483 of file geomodel_builder_gocad.h.

◆ gocad_ids2region_ids_

std::vector< index_t > RINGMesh::VertexMap::gocad_ids2region_ids_
private

TSolids & LightTSolids Mapping the indices of vertices from Gocad .so file to the region containing them

Definition at line 489 of file geomodel_builder_gocad.h.

◆ local_ids_

std::vector< std::vector< index_t > > RINGMesh::VertexMap::local_ids_

LightTSolids One std::vector< index_t > per region. Regions vector are recorded in the same order as region_ids_. Mapping the indices of vertices from Gocad .so file to the local (in region) indices of vertices. No duplicates: Only the Vertex and the Atoms linking to a different region Vertex are recorded here.

Definition at line 444 of file geomodel_builder_gocad.h.

◆ region_ids_

std::vector< index_t > RINGMesh::VertexMap::region_ids_
private

LightTSolids All the region IDs are stored in order here. Ex: 0, 1, 2, 3. No duplicates.

Definition at line 469 of file geomodel_builder_gocad.h.

◆ region_names_

std::vector< std::string > RINGMesh::VertexMap::region_names_
private

LightTSolids The names of the regions matching the regions IDs. No duplicates.

Definition at line 475 of file geomodel_builder_gocad.h.

◆ vertices_gocad_id_

std::vector< index_t > RINGMesh::VertexMap::vertices_gocad_id_
private

LightTSolids The gocad IDs of the vertices of the LightTSolid as read in the Tetra lines of the file. Duplicates: One vertex is recorded multiple times due to its presence in multiple tetras.

Definition at line 454 of file geomodel_builder_gocad.h.

◆ vertices_region_id_

std::vector< index_t > RINGMesh::VertexMap::vertices_region_id_
private

LightTSolids The region IDs of the vertices of the LightTSolid as read in the # CTETRA lines of the file. Duplicates: One vertex is recorded multiple times due to its presence in multiple tetras.

Definition at line 462 of file geomodel_builder_gocad.h.


The documentation for this struct was generated from the following file: