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

#include <mesh_builder.h>

Inheritance diagram for RINGMesh::LineMeshBuilder< DIMENSION >:
RINGMesh::MeshBaseBuilder< DIMENSION > RINGMesh::GeogramLineMeshBuilder< DIMENSION >

Public Member Functions

void create_edge (index_t v1_id, index_t v2_id)
 Create a new edge. More...
 
index_t create_edges (index_t nb_edges)
 Creates a contiguous chunk of edges. More...
 
void set_edge_vertex (const EdgeLocalVertex &edge_local_vertex, index_t vertex_id)
 Sets a vertex of a edge by local vertex index. More...
 
void delete_edges (const std::vector< bool > &to_delete, bool remove_isolated_vertices)
 Deletes a set of edges. More...
 
void clear_edges (bool keep_attributes, bool keep_memory)
 Removes all the edges and attributes. More...
 
void permute_edges (const std::vector< index_t > &permutation)
 
void remove_isolated_vertices ()
 Remove vertices not connected to any mesh element. More...
 
- Public Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
virtual ~MeshBaseBuilder ()=default
 
template<>
std::unique_ptr< MeshBaseBuilder< 2 > > RINGMESH_API create_builder (MeshBase< 2 > &mesh)
 
template<>
std::unique_ptr< MeshBaseBuilder< 3 > > RINGMESH_API create_builder (MeshBase< 3 > &mesh)
 
void copy (const MeshBase< DIMENSION > &rhs, bool copy_attributes)
 Copy a mesh into this one. More...
 
virtual void load_mesh (const std::string &filename)=0
 
void clear (bool keep_attributes, bool keep_memory)
 Removes all the entities and attributes of this mesh. More...
 
void repair (GEO::MeshRepairMode mode, double colocate_epsilon)
 Fixes some defaults in a mesh. More...
 
void set_vertex (index_t v_id, const vecn< DIMENSION > &vertex)
 Sets a point. More...
 
index_t create_vertex ()
 Creates a new vertex. More...
 
index_t create_vertex (const vecn< DIMENSION > &vertex)
 Creates a new vertex. More...
 
index_t create_vertices (index_t nb)
 Creates a contiguous chunk of vertices. More...
 
void assign_vertices (const std::vector< double > &point_coordinates)
 set vertex coordinates from a std::vector of coordinates More...
 
void delete_vertices (const std::vector< bool > &to_delete)
 Deletes a set of vertices. More...
 
void clear_vertices (bool keep_attributes, bool keep_memory)
 Removes all the vertices and attributes. More...
 
void permute_vertices (const std::vector< index_t > &permutation)
 

Static Public Member Functions

static std::unique_ptr< LineMeshBuildercreate_builder (LineMesh< DIMENSION > &mesh)
 
- Static Public Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
static std::unique_ptr< MeshBaseBuilder< DIMENSION > > create_builder (MeshBase< DIMENSION > &mesh)
 

Protected Member Functions

 LineMeshBuilder (LineMesh< DIMENSION > &mesh)
 
- Protected Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
 MeshBaseBuilder (MeshBase< DIMENSION > &mesh)
 
void delete_vertex_nn_search ()
 

Protected Attributes

LineMesh< DIMENSION > & line_mesh_
 
- Protected Attributes inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
MeshBase< DIMENSION > & mesh_base_
 

Private Member Functions

void delete_edge_nn_search ()
 Deletes the NNSearch on edges. More...
 
void clear_vertex_linked_objects () override
 Deletes the NNSearch on vertices. More...
 
void clear_edge_linked_objects ()
 
virtual void do_create_edge (index_t v1_id, index_t v2_id)=0
 Create a new edge. More...
 
virtual index_t do_create_edges (index_t nb_edges)=0
 Creates a contiguous chunk of edges. More...
 
virtual void do_set_edge_vertex (const EdgeLocalVertex &edge_local_vertex, index_t vertex_id)=0
 Sets a vertex of a edge by local vertex index. More...
 
virtual void do_delete_edges (const std::vector< bool > &to_delete)=0
 Deletes a set of edges. More...
 
virtual void do_clear_edges (bool keep_attributes, bool keep_memory)=0
 Removes all the edges and attributes. More...
 
virtual void do_permute_edges (const std::vector< index_t > &permutation)=0
 

Detailed Description

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

Definition at line 334 of file mesh_builder.h.

Constructor & Destructor Documentation

◆ LineMeshBuilder()

template<index_t DIMENSION>
RINGMesh::LineMeshBuilder< DIMENSION >::LineMeshBuilder ( LineMesh< DIMENSION > &  mesh)
inlineexplicitprotected

Definition at line 432 of file mesh_builder.h.

Member Function Documentation

◆ clear_edge_linked_objects()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::clear_edge_linked_objects ( )
inlineprivate

Definition at line 452 of file mesh_builder.h.

◆ clear_edges()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::clear_edges ( bool  keep_attributes,
bool  keep_memory 
)
inline

Removes all the edges and attributes.

Parameters
[in]keep_attributesif true, then all the existing attribute names / bindings are kept (but they are cleared). If false, they are destroyed.
[in]keep_memoryif true, then memory is kept and can be reused by subsequent mesh entity creations.

Definition at line 402 of file mesh_builder.h.

◆ clear_vertex_linked_objects()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::clear_vertex_linked_objects ( )
inlineoverrideprivatevirtual

Deletes the NNSearch on vertices.

Implements RINGMesh::MeshBaseBuilder< DIMENSION >.

Definition at line 446 of file mesh_builder.h.

◆ create_builder()

