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

#include <geomodel_mesh.h>

Inheritance diagram for RINGMesh::GeoModelMeshCells< DIMENSION >:
RINGMesh::GeoModelMeshCommon< DIMENSION >

Public Types

enum  DuplicateMode { NONE, FAULT, HORIZON, ALL }
 

Public Member Functions

 GeoModelMeshCells (GeoModelMesh< DIMENSION > &gmm, GeoModel< DIMENSION > &gm, std::unique_ptr< VolumeMesh< DIMENSION > > &mesh)
 
GEO::AttributesManager & attribute_manager () const
 
bool is_initialized () const
 
bool is_duplication_initialized () const
 
void test_and_initialize () const
 
index_t nb () const
 Number of cells stored. More...
 
index_t nb_duplicated_vertices () const
 
index_t nb_total_vertices () const
 
index_t duplicated_corner_index (const ElementLocalVertex &cell_local_vertex) const
 
index_t duplicated_vertex (index_t duplicate_vertex_index) const
 
index_t nb_vertices (index_t cell) const
 
index_t vertex (const ElementLocalVertex &cell_local_vertex) const
 
index_t nb_edges (index_t cell) const
 
index_t nb_facets (index_t cell) const
 
index_t nb_facet_vertices (const CellLocalFacet &cell_local_facet) const
 
index_t facet_vertex (const CellLocalFacet &cell_local_facet, index_t local_vertex) const
 Gets a cell vertex by local facet index and local vertex index in the edge. More...
 
index_t edge_vertex (index_t cell, index_t local_edge, index_t local_vertex) const
 Gets a cell vertex by local edge index and local vertex index in the edge. More...
 
index_t adjacent (index_t cell, index_t facet) const
 
index_t region (index_t cell) const
 
index_t index_in_region (index_t cell) const
 
CellType type (index_t cell) const
 
index_t nb_cells (CellType type=CellType::UNDEFINED) const
 
index_t nb_cells (index_t region, CellType type=CellType::UNDEFINED) const
 
index_t cell (index_t region, index_t cell, CellType type=CellType::UNDEFINED) const
 
index_t nb_tet () const
 
index_t nb_tet (index_t region) const
 
index_t tet (index_t region, index_t tet) const
 
index_t nb_hex () const
 
index_t nb_hex (index_t region) const
 
index_t hex (index_t region, index_t hex) const
 
index_t nb_prism () const
 
index_t nb_prism (index_t region) const
 
index_t prism (index_t region, index_t prism) const
 
index_t nb_pyramid () const
 
index_t nb_pyramid (index_t region) const
 
index_t pyramid (index_t region, index_t pyramid) const
 
index_t nb_connector () const
 
index_t nb_connector (index_t region) const
 
index_t connector (index_t region, index_t connector) const
 
void clear ()
 
void clear_duplication ()
 
bool is_cell_facet_on_surface (index_t cell, index_t facet_index, index_t &colocated_facet_index, bool &side) const
 
vec3 barycenter (index_t cell) const
 
double volume (index_t cell) const
 
const NNSearch< DIMENSION > & cell_nn_search () const
 
const NNSearch< DIMENSION > & cell_facet_nn_search () const
 
const VolumeAABBTree< DIMENSION > & aabb () const
 return the AABB tree for the cells of the mesh More...
 

Private Types

enum  ActionOnSurface { SKIP = -2, TO_PROCESS = -1, NEG_SIDE = 0, POS_SIDE = 1 }
 
using action_on_surface = std::pair< index_t, ActionOnSurface >
 Action to do according a surface index. More...
 

Private Member Functions

void initialize ()
 Initialize the cells from the cells of the GeoModel Region cells. More...
 
void resize_cell_data ()
 
void clear_cell_data ()
 
void test_and_initialize_duplication () const
 
void initialize_duplication ()
 
bool is_surface_to_duplicate (index_t surface) const
 
