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

#include <geomodel_mesh.h>

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

Public Member Functions

virtual ~GeoModelMeshEdges ()
 
GEO::AttributesManager & attribute_manager () const
 
bool is_initialized () const
 
void test_and_initialize () const
 
index_t nb () const
 Number of edges stored. More...
 
index_t vertex (const ElementLocalVertex &edge_local_vertex) const
 
index_t line (index_t edge) const
 
index_t index_in_line (index_t edge) const
 
index_t nb_edges (index_t line) const
 
index_t edge (index_t line, index_t edge) const
 
void clear ()
 
vecn< DIMENSION > center (index_t edge) const
 
double length (index_t edge) const
 
const NNSearch< DIMENSION > & nn_search () const
 
const LineAABBTree< DIMENSION > & aabb () const
 return the AABB tree for the edges of the mesh More...
 

Protected Member Functions

 GeoModelMeshEdges (GeoModelMesh< DIMENSION > &gmm, GeoModel< DIMENSION > &gm, std::unique_ptr< LineMesh< DIMENSION > > &mesh)
 
- 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< LineMesh< DIMENSION > > & mesh_
 Attached Mesh. More...
 
std::vector< index_t > line_id_
 Vector storing the line index per edge. More...
 
std::vector< index_t > edge_id_
 Vector storing the edge index in line per edge. More...
 
std::vector< index_t > line_edge_ptr_
 
index_t nb_edges_ { 0 }
 Number of edges in the GeoModelMesh. 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

 ringmesh_disable_copy_and_move (GeoModelMeshEdges)
 
void initialize ()
 
void resize_edge_data ()
 
void clear_edge_data ()
 

Static Private Attributes

static const std::string line_att_name = "line"
 
static const std::string edge_line_att_name
 

Friends

class GeoModelMeshBase< DIMENSION >
 
class GeoModelMesh< DIMENSION >
 

Detailed Description

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

Definition at line 836 of file geomodel_mesh.h.

Constructor & Destructor Documentation

◆ ~GeoModelMeshEdges()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshEdges< DIMENSION >::~GeoModelMeshEdges ( )
virtual

Definition at line 1835 of file geomodel_mesh.cpp.

◆ GeoModelMeshEdges()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshEdges< DIMENSION >::GeoModelMeshEdges ( GeoModelMesh< DIMENSION > &  gmm,
GeoModel< DIMENSION > &  gm,
std::unique_ptr< LineMesh< DIMENSION > > &  mesh 
)
protected

Definition at line 1825 of file geomodel_mesh.cpp.

Member Function Documentation

◆ aabb()

template<index_t DIMENSION>
const LineAABBTree< DIMENSION > & RINGMesh::GeoModelMeshEdges< DIMENSION >::aabb ( ) const

return the AABB tree for the edges of the mesh

Definition at line 1990 of file geomodel_mesh.cpp.

◆ attribute_manager()

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

Definition at line 849 of file geomodel_mesh.h.

◆ center()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::GeoModelMeshEdges< DIMENSION >::center ( index_t  edge) const

Get the center of the given edge

Parameters
[in]pthe edge index

Definition at line 1975 of file geomodel_mesh.cpp.

◆ clear()

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

Clear the edges of the GeoModelMesh

Definition at line 1910 of file geomodel_mesh.cpp.

◆ clear_edge_data()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshEdges< DIMENSION >::clear_edge_data ( )
private

Clear edge data: line_id_ and edge_id_

Definition at line 1848 of file geomodel_mesh.cpp.

◆ edge()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::edge ( index_t  line,
index_t  edge 
) const

Get the edge index in the GeoModelMesh corresponding to the asked edge in the line

Parameters
[in]lthe line index
[in]edgethe eth edge index varying from 0 to nb_edges( l )
Returns
the edge index

Definition at line 1902 of file geomodel_mesh.cpp.

◆ index_in_line()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::index_in_line ( index_t  edge) const

Get the edge index in the GeoModelMesh restricted to the line owing the edge

Parameters
[in]edgethe edge index
Returns
the edge index varying from 0 to nb_edge() in the line owing e

Definition at line 1886 of file geomodel_mesh.cpp.

◆ initialize()

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

