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

#include <geomodel.h>

Inheritance diagram for RINGMesh::GeoModelBase< DIMENSION >:
RINGMesh::GeoModel< DIMENSION > RINGMesh::GeoModel< 2 >

Public Member Functions

virtual ~GeoModelBase ()
 
const std::string & name () const
 Gets the name of the GeoModel. More...
 
const EntityTypeManager< DIMENSION > & entity_type_manager () const
 Gets the EntityTypeManager associated to the GeoModel. More...
 
virtual index_t nb_mesh_entities (const MeshEntityType &type) const
 Returns the number of mesh entities of the given type. More...
 
index_t nb_geological_entities (const GeologicalEntityType &type) const
 Returns the number of geological entities of the given type. More...
 
index_t nb_geological_entity_types () const
 Returns the index of the geological entity type storage. More...
 
const GeologicalEntityTypegeological_entity_type (index_t index) const
 
const GeoModelGeologicalEntity< DIMENSION > & geological_entity (gmge_id id) const
 Returns a const reference the identified GeoModelGeologicalEntity. More...
 
const GeoModelGeologicalEntity< DIMENSION > & geological_entity (const GeologicalEntityType &entity_type, index_t entity_index) const
 
virtual const GeoModelMeshEntity< DIMENSION > & mesh_entity (const gmme_id &id) const
 Generic access to a meshed entity. More...
 
const GeoModelMeshEntity< DIMENSION > & mesh_entity (const MeshEntityType &entity_type, index_t entity_index) const
 
void set_wells (const WellGroup< DIMENSION > *wells)
 
const WellGroup< DIMENSION > * wells () const
 
Specialized accessors.
index_t nb_corners () const
 
index_t nb_lines () const
 
index_t nb_surfaces () const
 
const Corner< DIMENSION > & corner (index_t index) const
 
const Line< DIMENSION > & line (index_t index) const
 
const Surface< DIMENSION > & surface (index_t index) const
 
double epsilon () const
 
double epsilon2 () const
 

Public Attributes

GeoModelMesh< DIMENSION > mesh
 

Protected Member Functions

 GeoModelBase (GeoModel< DIMENSION > &geomodel)
 Constructs an empty GeoModel. More...
 
index_t geological_entity_type_index (const GeologicalEntityType &type) const
 
virtual const std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > & mesh_entities (const MeshEntityType &type) const
 Generic accessor to the storage of mesh entities of the given type. More...
 
const std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > & geological_entities (const GeologicalEntityType &type) const
 Generic accessor to the storage of geological entities of the given type. More...
 
const std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > & geological_entities (index_t geological_entity_type_index) const
 

Protected Attributes

std::string geomodel_name_
 
double epsilon_ { -1 }
 
EntityTypeManager< DIMENSION > entity_type_manager_
 
const WellGroup< DIMENSION > * wells_ { nullptr }
 
Mandatory entities of the geomodel
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > corners_
 
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > lines_
 
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > surfaces_
 
std::vector< std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > > geological_entities_
 Geological entities. They are optional. The EntityTypes are managed by the EntityTypeManager of the class. More...
 

Private Member Functions

 ringmesh_disable_copy_and_move (GeoModelBase)
 
 ringmesh_template_assert_2d_or_3d (DIMENSION)
 

Friends

class GeoModelAccess< DIMENSION >
 

Detailed Description

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

Definition at line 99 of file geomodel.h.

Constructor & Destructor Documentation

◆ ~GeoModelBase()

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

Definition at line 103 of file geomodel.cpp.

◆ GeoModelBase()

template<index_t DIMENSION>
RINGMesh::GeoModelBase< DIMENSION >::GeoModelBase ( GeoModel< DIMENSION > &  geomodel)
explicitprotected

Constructs an empty GeoModel.

Definition at line 97 of file geomodel.cpp.

Member Function Documentation

◆ corner()

template<index_t DIMENSION>
const Corner< DIMENSION > & RINGMesh::GeoModelBase< DIMENSION >::corner ( index_t  index) const

Definition at line 177 of file geomodel.cpp.

◆ entity_type_manager()

template<index_t DIMENSION>
const EntityTypeManager< DIMENSION >& RINGMesh::GeoModelBase< DIMENSION >::entity_type_manager ( ) const
inline