bool are_corners_to_duplicate (const std::vector< action_on_surface > &surfaces, std::vector< ActionOnSurface > &info)
 
void test_and_initialize_cell_facet () const
 
void initialize_cell_facet ()
 
void sort_cells ()
 

Private Attributes

std::unique_ptr< VolumeMesh< DIMENSION > > & mesh_
 Attached Mesh. More...
 
std::vector< index_t > region_id_
 Vector storing the region index per cell. More...
 
std::vector< index_t > cell_id_
 Vector storing the cell index in region per cell. More...
 
std::vector< index_t > region_cell_ptr_
 
index_t nb_tets_ { 0 }
 Number of tet in the GeoModelMesh. More...
 
index_t nb_hexs_ { 0 }
 Number of hex in the GeoModelMesh. More...
 
index_t nb_prisms_ { 0 }
 Number of prism in the GeoModelMesh. More...
 
index_t nb_pyramids_ { 0 }
 Number of pyramid in the GeoModelMesh. More...
 
index_t nb_connectors_ { 0 }
 Number of connector in the GeoModelMesh. More...
 
DuplicateMode mode_ { NONE }
 Current duplicate mode applied on the mesh. More...
 
std::vector< index_t > duplicated_vertex_indices_
 Vector of duplicated vertices. More...
 
std::vector< index_t > polygon_id_
 Vector storing the colocalised polygon index per cell facet If a cell facet is on a surface, the vector is equal to the index of the corresponding polygon. More...
 

Static Private Attributes

static const std::string region_att_name
 
static const std::string cell_region_att_name
 

Friends

class GeoModelMeshBase< DIMENSION >
 
class GeoModelMesh< DIMENSION >
 

Additional Inherited Members

- 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 inherited from RINGMesh::GeoModelMeshCommon< DIMENSION >
GeoModelMesh< DIMENSION > & gmm_
 Attached GeoModelMesh. More...
 
GeoModel< DIMENSION > & geomodel_
 Attached GeoModel. More...
 
MeshBase< DIMENSION > * mesh_base_
 Attached MeshBase. More...
 

Detailed Description

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

Definition at line 1055 of file geomodel_mesh.h.

Member Typedef Documentation

◆ action_on_surface

template<index_t DIMENSION>
using RINGMesh::GeoModelMeshCells< DIMENSION >::action_on_surface = std::pair< index_t, ActionOnSurface >
private

Action to do according a surface index.

Definition at line 1423 of file geomodel_mesh.h.

Member Enumeration Documentation

◆ ActionOnSurface

template<index_t DIMENSION>
enum RINGMesh::GeoModelMeshCells::ActionOnSurface
private

enum to characterize the action to do concerning a surface Action concerns the vertices of a Surface and not the Surface

Enumerator
SKIP 

do nothing

TO_PROCESS 

