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

#include <geomodel_builder_topology.h>

Inheritance diagram for RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >:
RINGMesh::GeoModelBuilderTopology< DIMENSION > RINGMesh::GeoModelBuilderTopology< 2 >

Public Member Functions

virtual ~GeoModelBuilderTopologyBase ()=default
 
void copy_topology (const GeoModel< DIMENSION > &from)
 Copy topological information from a geomodel. More...
 
bool get_dependent_entities (std::set< gmme_id > &mesh_entities, std::set< gmge_id > &geological_entities) const
 Add to the vector the entities which cannot exist if an entity in the set does not exist. More...
 
virtual gmme_id create_mesh_entity (const MeshEntityType &type)
 
virtual bool create_mesh_entities (const MeshEntityType &type, index_t nb_additional_entities)
 
void remove_mesh_entity_boundary_relation (const gmme_id &incident_entity, const gmme_id &boundary)
 
virtual void add_mesh_entity_boundary_relation (const gmme_id &incident_entity_id, const gmme_id &boundary_id, bool side=false)
 
virtual void set_mesh_entity_boundary (const gmme_id &gmme, index_t id, index_t boundary_id, bool side=false)
 
void set_mesh_entity_incident_entity (const gmme_id &gmme, index_t id, index_t incident_entity_id)
 
void delete_mesh_entity (const MeshEntityType &type, index_t index)
 
gmme_id find_or_create_corner (const vecn< DIMENSION > &point)
 Finds or creates a corner at given coordinates. More...
 
gmme_id find_or_create_corner (index_t geomodel_point_id)
 
gmme_id find_or_create_line (const std::vector< vecn< DIMENSION > > &vertices)
 Finds or creates a line. More...
 
gmme_id find_or_create_line (const std::vector< index_t > &sorted_adjacent_surfaces, const gmme_id &first_corner, const gmme_id &second_corner)
 Finds or creates a line knowing its topological adjacencies. More...
 

Protected Member Functions

 GeoModelBuilderTopologyBase (GeoModelBuilder< DIMENSION > &builder, GeoModel< DIMENSION > &geomodel)
 
template<template< index_t > class ENTITY>
gmme_id create_mesh_entity (const MeshType &mesh_type="")
 
template<template< index_t > class ENTITY>
bool create_mesh_entities (index_t nb_additionnal_entities, const MeshType &type="")
 
template<template< index_t > class ENTITY>
void copy_mesh_entity_topology (const GeoModel< DIMENSION > &from)
 
index_t check_if_boundary_incident_entity_relation_already_exists (const gmme_id &incident_entity, const gmme_id &boundary)
 
virtual void copy_all_mesh_entity_topology (const GeoModel< DIMENSION > &from)
 

Protected Attributes

GeoModelBuilder< DIMENSION > & builder_
 
GeoModel< DIMENSION > & geomodel_
 
GeoModelAccess< DIMENSION > geomodel_access_
 

Private Member Functions

 ringmesh_disable_copy_and_move (GeoModelBuilderTopologyBase)
 
 ringmesh_template_assert_2d_or_3d (DIMENSION)
 

Friends

class GeoModelBuilderBase< DIMENSION >
 
class GeoModelBuilder< DIMENSION >
 

Detailed Description

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

Definition at line 60 of file geomodel_builder_topology.h.

Constructor & Destructor Documentation

◆ ~GeoModelBuilderTopologyBase()

template<index_t DIMENSION>
virtual RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::~GeoModelBuilderTopologyBase ( )
virtualdefault

◆ GeoModelBuilderTopologyBase()

template<index_t DIMENSION>
RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::GeoModelBuilderTopologyBase ( GeoModelBuilder< DIMENSION > &  builder,
GeoModel< DIMENSION > &  geomodel 
)
protected

Definition at line 257 of file geomodel_builder_topology.cpp.

Member Function Documentation

◆ add_mesh_entity_boundary_relation()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::add_mesh_entity_boundary_relation ( const gmme_id incident_entity_id,
const gmme_id boundary_id,
bool  side = false 
)
virtual

◆ check_if_boundary_incident_entity_relation_already_exists()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::check_if_boundary_incident_entity_relation_already_exists ( const gmme_id incident_entity,
const gmme_id boundary 
)
protected

Definition at line 456 of file geomodel_builder_topology.cpp.

◆ copy_all_mesh_entity_topology()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::copy_all_mesh_entity_topology ( const GeoModel< DIMENSION > &  from)
protectedvirtual

Definition at line 267 of file geomodel_builder_topology.cpp.

◆ copy_mesh_entity_topology()

template<index_t DIMENSION>
template<template< index_t > class ENTITY>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::copy_mesh_entity_topology ( const GeoModel< DIMENSION > &  from)
inlineprotected

Definition at line 152 of file geomodel_builder_topology.h.

◆ copy_topology()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::copy_topology ( const GeoModel< DIMENSION > &  from)

Copy topological information from a geomodel.

Copy all the geomodel entities and their relationship ignoring their geometry

Parameters
[in]fromModel to copy the information from