template<index_t DIMENSION>
template std::unique_ptr< LineMeshBuilder< 3 > > RINGMESH_API RINGMesh::LineMeshBuilder< DIMENSION >::create_builder ( LineMesh< DIMENSION > &  mesh)
static

Definition at line 163 of file mesh_builder.cpp.

◆ create_edge()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::create_edge ( index_t  v1_id,
index_t  v2_id 
)
inline

Create a new edge.

Parameters
[in]v1_idindex of the starting vertex.
[in]v2_idindex of the ending vertex.

Definition at line 345 of file mesh_builder.h.

◆ create_edges()

template<index_t DIMENSION>
index_t RINGMesh::LineMeshBuilder< DIMENSION >::create_edges ( index_t  nb_edges)
inline

Creates a contiguous chunk of edges.

Parameters
[in]nb_edgesnumber of edges to create
Returns
the index of the first edge

Definition at line 355 of file mesh_builder.h.

◆ delete_edge_nn_search()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::delete_edge_nn_search ( )
inlineprivate

Deletes the NNSearch on edges.

Definition at line 441 of file mesh_builder.h.

◆ delete_edges()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::delete_edges ( const std::vector< bool > &  to_delete,
bool  remove_isolated_vertices 
)
inline

Deletes a set of edges.

Parameters
[in]to_deletea vector of size nb(). If to_delete[e] is true, then entity e will be destroyed, else it will be kept.
[in]remove_isolated_verticesif true, then the vertices that are no longer incident to any entity are deleted.

Definition at line 384 of file mesh_builder.h.

◆ do_clear_edges()

template<index_t DIMENSION>
virtual void RINGMesh::LineMeshBuilder< DIMENSION >::do_clear_edges ( bool  keep_attributes,
bool  keep_memory 
)
privatepure virtual

Removes all the edges and attributes.

Parameters
[in]keep_attributesif true, then all the existing attribute names / bindings are kept (but they are cleared). If false, they are destroyed.
[in]keep_memoryif true, then memory is kept and can be reused by subsequent mesh entity creations.

Implemented in RINGMesh::GeogramLineMeshBuilder< DIMENSION >.

◆ do_create_edge()

template<index_t DIMENSION>
virtual void RINGMesh::LineMeshBuilder< DIMENSION >::do_create_edge ( index_t  v1_id,
index_t  v2_id 
)
privatepure virtual

Create a new edge.

Parameters
[in]v1_idindex of the starting vertex.
[in]v2_idindex of the ending vertex.

Implemented in RINGMesh::GeogramLineMeshBuilder< DIMENSION >.

◆ do_create_edges()

template<index_t DIMENSION>
virtual index_t RINGMesh::LineMeshBuilder< DIMENSION >::do_create_edges ( index_t  nb_edges)
privatepure virtual

Creates a contiguous chunk of edges.

Parameters
[in]nb_edgesnumber of edges to create
Returns
the index of the first edge

Implemented in RINGMesh::GeogramLineMeshBuilder< DIMENSION >.

◆ do_delete_edges()

template<index_t DIMENSION>
virtual void RINGMesh::LineMeshBuilder< DIMENSION >::do_delete_edges ( const std::vector< bool > &  to_delete)
privatepure virtual

Deletes a set of edges.

Parameters
[in]to_deletea vector of size nb(). If to_delete[e] is true, then entity e will be destroyed, else it will be kept.

Implemented in RINGMesh::GeogramLineMeshBuilder< DIMENSION >.

◆ do_permute_edges()

template<index_t DIMENSION>
virtual void RINGMesh::LineMeshBuilder< DIMENSION >::do_permute_edges ( const std::vector< index_t > &  permutation)
privatepure virtual

◆ do_set_edge_vertex()

template<index_t DIMENSION>
virtual void RINGMesh::LineMeshBuilder< DIMENSION >::do_set_edge_vertex ( const EdgeLocalVertex edge_local_vertex,
index_t  vertex_id 
)
privatepure virtual

Sets a vertex of a edge by local vertex index.

Parameters
[in]edge_local_vertexindex of the edge and local index of the vertex in the edge. Local index between 0 and nb_vertices(cell_id) - 1.
[in]vertex_idspecifies the vertex
local_vertex_idof edge
edge_id.Index between 0 and nb() - 1.

Implemented in RINGMesh::GeogramLineMeshBuilder< DIMENSION >.

◆ permute_edges()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::permute_edges ( const std::vector< index_t > &  permutation)
inline

Definition at line 407 of file mesh_builder.h.

◆ remove_isolated_vertices()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::remove_isolated_vertices ( )
inline

Remove vertices not connected to any mesh element.

Definition at line 416 of file mesh_builder.h.

◆ set_edge_vertex()

template<index_t DIMENSION>
void RINGMesh::LineMeshBuilder< DIMENSION >::set_edge_vertex ( const EdgeLocalVertex edge_local_vertex,
index_t  vertex_id 
)
inline

Sets a vertex of a edge by local vertex index.

Parameters
[in]edge_local_vertexindex of the edge and local index of the vertex in the edge. Local index between 0 and nb_vertices(cell_id) - 1.
[in]vertex_idspecifies the vertex
local_vertex_idof edge
edge_id.Index between 0 and nb() - 1.

Definition at line 370 of file mesh_builder.h.

Member Data Documentation

◆ line_mesh_

template<index_t DIMENSION>
LineMesh< DIMENSION >& RINGMesh::LineMeshBuilder< DIMENSION >::line_mesh_
protected

Definition at line 502 of file mesh_builder.h.


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