Gets the EntityTypeManager associated to the GeoModel.

Definition at line 119 of file geomodel.h.

◆ epsilon()

template<index_t DIMENSION>
double RINGMesh::GeoModelBase< DIMENSION >::epsilon ( ) const

Definition at line 208 of file geomodel.cpp.

◆ epsilon2()

template<index_t DIMENSION>
double RINGMesh::GeoModelBase< DIMENSION >::epsilon2 ( ) const
inline

Definition at line 220 of file geomodel.h.

◆ geological_entities() [1/2]

template<index_t DIMENSION>
const std:: vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > >& RINGMesh::GeoModelBase< DIMENSION >::geological_entities ( const GeologicalEntityType type) const
inlineprotected

Generic accessor to the storage of geological entities of the given type.

Definition at line 271 of file geomodel.h.

◆ geological_entities() [2/2]

template<index_t DIMENSION>
const std:: vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > >& RINGMesh::GeoModelBase< DIMENSION >::geological_entities ( index_t  geological_entity_type_index) const
inlineprotected

Definition at line 279 of file geomodel.h.

◆ geological_entity() [1/2]

template<index_t DIMENSION>
const GeoModelGeologicalEntity< DIMENSION >& RINGMesh::GeoModelBase< DIMENSION >::geological_entity ( gmge_id  id) const
inline

Returns a const reference the identified GeoModelGeologicalEntity.

Parameters
[in]idType and index of the entity.
Precondition
Entity identification is valid.

Definition at line 165 of file geomodel.h.

◆ geological_entity() [2/2]

template<index_t DIMENSION>
const GeoModelGeologicalEntity< DIMENSION >& RINGMesh::GeoModelBase< DIMENSION >::geological_entity ( const GeologicalEntityType entity_type,
index_t  entity_index 
) const
inline

Convenient overload of entity( gmge_id id )

Definition at line 174 of file geomodel.h.

◆ geological_entity_type()

template<index_t DIMENSION>
const GeologicalEntityType& RINGMesh::GeoModelBase< DIMENSION >::geological_entity_type ( index_t  index) const
inline

Definition at line 152 of file geomodel.h.

◆ geological_entity_type_index()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::geological_entity_type_index ( const GeologicalEntityType type) const
inlineprotected

Access to the position of the entity of that type in storage.

Definition at line 251 of file geomodel.h.

◆ line()

template<index_t DIMENSION>
const Line< DIMENSION > & RINGMesh::GeoModelBase< DIMENSION >::line ( index_t  index) const

Definition at line 185 of file geomodel.cpp.

◆ mesh_entities()

template<index_t DIMENSION>
const std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > & RINGMesh::GeoModelBase< DIMENSION >::mesh_entities ( const MeshEntityType type) const
protectedvirtual

Generic accessor to the storage of mesh entities of the given type.

Reimplemented in RINGMesh::GeoModel< 3 >.

Definition at line 155 of file geomodel.cpp.

◆ mesh_entity() [1/2]

template<index_t DIMENSION>
const GeoModelMeshEntity< DIMENSION > & RINGMesh::GeoModelBase< DIMENSION >::mesh_entity ( const gmme_id id) const
virtual

Generic access to a meshed entity.

Precondition
Type of the entity is CORNER, LINE, SURFACE, or REGION

Reimplemented in RINGMesh::GeoModel< 3 >.

Definition at line 131 of file geomodel.cpp.

◆ mesh_entity() [2/2]

template<index_t DIMENSION>
const GeoModelMeshEntity< DIMENSION >& RINGMesh::GeoModelBase< DIMENSION >::mesh_entity ( const MeshEntityType entity_type,
index_t  entity_index 
) const
inline

Convenient overload of mesh_entity( gmme_id id )

Definition at line 191 of file geomodel.h.

◆ name()

template<index_t DIMENSION>
const std::string& RINGMesh::GeoModelBase< DIMENSION >::name ( ) const
inline

Gets the name of the GeoModel.

Definition at line 111 of file geomodel.h.

◆ nb_corners()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_corners ( ) const
inline

Definition at line 201 of file geomodel.h.

