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

#include <mesh.h>

Inheritance diagram for RINGMesh::VolumeMesh< DIMENSION >:
RINGMesh::MeshBase< DIMENSION > RINGMesh::GeogramVolumeMesh< DIMENSION >

Public Member Functions

virtual index_t cell_vertex (const ElementLocalVertex &cell_local_vertex) const =0
 Gets a vertex index by cell and local vertex index. More...
 
virtual index_t cell_edge_vertex (index_t cell_id, index_t edge_id, index_t vertex_id) const =0
 Gets a vertex index by cell and local edge and local vertex index. More...
 
virtual index_t cell_facet_vertex (const CellLocalFacet &cell_local_facet, index_t vertex_id) const =0
 Gets a vertex by cell facet and local vertex index. More...
 
virtual index_t cell_facet (const CellLocalFacet &cell_local_facet) const =0
 Gets a facet index by cell and local facet index. More...
 
double cell_edge_length (index_t cell_id, index_t edge_id) const
 
vecn< DIMENSION > cell_edge_barycenter (index_t cell_id, index_t edge_id) const
 
virtual index_t nb_cell_facets (index_t cell_id) const =0
 Gets the number of facet in a cell. More...
 
virtual index_t nb_cell_facets () const =0
 Gets the total number of facet in a all cells. More...
 
virtual index_t nb_cell_edges (index_t cell_id) const =0
 Gets the number of edges in a cell. More...
 
virtual index_t nb_cell_facet_vertices (const CellLocalFacet &cell_local_facet) const =0
 Gets the number of vertices of a facet in a cell. More...
 
virtual index_t nb_cell_vertices (index_t cell_id) const =0
 Gets the number of vertices of a cell. More...
 
virtual index_t nb_cells () const =0
 Gets the number of cells in the Mesh. More...
 
virtual index_t cell_begin (index_t cell_id) const =0
 
virtual index_t cell_end (index_t cell_id) const =0
 
virtual index_t cell_adjacent (const CellLocalFacet &cell_local_facet) const =0
 
virtual GEO::AttributesManager & cell_attribute_manager () const =0
 
virtual GEO::AttributesManager & cell_facet_attribute_manager () const =0
 
virtual CellType cell_type (index_t cell_id) const =0
 Gets the type of a cell. More...
 
virtual bool cells_are_simplicies () const =0
 Tests whether all the cells are tetrahedra. When all the cells are tetrahedra, storage and access is optimized. More...
 
vecn< DIMENSION > cell_facet_barycenter (const CellLocalFacet &cell_local_facet) const
 
vecn< DIMENSION > cell_barycenter (index_t cell_id) const
 
vecn< DIMENSION > cell_facet_normal (const CellLocalFacet &cell_local_facet) const
 
virtual double cell_volume (index_t cell_id) const =0
 compute the volume of the cell More...
 
std::vector< index_t > cells_around_vertex (index_t vertex_id, index_t cell_hint) const
 
index_t find_cell_corner (index_t cell_id, index_t vertex_id) const
 
bool find_cell_from_colocated_vertex_within_distance_if_any (const vecn< DIMENSION > &vertex_vec, double distance, index_t &cell_id, index_t &cell_vertex_id) const
 
const NNSearch< DIMENSION > & cell_facet_nn_search () const
 return the NNSearch at cell facets More...
 
const NNSearch< DIMENSION > & cell_nn_search () const
 return the NNSearch at cells More...
 
const VolumeAABBTree< DIMENSION > & cell_aabb () const
 Creates an AABB tree for a Mesh cells. More...
 
bool is_mesh_valid () const override
 
std::tuple< index_t, std::vector< index_t > > connected_components () const final
 
- Public Member Functions inherited from RINGMesh::MeshBase< DIMENSION >
virtual ~MeshBase ()=default
 
virtual void save_mesh (const std::string &filename) const =0
 
virtual void print_mesh_bounded_attributes () const =0
 