Definition at line 276 of file geomodel_builder_topology.cpp.

◆ create_mesh_entities() [1/2]

template<index_t DIMENSION>
bool RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::create_mesh_entities ( const MeshEntityType type,
index_t  nb_additional_entities 
)
virtual

Reimplemented in RINGMesh::GeoModelBuilderTopology< 3 >.

Definition at line 592 of file geomodel_builder_topology.cpp.

◆ create_mesh_entities() [2/2]

template<index_t DIMENSION>
template<template< index_t > class ENTITY>
bool RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::create_mesh_entities ( index_t  nb_additionnal_entities,
const MeshType type = "" 
)
protected

Definition at line 438 of file geomodel_builder_topology.cpp.

◆ create_mesh_entity() [1/2]

template<index_t DIMENSION>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::create_mesh_entity ( const MeshEntityType type)
virtual

Reimplemented in RINGMesh::GeoModelBuilderTopology< 3 >.

Definition at line 570 of file geomodel_builder_topology.cpp.

◆ create_mesh_entity() [2/2]

template<index_t DIMENSION>
template<template< index_t > class ENTITY>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::create_mesh_entity ( const MeshType mesh_type = "")
protected

Definition at line 421 of file geomodel_builder_topology.cpp.

◆ delete_mesh_entity()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::delete_mesh_entity ( const MeshEntityType type,
index_t  index 
)

Definition at line 563 of file geomodel_builder_topology.cpp.

◆ find_or_create_corner() [1/2]

template<index_t DIMENSION>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::find_or_create_corner ( const vecn< DIMENSION > &  point)

Finds or creates a corner at given coordinates.

Parameters
[in]pointGeometric location of the Corner
Returns
Index of the Corner

Definition at line 307 of file geomodel_builder_topology.cpp.

◆ find_or_create_corner() [2/2]

template<index_t DIMENSION>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::find_or_create_corner ( index_t  geomodel_point_id)

Definition at line 320 of file geomodel_builder_topology.cpp.

◆ find_or_create_line() [1/2]

template<index_t DIMENSION>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::find_or_create_line ( const std::vector< vecn< DIMENSION > > &  vertices)

Finds or creates a line.

Parameters
[in]verticesCoordinates of the vertices of the line
Returns
Index of the Line

Definition at line 333 of file geomodel_builder_topology.cpp.

◆ find_or_create_line() [2/2]

template<index_t DIMENSION>
gmme_id RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::find_or_create_line ( const std::vector< index_t > &  sorted_adjacent_surfaces,
const gmme_id first_corner,
const gmme_id second_corner 
)

Finds or creates a line knowing its topological adjacencies.

Definition at line 360 of file geomodel_builder_topology.cpp.

◆ get_dependent_entities()

template<index_t DIMENSION>
bool RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::get_dependent_entities ( std::set< gmme_id > &  mesh_entities,
std::set< gmge_id > &  geological_entities 
) const

Add to the vector the entities which cannot exist if an entity in the set does not exist.

Returns
True if at least one entity was added.

Definition at line 287 of file geomodel_builder_topology.cpp.

◆ remove_mesh_entity_boundary_relation()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::remove_mesh_entity_boundary_relation ( const gmme_id incident_entity,
const gmme_id boundary 
)

Definition at line 391 of file geomodel_builder_topology.cpp.

◆ ringmesh_disable_copy_and_move()

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

◆ ringmesh_template_assert_2d_or_3d()

template<index_t DIMENSION>
RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::ringmesh_template_assert_2d_or_3d ( DIMENSION  )
private

◆ set_mesh_entity_boundary()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::set_mesh_entity_boundary ( const gmme_id gmme,
index_t  id,
index_t  boundary_id,
bool  side = false 
)
virtual

◆ set_mesh_entity_incident_entity()

template<index_t DIMENSION>
void RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::set_mesh_entity_incident_entity ( const gmme_id gmme,
index_t  id,
index_t  incident_entity_id 
)

No check on the validity of the index of the entity incident_entity NO_ID is used to flag entities to delete

Definition at line 543 of file geomodel_builder_topology.cpp.

Friends And Related Function Documentation

◆ GeoModelBuilder< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelBuilder< DIMENSION >
friend

Definition at line 65 of file geomodel_builder_topology.h.

◆ GeoModelBuilderBase< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelBuilderBase< DIMENSION >
friend

Definition at line 64 of file geomodel_builder_topology.h.

Member Data Documentation

◆ builder_

template<index_t DIMENSION>
GeoModelBuilder< DIMENSION >& RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::builder_
protected

Definition at line 174 of file geomodel_builder_topology.h.

◆ geomodel_

template<index_t DIMENSION>
GeoModel< DIMENSION >& RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::geomodel_
protected

Definition at line 175 of file geomodel_builder_topology.h.

◆ geomodel_access_

template<index_t DIMENSION>
GeoModelAccess< DIMENSION > RINGMesh::GeoModelBuilderTopologyBase< DIMENSION >::geomodel_access_
protected

Definition at line 176 of file geomodel_builder_topology.h.


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