◆ nb_geological_entities()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_geological_entities ( const GeologicalEntityType type) const
inline

Returns the number of geological entities of the given type.

Default value is 0

Parameters
[in]typethe geological entity type

Definition at line 136 of file geomodel.h.

◆ nb_geological_entity_types()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_geological_entity_types ( ) const
inline

Returns the index of the geological entity type storage.

Default value is NO_ID

Parameters
[in]typethe geological entity type

Definition at line 146 of file geomodel.h.

◆ nb_lines()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_lines ( ) const
inline

Definition at line 205 of file geomodel.h.

◆ nb_mesh_entities()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_mesh_entities ( const MeshEntityType type) const
virtual

Returns the number of mesh entities of the given type.

Default value is 0

Parameters
[in]typethe mesh entity type

Reimplemented in RINGMesh::GeoModel< 3 >.

Definition at line 108 of file geomodel.cpp.

◆ nb_surfaces()

template<index_t DIMENSION>
index_t RINGMesh::GeoModelBase< DIMENSION >::nb_surfaces ( ) const
inline

Definition at line 209 of file geomodel.h.

◆ ringmesh_disable_copy_and_move()

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

◆ ringmesh_template_assert_2d_or_3d()

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

◆ set_wells()

template<index_t DIMENSION>
void RINGMesh::GeoModelBase< DIMENSION >::set_wells ( const WellGroup< DIMENSION > *  wells)

Associates a WellGroup to the GeoModel

Parameters
[in]wellsthe WellGroup

Definition at line 201 of file geomodel.cpp.

◆ surface()

template<index_t DIMENSION>
const Surface< DIMENSION > & RINGMesh::GeoModelBase< DIMENSION >::surface ( index_t  index) const

Definition at line 192 of file geomodel.cpp.

◆ wells()

template<index_t DIMENSION>
const WellGroup< DIMENSION >* RINGMesh::GeoModelBase< DIMENSION >::wells ( ) const
inline

Definition at line 235 of file geomodel.h.

Friends And Related Function Documentation

◆ GeoModelAccess< DIMENSION >

template<index_t DIMENSION>
friend class GeoModelAccess< DIMENSION >
friend

Definition at line 103 of file geomodel.h.

Member Data Documentation

◆ corners_

template<index_t DIMENSION>
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > RINGMesh::GeoModelBase< DIMENSION >::corners_
protected

Definition at line 296 of file geomodel.h.

◆ entity_type_manager_

template<index_t DIMENSION>
EntityTypeManager< DIMENSION > RINGMesh::GeoModelBase< DIMENSION >::entity_type_manager_
protected

Definition at line 289 of file geomodel.h.

◆ epsilon_

template<index_t DIMENSION>
double RINGMesh::GeoModelBase< DIMENSION >::epsilon_ { -1 }
mutableprotected

Definition at line 287 of file geomodel.h.

◆ geological_entities_

template<index_t DIMENSION>
std::vector< std::vector< std:: unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > > RINGMesh::GeoModelBase< DIMENSION >::geological_entities_
protected

Geological entities. They are optional. The EntityTypes are managed by the EntityTypeManager of the class.

Definition at line 308 of file geomodel.h.

◆ geomodel_name_

template<index_t DIMENSION>
std::string RINGMesh::GeoModelBase< DIMENSION >::geomodel_name_
protected

Definition at line 286 of file geomodel.h.

◆ lines_

template<index_t DIMENSION>
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > RINGMesh::GeoModelBase< DIMENSION >::lines_
protected

Definition at line 298 of file geomodel.h.

◆ mesh

template<index_t DIMENSION>
GeoModelMesh< DIMENSION > RINGMesh::GeoModelBase< DIMENSION >::mesh

Definition at line 241 of file geomodel.h.

◆ surfaces_

template<index_t DIMENSION>
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > RINGMesh::GeoModelBase< DIMENSION >::surfaces_
protected

Definition at line 300 of file geomodel.h.

◆ wells_

template<index_t DIMENSION>
const WellGroup< DIMENSION >* RINGMesh::GeoModelBase< DIMENSION >::wells_ { nullptr }
protected

Optional WellGroup associated with the geomodel

Definition at line 317 of file geomodel.h.


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