need to be duplicated (don't know which side yet)

NEG_SIDE 

need to duplicate the side opposite to the facet normal

POS_SIDE 

need to duplicate the side following the facet normal

Definition at line 1411 of file geomodel_mesh.h.

◆ DuplicateMode

template<index_t DIMENSION>
enum RINGMesh::GeoModelMeshCells::DuplicateMode

Several modes for vertex duplication algorithm:

  • NONE = no duplication
  • FAULT = duplication along faults
  • HORIZON = duplication along horizons
  • ALL = duplication along faults and horizons
Enumerator
NONE 
FAULT 
HORIZON 
ALL 

Definition at line 1072 of file geomodel_mesh.h.

Constructor & Destructor Documentation

◆ GeoModelMeshCells()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshCells< DIMENSION >::GeoModelMeshCells ( GeoModelMesh< DIMENSION > &  gmm,
GeoModel< DIMENSION > &  gm,
std::unique_ptr< VolumeMesh< DIMENSION > > &  mesh 
)

Definition at line 846 of file geomodel_mesh.cpp.

Member Function Documentation

◆ aabb()

template<index_t DIMENSION>
const VolumeAABBTree< DIMENSION > & RINGMesh::GeoModelMeshCells< DIMENSION >::aabb ( ) const

return the AABB tree for the cells of the mesh

Definition at line 1811 of file geomodel_mesh.cpp.

◆ adjacent()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::adjacent ( index_t  cell,
index_t  facet 
) const

Get the adjacent cell index in the GeoModelMesh

Parameters
[in]cellthe cell index
[in]facetthe facet index
Returns
the adjacent cell index

Definition at line 1134 of file geomodel_mesh.cpp.

◆ are_corners_to_duplicate()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshCells< DIMENSION >::are_corners_to_duplicate ( const std::vector< action_on_surface > &  surfaces,
std::vector< ActionOnSurface > &  info 
)
private

Determine the actions to do according the action_on_surfaces encountered during the propagation around a vertex (initialize())

Parameters
[in]surfacesthe action_on_surfaces encountered
[in,out]infothe global information on what to do for each surface. This information is updated in this function according the encountered action_on_surfaces
Returns
true if the corners should be duplicated

Definition at line 1597 of file geomodel_mesh.cpp.

◆ attribute_manager()

template<index_t DIMENSION>
GEO::AttributesManager& RINGMesh::GeoModelMeshCells< DIMENSION >::attribute_manager ( ) const
inline

Definition at line 1084 of file geomodel_mesh.h.

◆ barycenter()

template<index_t DIMENSION>
vec3 RINGMesh::GeoModelMeshCells< DIMENSION >::barycenter ( index_t  cell) const

Get the center of the given cell

Parameters
[in]cellthe cell index

Definition at line 1796 of file geomodel_mesh.cpp.

◆ cell()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::cell ( index_t  region,
index_t  cell,
CellType  type = CellType::UNDEFINED 
) const

Get the cell index in the GeoModelMesh

Parameters
[in]regionthe region index owing the cell
[in]cellthe cell index varying from 0 to number of cells of type type in the region region.
Warning
cell is NOT a cell id of the region region, It is cellth cell of type type in the internal storage of the GeoModelMeshCells (see GeoModelMeshCells::region_cell_ptr_).
Note
to find the cell id of the GeoModelMeshCells from a region and a cell id of this region, you need to perform a search using NNSearch and the barycenter of the cell for instance.
Parameters
[in]typeit can specify the cell type used. For example, if type = HEXAEDRON then cell represents the cellth hex in the region region and cell can vary from 0 to nb_hex( r ). If type is CellType::UNDEFINED, all the cell types are taken into account.
Returns
the cell index

Definition at line 1226 of file geomodel_mesh.cpp.

◆ cell_facet_nn_search()

template<index_t DIMENSION>
const NNSearch< DIMENSION >& RINGMesh::GeoModelMeshCells< DIMENSION >::cell_facet_nn_search ( ) const
inline

Definition at line 1397 of file geomodel_mesh.h.

◆ cell_nn_search()

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

Definition at line 1392 of file geomodel_mesh.h.

◆ clear()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::clear ( )

Clear the mesh cells

Definition at line 1723 of file geomodel_mesh.cpp.

◆ clear_cell_data()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::clear_cell_data ( )
private

Clear cell_id; region_id and polygon id_

Definition at line 1052 of file geomodel_mesh.cpp.

◆ clear_duplication()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::clear_duplication ( )

Remove the duplication of the mesh cell facets

Definition at line 1740 of file geomodel_mesh.cpp.

◆ connector()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::connector ( index_t  region,
index_t  connector 
) const

Get the cell index in the GeoModelMesh corresponding to the asked connector in the region

Parameters
[in]regionthe region index
[in]connectorthe connectorth connector index varying from 0 to nb_connector( r )
Returns
the cell index

Definition at line 1390 of file geomodel_mesh.cpp.

◆ duplicated_corner_index()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::duplicated_corner_index ( const ElementLocalVertex cell_local_vertex) const

Check if the corner in a cell is duplicated, if so give the duplicated vertex index

Parameters
[in]cthe cell index in the GeoModelMesh
[in]vertexthe local vertex index in the cell c (0 to nb_vertices( c ))
Returns
the duplicated vertex index (0 to nb_duplicated_vertices()) if the corner is duplicated, else NO_ID.

Definition at line 1696 of file geomodel_mesh.cpp.

◆ duplicated_vertex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::duplicated_vertex ( index_t  duplicate_vertex_index) const

Get the vertex index in the GeoModelMesh corresponding to the given duplicated vertex index

Parameters
[in]duplicate_vertex_indexthe duplicated vertex index
Returns
the vertex index

Definition at line 1713 of file geomodel_mesh.cpp.

◆ edge_vertex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::edge_vertex ( index_t  cell,
index_t  local_edge,
index_t  local_vertex 
) const

Gets a cell vertex by local edge index and local vertex index in the edge.

Parameters
[in]cellthe cell, in 0..nb()-1
[in]local_edgethe local edge index, in 0..nb_edges(c)-1
[in]local_vertexthe local index in the edge, one of 0,1
Returns
vertex local_vertex of edge local_edge in cell c

Definition at line 1125 of file geomodel_mesh.cpp.

◆ facet_vertex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::facet_vertex ( const CellLocalFacet cell_local_facet,
index_t  local_vertex 
) const

Gets a cell vertex by local facet index and local vertex index in the edge.

Parameters
[in]cell_local_facetthe local facet in a cell
[in]local_vertexthe local index in the cell facet
Returns
vertex lv of facet lf in cell c

Definition at line 1114 of file geomodel_mesh.cpp.

◆ hex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::hex ( index_t  region,
index_t  hex 
) const

Get the cell index in the GeoModelMesh corresponding to the asked hex in the region

Parameters
[in]regionthe region index
[in]hexthe hexth hex index varying from 0 to nb_hex( region )
Returns
the cell index

Definition at line 1302 of file geomodel_mesh.cpp.

◆ index_in_region()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::index_in_region ( index_t  cell) const

Get the cell index in the GeoModelMesh restricted to the region owing the cell

Parameters
[in]cellthe cell index
Returns
the cell index varying from 0 to nb_cells in the region owing cell

Definition at line 1152 of file geomodel_mesh.cpp.

◆ initialize()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::initialize ( )
private

Initialize the cells from the cells of the GeoModel Region cells.

Definition at line 871 of file geomodel_mesh.cpp.

◆ initialize_cell_facet()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::initialize_cell_facet ( )
private

Initialize the mesh cell facet vector of colocalised facet.

Definition at line 1771 of file geomodel_mesh.cpp.

◆ initialize_duplication()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::initialize_duplication ( )
private

Duplicate the mesh cell along some surfaces defined by the duplication mode

  1. Get all the corner vertices (a lot of duplicated vertices)
  2. Tag all corners to duplicate (vertices on a surface to duplicate)
  3. Duplicate the corners

Definition at line 1417 of file geomodel_mesh.cpp.

◆ is_cell_facet_on_surface()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshCells< DIMENSION >::is_cell_facet_on_surface ( index_t  cell,
index_t  facet_index,
index_t &  colocated_facet_index,
bool side 
) const

Determine if a cell facet is on a surface. If so, fill the action with the surface index and the surface side encountered

Parameters
[in]cellthe cell index
[in]facetthe facet index
[out]colocated_facet_indexthe facet index colocalised with the cell facet
[out]sidethe side of the facet facet. true = side of the facet normal, false = the other side
Returns
true is the cell facet is on a surface

Definition at line 1582 of file geomodel_mesh.cpp.

◆ is_duplication_initialized()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshCells< DIMENSION >::is_duplication_initialized ( ) const

Test if the mesh cells are duplicated

Definition at line 1401 of file geomodel_mesh.cpp.

◆ is_initialized()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshCells< DIMENSION >::is_initialized ( ) const

Test if the mesh cells are initialized

Definition at line 856 of file geomodel_mesh.cpp.

◆ is_surface_to_duplicate()

template<index_t DIMENSION>
bool RINGMesh::GeoModelMeshCells< DIMENSION >::is_surface_to_duplicate ( index_t  surface) const
private

Test if we need to duplicate mesh cell along the given surface according the duplicate mode

Parameters
[in]sthe surface index in the GeoModel

Definition at line 1650 of file geomodel_mesh.cpp.

◆ nb()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb ( ) const

Number of cells stored.

Definition at line 1060 of file geomodel_mesh.cpp.

◆ nb_cells() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_cells ( CellType  type = CellType::UNDEFINED) const

Get the number of cells of the corresponding type

Parameters
[in]typethe corresponding type
Returns
the number of cells

Definition at line 1168 of file geomodel_mesh.cpp.

◆ nb_cells() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_cells ( index_t  region,
CellType  type = CellType::UNDEFINED 
) const

Get the number of cells of the corresponding type in the given region of the GeoModel

Parameters
[in]regionthe region index
[in]typethe corresponding type
Returns
the number of cells

Definition at line 1192 of file geomodel_mesh.cpp.

◆ nb_connector() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_connector ( ) const

Get the number of connectors in the GeoModelMesh

Returns
the number of connectors

Definition at line 1370 of file geomodel_mesh.cpp.

◆ nb_connector() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_connector ( index_t  region) const

Get the number of connectors in the given region

Parameters
[in]regionthe region index
Returns
the number of connectors

Definition at line 1377 of file geomodel_mesh.cpp.

◆ nb_duplicated_vertices()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_duplicated_vertices ( ) const

Gets the number of duplicated points by the DuplicateMode algorithm

Returns
the corresponding number of duplications

Definition at line 1683 of file geomodel_mesh.cpp.

◆ nb_edges()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_edges ( index_t  cell) const

Get the number of edges in the cell

Parameters
[in]cellthe cell index

Definition at line 1087 of file geomodel_mesh.cpp.

◆ nb_facet_vertices()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_facet_vertices ( const CellLocalFacet cell_local_facet) const

Get the number of facets in the cell

Definition at line 1103 of file geomodel_mesh.cpp.

◆ nb_facets()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_facets ( index_t  cell) const

Get the number of facets in the cell

Parameters
[in]cellthe cell index

Definition at line 1095 of file geomodel_mesh.cpp.

◆ nb_hex() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_hex ( ) const

Get the number of hexs in the GeoModelMesh

Returns
the number of hexs

Definition at line 1283 of file geomodel_mesh.cpp.

◆ nb_hex() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_hex ( index_t  region) const

Get the number of hexs in the given region

Parameters
[in]regionthe region index
Returns
the number of hexs

Definition at line 1290 of file geomodel_mesh.cpp.

◆ nb_prism() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_prism ( ) const

Get the number of prisms in the GeoModelMesh

Returns
the number of prisms

Definition at line 1312 of file geomodel_mesh.cpp.

◆ nb_prism() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_prism ( index_t  region) const

Get the number of prisms in the given region

Parameters
[in]regionthe region index
Returns
the number of prisms

Definition at line 1319 of file geomodel_mesh.cpp.

◆ nb_pyramid() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_pyramid ( ) const

Get the number of pyramids in the GeoModelMesh

Returns
the number of pyramids

Definition at line 1340 of file geomodel_mesh.cpp.

◆ nb_pyramid() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_pyramid ( index_t  region) const

Get the number of pyramids in the given region

Parameters
[in]regionthe region index
Returns
the number of pyramids

Definition at line 1347 of file geomodel_mesh.cpp.

◆ nb_tet() [1/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_tet ( ) const

Get the number of tets in the GeoModelMesh

Returns
the number of tets

Definition at line 1253 of file geomodel_mesh.cpp.

◆ nb_tet() [2/2]

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_tet ( index_t  region) const

Get the number of tets in the given region

Parameters
[in]rthe region index
Returns
the number of tets

Definition at line 1260 of file geomodel_mesh.cpp.

◆ nb_total_vertices()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_total_vertices ( ) const

Gets the total number of vertices (mesh.vertices.nb() + nb_duplicated_vertices())

Returns
the corresponding number of vertices

Definition at line 1690 of file geomodel_mesh.cpp.

◆ nb_vertices()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_vertices ( index_t  cell) const

Get the number of vertices in the cell

Parameters
[in]cthe cell index
Returns
the number of vertices

Definition at line 1067 of file geomodel_mesh.cpp.

◆ prism()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::prism ( index_t  region,
index_t  prism 
) const

Get the cell index in the GeoModelMesh corresponding to the asked prism in the region

Parameters
[in]regionthe region index
[in]prismthe prismth prism index varying from 0 to nb_prism( region )
Returns
the cell index

Definition at line 1330 of file geomodel_mesh.cpp.

◆ pyramid()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::pyramid ( index_t  region,
index_t  pyramid 
) const

Get the cell index in the GeoModelMesh corresponding to the asked pyramid in the region

Parameters
[in]rthe region index
[in]pthe pth pyramid index varying from 0 to nb_pyramid( r )
Returns
the cell index

Definition at line 1359 of file geomodel_mesh.cpp.

◆ region()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::region ( index_t  cell) const

Get the region index in the GeoModel according the cell index in the GeoModelMesh

Parameters
[in]cellthe cell index
Returns
the region index

Definition at line 1144 of file geomodel_mesh.cpp.

◆ resize_cell_data()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::resize_cell_data ( )
private

Resize region_id and cell_id

Definition at line 1045 of file geomodel_mesh.cpp.

◆ sort_cells()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::sort_cells ( )
private

Definition at line 1026 of file geomodel_mesh.cpp.

◆ test_and_initialize()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::test_and_initialize ( ) const

Test if the mesh cells need to be initialized, if so initialize them.

Definition at line 862 of file geomodel_mesh.cpp.

◆ test_and_initialize_cell_facet()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::test_and_initialize_cell_facet ( ) const
private

Test if the mesh cell facet vector is filled with the colocalised facet. If not fill it.

Definition at line 1762 of file geomodel_mesh.cpp.

◆ test_and_initialize_duplication()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshCells< DIMENSION >::test_and_initialize_duplication ( ) const
private

Test if the mesh cell are duplicated according the duplication mode, if not duplicate them.

Definition at line 1407 of file geomodel_mesh.cpp.

◆ tet()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::tet ( index_t  region,
index_t  tet 
) const

Get the cell index in the GeoModelMesh corresponding to the asked tet in the region

Parameters
[in]regionthe region index
[in]tetthe tetth tet index varying from 0 to nb_tet( region )
Returns
the cell index

Definition at line 1273 of file geomodel_mesh.cpp.

◆ type()

template<index_t DIMENSION>
CellType RINGMesh::GeoModelMeshCells< DIMENSION >::type ( index_t  cell) const

Get the cell index in the GeoModelMesh restricted to the region owing the cell and its type

Parameters
[in]cellthe cell index
[out]indexthe cell index varying from 0 to nb_cells of the corresponding type of c in the owing region
Returns
the type of the cell c

Definition at line 1160 of file geomodel_mesh.cpp.

◆ vertex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::vertex ( const ElementLocalVertex cell_local_vertex) const

Get the vertex index of a vertex in a cell in the GeoModelMesh

Parameters
[in]cthe cell index
[in]vertexthe local vertex index [0, nb_vertices_in_cell[
Returns
the vertex index

Definition at line 1075 of file geomodel_mesh.cpp.

◆ volume()

template<index_t DIMENSION>
double RINGMesh::GeoModelMeshCells< DIMENSION >::volume ( index_t  cell) const

Get the volume of the cell

Parameters
[in]cellthe cell index

Definition at line 1803 of file geomodel_mesh.cpp.

Friends And Related Function Documentation

◆ GeoModelMesh< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelMesh< DIMENSION >
friend

Definition at line 1063 of file geomodel_mesh.h.

◆ GeoModelMeshBase< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelMeshBase< DIMENSION >
friend

Definition at line 1062 of file geomodel_mesh.h.

Member Data Documentation

◆ cell_id_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshCells< DIMENSION >::cell_id_
private

Vector storing the cell index in region per cell.

Definition at line 1489 of file geomodel_mesh.h.

◆ cell_region_att_name

template<index_t DIMENSION>
const std::string RINGMesh::GeoModelMeshCells< DIMENSION >::cell_region_att_name
staticprivate

Definition at line 1059 of file geomodel_mesh.h.

◆ duplicated_vertex_indices_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshCells< DIMENSION >::duplicated_vertex_indices_
private

Vector of duplicated vertices.

Each value is a duplicated vertex, the index corresponds to vertex index in mesh.vertices.

Definition at line 1519 of file geomodel_mesh.h.

◆ mesh_

template<index_t DIMENSION>
std::unique_ptr< VolumeMesh< DIMENSION > >& RINGMesh::GeoModelMeshCells< DIMENSION >::mesh_
private

Attached Mesh.

Definition at line 1484 of file geomodel_mesh.h.

◆ mode_

template<index_t DIMENSION>
DuplicateMode RINGMesh::GeoModelMeshCells< DIMENSION >::mode_ { NONE }
private

Current duplicate mode applied on the mesh.

Definition at line 1513 of file geomodel_mesh.h.

◆ nb_connectors_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_connectors_ { 0 }
private

Number of connector in the GeoModelMesh.

Definition at line 1510 of file geomodel_mesh.h.

◆ nb_hexs_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_hexs_ { 0 }
private

Number of hex in the GeoModelMesh.

Definition at line 1504 of file geomodel_mesh.h.

◆ nb_prisms_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_prisms_ { 0 }
private

Number of prism in the GeoModelMesh.

Definition at line 1506 of file geomodel_mesh.h.

◆ nb_pyramids_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_pyramids_ { 0 }
private

Number of pyramid in the GeoModelMesh.

Definition at line 1508 of file geomodel_mesh.h.

◆ nb_tets_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshCells< DIMENSION >::nb_tets_ { 0 }
private

Number of tet in the GeoModelMesh.

Definition at line 1502 of file geomodel_mesh.h.

◆ polygon_id_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshCells< DIMENSION >::polygon_id_
private

Vector storing the colocalised polygon index per cell facet If a cell facet is on a surface, the vector is equal to the index of the corresponding polygon.

Definition at line 1526 of file geomodel_mesh.h.

◆ region_att_name

template<index_t DIMENSION>
const std::string RINGMesh::GeoModelMeshCells< DIMENSION >::region_att_name
staticprivate

Definition at line 1058 of file geomodel_mesh.h.

◆ region_cell_ptr_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshCells< DIMENSION >::region_cell_ptr_
private

Vector storing the index of the starting cell index for a given region and a given cell type. For example: the 2nd hex index of the region index R will be found here: surface_polygon_ptr_[CellType::UNDEFINED*R + CellType::HEXAEDRON]

  • 2

Definition at line 1499 of file geomodel_mesh.h.

◆ region_id_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshCells< DIMENSION >::region_id_
private

Vector storing the region index per cell.

Definition at line 1487 of file geomodel_mesh.h.


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