virtual const vecn< DIMENSION > & vertex (index_t v_id) const =0
 Gets a point. More...
 
virtual index_t nb_vertices () const =0
 
virtual GEO::AttributesManager & vertex_attribute_manager () const =0
 
const NNSearch< DIMENSION > & vertex_nn_search () const
 return the NNSearch at vertices More...
 
virtual MeshType type_name () const =0
 
virtual std::string default_extension () const =0
 

Static Public Member Functions

static std::unique_ptr< VolumeMesh< DIMENSION > > create_mesh (const MeshType type="")
 

Protected Member Functions

 VolumeMesh ()=default
 
- Protected Member Functions inherited from RINGMesh::MeshBase< DIMENSION >
 MeshBase ()=default
 

Protected Attributes

std::unique_ptr< NNSearch< DIMENSION > > cell_facet_nn_search_ {}
 
std::unique_ptr< NNSearch< DIMENSION > > cell_nn_search_ {}
 
std::unique_ptr< VolumeAABBTree< DIMENSION > > cell_aabb_ {}
 
- Protected Attributes inherited from RINGMesh::MeshBase< DIMENSION >
std::unique_ptr< NNSearch< DIMENSION > > vertex_nn_search_ {}
 

Private Member Functions

 ringmesh_template_assert_3d (DIMENSION)
 

Friends

class VolumeMeshBuilder< DIMENSION >
 

Detailed Description

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

class for encapsulating volume mesh component

Definition at line 851 of file mesh.h.

Constructor & Destructor Documentation

◆ VolumeMesh()

template<index_t DIMENSION>
RINGMesh::VolumeMesh< DIMENSION >::VolumeMesh ( )
protecteddefault

Member Function Documentation

◆ cell_aabb()

template<index_t DIMENSION>
const VolumeAABBTree< DIMENSION >& RINGMesh::VolumeMesh< DIMENSION >::cell_aabb ( ) const
inline

Creates an AABB tree for a Mesh cells.

Definition at line 1135 of file mesh.h.

◆ cell_adjacent()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_adjacent ( const CellLocalFacet cell_local_facet) const
pure virtual
Returns
the index of the adjacent cell of
Parameters
cell_local_facet

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_attribute_manager()

template<index_t DIMENSION>
virtual GEO::AttributesManager& RINGMesh::VolumeMesh< DIMENSION >::cell_attribute_manager ( ) const
pure virtual

◆ cell_barycenter()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::VolumeMesh< DIMENSION >::cell_barycenter ( index_t  cell_id) const
inline

Compute the non weighted barycenter of the

Parameters
cell_id

Definition at line 1027 of file mesh.h.

◆ cell_begin()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_begin ( index_t  cell_id) const
pure virtual

◆ cell_edge_barycenter()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::VolumeMesh< DIMENSION >::cell_edge_barycenter ( index_t  cell_id,
index_t  edge_id 
) const
inline

Computes the Mesh cell edge barycenter

Parameters
[in]cell_idthe facet index
[in]edge_idthe edge index
Returns
the cell edge center

Definition at line 926 of file mesh.h.

◆ cell_edge_length()

template<index_t DIMENSION>
double RINGMesh::VolumeMesh< DIMENSION >::cell_edge_length ( index_t  cell_id,
index_t  edge_id 
) const
inline

Computes the Mesh cell edge length

Parameters
[in]cell_idthe facet index
[in]edge_idthe edge index
Returns
the cell edge length

Definition at line 911 of file mesh.h.

◆ cell_edge_vertex()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_edge_vertex ( index_t  cell_id,
index_t  edge_id,
index_t  vertex_id 
) const
pure virtual

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

Parameters
[in]cell_idthe cell index.
[in]edge_idthe local edge index in
cell_id.
[in]vertex_idthe local vertex index in
cell_id.
Returns
the global vertex index. vertex_id<number of vertices of the cell.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_end()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_end ( index_t  cell_id) const
pure virtual