Initialize the edges of the GeoModelMesh and sort them per line Example for a mesh with two lines [EDGE, EDGE, ... ,EDGE , EDGE, EDGE, ... , EDGE] | line 0 | line 1 |

Definition at line 1929 of file geomodel_mesh.cpp.

◆ is_initialized()

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

Test if the mesh edges are initialized

Definition at line 1855 of file geomodel_mesh.cpp.

◆ length()

template<index_t DIMENSION>
double RINGMesh::GeoModelMeshEdges< DIMENSION >::length ( index_t  edge) const

Get the length of the edge

Parameters
[in]pthe edge index

Definition at line 1982 of file geomodel_mesh.cpp.

◆ line()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::line ( index_t  edge) const

Get the line index in the GeoModel according the edge index in the GeoModelMesh

Parameters
[in]edgethe edge index
Returns
the line index

Definition at line 1878 of file geomodel_mesh.cpp.

◆ nb()

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

Number of edges stored.

Definition at line 1861 of file geomodel_mesh.cpp.

◆ nb_edges()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::nb_edges ( index_t  line) const

Get the number of edges in the given line

Parameters
[in]edgethe edge index
Returns
the number of edges

Definition at line 1894 of file geomodel_mesh.cpp.

◆ nn_search()

template<index_t DIMENSION>
const NNSearch< DIMENSION >& RINGMesh::GeoModelMeshEdges< DIMENSION >::nn_search ( ) const
inline

Definition at line 920 of file geomodel_mesh.h.

◆ resize_edge_data()

template<index_t DIMENSION>
void RINGMesh::GeoModelMeshEdges< DIMENSION >::resize_edge_data ( )
private

Resize edge data: line_id_ and edge_id_

Definition at line 1841 of file geomodel_mesh.cpp.

◆ ringmesh_disable_copy_and_move()

template<index_t DIMENSION>
RINGMesh::GeoModelMeshEdges< DIMENSION >::ringmesh_disable_copy_and_move ( GeoModelMeshEdges< DIMENSION >  )
private

◆ test_and_initialize()

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

Definition at line 1920 of file geomodel_mesh.cpp.

◆ vertex()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::vertex ( const ElementLocalVertex edge_local_vertex) const

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

Parameters
[in]edgethe edge index
[in]vertexthe local vertex index
Returns
the vertex index

Definition at line 1868 of file geomodel_mesh.cpp.

Friends And Related Function Documentation

◆ GeoModelMesh< DIMENSION >

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

Definition at line 845 of file geomodel_mesh.h.

◆ GeoModelMeshBase< DIMENSION >

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

Definition at line 844 of file geomodel_mesh.h.

Member Data Documentation

◆ edge_id_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshEdges< DIMENSION >::edge_id_
protected

Vector storing the edge index in line per edge.

Definition at line 961 of file geomodel_mesh.h.

◆ edge_line_att_name

template<index_t DIMENSION>
const std::string RINGMesh::GeoModelMeshEdges< DIMENSION >::edge_line_att_name
staticprivate
Initial value:
=
"edge_line"

Definition at line 841 of file geomodel_mesh.h.

◆ line_att_name

template<index_t DIMENSION>
const std::string RINGMesh::GeoModelMeshEdges< DIMENSION >::line_att_name = "line"
staticprivate

Definition at line 840 of file geomodel_mesh.h.

◆ line_edge_ptr_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshEdges< DIMENSION >::line_edge_ptr_
protected

Vector storing the index of the starting edge index for a given line and a given edge type. For example: the 2nd edge index of the line index L will be found here: line_edge_ptr_[L] + 2

Definition at line 970 of file geomodel_mesh.h.

◆ line_id_

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::GeoModelMeshEdges< DIMENSION >::line_id_
protected

Vector storing the line index per edge.

Definition at line 959 of file geomodel_mesh.h.

◆ mesh_

template<index_t DIMENSION>
std::unique_ptr< LineMesh< DIMENSION > >& RINGMesh::GeoModelMeshEdges< DIMENSION >::mesh_
protected

Attached Mesh.

Definition at line 956 of file geomodel_mesh.h.

◆ nb_edges_

template<index_t DIMENSION>
index_t RINGMesh::GeoModelMeshEdges< DIMENSION >::nb_edges_ { 0 }
protected

Number of edges in the GeoModelMesh.

Definition at line 973 of file geomodel_mesh.h.


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