◆ cell_facet()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_facet ( const CellLocalFacet cell_local_facet) const
pure virtual

Gets a facet index by cell and local facet index.

Parameters
[in]cell_local_facetindex of the cell and the local index of the facet in the cell
Returns
the global facet index.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_facet_attribute_manager()

template<index_t DIMENSION>
virtual GEO::AttributesManager& RINGMesh::VolumeMesh< DIMENSION >::cell_facet_attribute_manager ( ) const
pure virtual

◆ cell_facet_barycenter()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::VolumeMesh< DIMENSION >::cell_facet_barycenter ( const CellLocalFacet cell_local_facet) const
inline

Computes the Mesh cell facet barycenter

Parameters
[in]cell_local_facetthe cell index and the local facet index in the cell
Returns
the cell facet center

Definition at line 1010 of file mesh.h.

◆ cell_facet_nn_search()

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

return the NNSearch at cell facets

Warning
the NNSearch is destroyed when calling the Mesh::facets_aabb() and Mesh::cells_aabb()

Definition at line 1094 of file mesh.h.

◆ cell_facet_normal()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::VolumeMesh< DIMENSION >::cell_facet_normal ( const CellLocalFacet cell_local_facet) const
inline

Computes the Mesh cell facet normal

Parameters
[in]cell_local_facetthe cell index and the local facet index in the cell
Returns
the cell facet normal

Definition at line 1044 of file mesh.h.

◆ cell_facet_vertex()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_facet_vertex ( const CellLocalFacet cell_local_facet,
index_t  vertex_id 
) const
pure virtual

Gets a vertex by cell facet and local vertex index.

Parameters
[in]cell_local_facetindex of the cell and the local index of the facet in the cell
[in]vertex_idindex of the vertex in the facet
facet_id
Returns
the global vertex index. vertex_id < number of vertices in the facet
Parameters
facet_idand facet_id number of facet in th cell
cell_id

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_nn_search()

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

return the NNSearch at cells

Definition at line 1118 of file mesh.h.

◆ cell_type()

template<index_t DIMENSION>
virtual CellType RINGMesh::VolumeMesh< DIMENSION >::cell_type ( index_t  cell_id) const
pure virtual

Gets the type of a cell.

Parameters
[in]cell_idthe cell index, in 0..nb()-1

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_vertex()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::cell_vertex ( const ElementLocalVertex cell_local_vertex) const
pure virtual

Gets a vertex index by cell and local vertex index.

Parameters
[in]cell_idthe cell index.
[in]vertex_idthe local vertex index in
cell_id.
Returns
the global vertex index. vertex_id<number of vertices of the cell.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cell_volume()

template<index_t DIMENSION>
virtual double RINGMesh::VolumeMesh< DIMENSION >::cell_volume ( index_t  cell_id) const
pure virtual

compute the volume of the cell

Parameters
cell_id.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cells_are_simplicies()

template<index_t DIMENSION>
virtual bool RINGMesh::VolumeMesh< DIMENSION >::cells_are_simplicies ( ) const
pure virtual

Tests whether all the cells are tetrahedra. When all the cells are tetrahedra, storage and access is optimized.

Returns
True if all cells are tetrahedra and False otherwise.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ cells_around_vertex()

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::VolumeMesh< DIMENSION >::cells_around_vertex ( index_t  vertex_id,
index_t  cell_hint 
) const

Definition at line 636 of file mesh.cpp.

◆ connected_components()

template<index_t DIMENSION>
std::tuple< index_t, std::vector< index_t > > RINGMesh::VolumeMesh< DIMENSION >::connected_components ( ) const
finalvirtual

Implements RINGMesh::MeshBase< DIMENSION >.

Definition at line 604 of file mesh.cpp.

◆ create_mesh()

template<index_t DIMENSION>
std::unique_ptr< VolumeMesh< DIMENSION > > RINGMesh::VolumeMesh< DIMENSION >::create_mesh ( const MeshType  type = "")
static

Definition at line 582 of file mesh.cpp.

◆ find_cell_corner()

template<index_t DIMENSION>
index_t RINGMesh::VolumeMesh< DIMENSION >::find_cell_corner ( index_t  cell_id,
index_t  vertex_id 
) const
inline

Definition at line 1069 of file mesh.h.

◆ find_cell_from_colocated_vertex_within_distance_if_any()

template<index_t DIMENSION>
bool RINGMesh::VolumeMesh< DIMENSION >::find_cell_from_colocated_vertex_within_distance_if_any ( const vecn< DIMENSION > &  vertex_vec,
double  distance,
index_t &  cell_id,
index_t &  cell_vertex_id 
) const

Definition at line 711 of file mesh.cpp.

◆ is_mesh_valid()

template<index_t DIMENSION>
bool RINGMesh::VolumeMesh< DIMENSION >::is_mesh_valid ( ) const
inlineoverridevirtual

Implements RINGMesh::MeshBase< DIMENSION >.

Definition at line 1144 of file mesh.h.

◆ nb_cell_edges()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cell_edges ( index_t  cell_id) const
pure virtual

Gets the number of edges in a cell.

Parameters
[in]cell_idindex of the cell
Returns
the number of facet of the cell
Parameters
cell_id

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ nb_cell_facet_vertices()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cell_facet_vertices ( const CellLocalFacet cell_local_facet) const
pure virtual

Gets the number of vertices of a facet in a cell.

Parameters
[in]cell_local_facetindex of the cell and the local index of the facet in the cell
Returns
the number of vertices in the facet
Parameters
facet_idin the cell
cell_id

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ nb_cell_facets() [1/2]

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cell_facets ( index_t  cell_id) const
pure virtual

Gets the number of facet in a cell.

Parameters
[in]cell_idindex of the cell
Returns
the number of facet of the cell
Parameters
cell_id

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ nb_cell_facets() [2/2]

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cell_facets ( ) const
pure virtual

Gets the total number of facet in a all cells.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ nb_cell_vertices()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cell_vertices ( index_t  cell_id) const
pure virtual

Gets the number of vertices of a cell.

Parameters
[in]cell_idindex of the cell
Returns
the number of vertices in the cell
Parameters
cell_id

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ nb_cells()

template<index_t DIMENSION>
virtual index_t RINGMesh::VolumeMesh< DIMENSION >::nb_cells ( ) const
pure virtual

Gets the number of cells in the Mesh.

Implemented in RINGMesh::GeogramVolumeMesh< DIMENSION >.

◆ ringmesh_template_assert_3d()

template<index_t DIMENSION>
RINGMesh::VolumeMesh< DIMENSION >::ringmesh_template_assert_3d ( DIMENSION  )
private

Friends And Related Function Documentation

◆ VolumeMeshBuilder< DIMENSION >

template<index_t DIMENSION>
friend class VolumeMeshBuilder< DIMENSION >
friend

Definition at line 854 of file mesh.h.

Member Data Documentation

◆ cell_aabb_

template<index_t DIMENSION>
std::unique_ptr< VolumeAABBTree< DIMENSION > > RINGMesh::VolumeMesh< DIMENSION >::cell_aabb_ {}
mutableprotected

Definition at line 1189 of file mesh.h.

◆ cell_facet_nn_search_

template<index_t DIMENSION>
std::unique_ptr< NNSearch< DIMENSION > > RINGMesh::VolumeMesh< DIMENSION >::cell_facet_nn_search_ {}
mutableprotected

Definition at line 1187 of file mesh.h.

◆ cell_nn_search_

template<index_t DIMENSION>
std::unique_ptr< NNSearch< DIMENSION > > RINGMesh::VolumeMesh< DIMENSION >::cell_nn_search_ {}
mutableprotected

Definition at line 1188 of file mesh.h.


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