98 template < index_t DIMENSION >
111 const std::string&
name()
const 113 return geomodel_name_;
121 return entity_type_manager_;
129 virtual index_t nb_mesh_entities(
const MeshEntityType& type )
const;
138 return static_cast< index_t
>( geological_entities( type ).size() );
148 return entity_type_manager_.geological_entity_manager
149 .nb_geological_entity_types();
153 index_t index )
const 155 return entity_type_manager_.geological_entity_manager
156 .geological_entity_type( index );
168 return *geological_entities(
id.type() )[
id.index()];
176 index_t entity_index )
const 178 return geological_entity(
gmge_id( entity_type, entity_index ) );
194 return mesh_entity(
gmme_id( entity_type, entity_index ) );
203 return static_cast< index_t
>( corners_.size() );
207 return static_cast< index_t
>(
lines_.size() );
211 return static_cast< index_t
>( surfaces_.size() );
218 double epsilon()
const;
222 return epsilon() * epsilon();
254 return entity_type_manager_.geological_entity_manager
255 .geological_entity_type_index( type );
262 vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > >&
270 vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > >&
273 index_t entity_index = geological_entity_type_index( type );
274 return geological_entities( entity_index );
278 vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > >&
282 return geological_entities_[geological_entity_type_index];
287 mutable double epsilon_{ -1 };
295 std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > >
297 std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > >
299 std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > >
306 std::vector< std::vector< std::
307 unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > >
321 template < index_t DIMENSION >
381 return static_cast< index_t
>( regions_.size() );
384 const Region3D& region( index_t index )
const;
389 return GeoModelBase3D::mesh_entity( entity_type, entity_index );
392 const GeoModelMeshEntity3D& mesh_entity(
393 const gmme_id&
id )
const override;
395 index_t nb_mesh_entities(
const MeshEntityType& type )
const override;
399 return epsilon2() * epsilon();
404 const std::vector< std::unique_ptr< GeoModelMeshEntity3D > >&
408 std::vector< std::unique_ptr< GeoModelMeshEntity3D > >
regions_;
442 template < index_t DIMENSION >
449 friend class GeoModelBuilderGM< DIMENSION >;
463 : geomodel_( geomodel )
470 return geomodel_.geomodel_name_;
475 return geomodel_.entity_type_manager_;
478 std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > >&
481 return const_cast< std::vector< std::
482 unique_ptr< GeoModelMeshEntity< DIMENSION >
> >& >(
483 geomodel_.mesh_entities( type ) );
489 return *modifiable_mesh_entities(
id.type() )[
id.index()];
492 std::vector< std::vector< std::
493 unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > >&
496 return geomodel_.geological_entities_;
499 std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > >&
502 return const_cast< std::vector< std::
503 unique_ptr< GeoModelGeologicalEntity< DIMENSION >
> >& >(
504 geomodel_.geological_entities( type ) );
510 return *modifiable_geological_entities(
id.type() )[
id.index()];
515 return geomodel_.epsilon_;
#define ringmesh_disable_copy_and_move(Class)
std::vector< std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > > & modifiable_geological_entities()
GeoModelMesh< DIMENSION > mesh
Abstract base class for GeoModelMeshEntity.
std::vector< bool > sides_
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > corners_
const EntityTypeManager< DIMENSION > & entity_type_manager() const
Gets the EntityTypeManager associated to the GeoModel.
The GeologicalEntityType described the type of the Geological entities User can defined there own Geo...
Base class to build or edit a GeoModel.
GeoModel< DIMENSION > & geomodel_
geol_entity_range< 3 > geol_entities(const GeologicalEntityType &geol_type) const
std::vector< bool > sides_
std::string geomodel_name_
geol_entity_range< 2 > geol_entities(const GeologicalEntityType &geol_type) const
#define ringmesh_template_assert_2d_or_3d(type)
A GeoModelEntity of type CORNER.
corner_range< 2 > corners() const
EntityTypeManager< DIMENSION > & modifiable_entity_type_manager()
index_t nb_geological_entity_types() const
Returns the index of the geological entity type storage.
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > surfaces_
const std::string & name() const
Gets the name of the GeoModel.
geol_entity_range< DIMENSION > geol_entities(const GeologicalEntityType &geol_type) const
region_range< 3 > regions() const
FORWARD_DECLARATION_DIMENSION_STRUCT(EntityTypeManager)
index_t geological_entity_type_index(const GeologicalEntityType &type) const
GeoModelMeshEntity< DIMENSION > & modifiable_mesh_entity(const gmme_id &id)
line_range< 2 > lines() const
line_range< 3 > lines() const
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.
surface_range< 3 > surfaces() const
std::vector< index_t > surfaces_
const GeologicalEntityType & geological_entity_type(index_t index) const
index_t nb_regions() const
EntityTypeManager< DIMENSION > entity_type_manager_
Global entity manager which could be associated to a geomodel to give access to different manager to ...
std::vector< index_t > lines_
const WellGroup< DIMENSION > * wells() const
GeoModelAccess(GeoModel< DIMENSION > &geomodel)
line_range< DIMENSION > lines() const
index_t nb_corners() const
Builder tools to remove entities from a GeoModel.
corner_range< 3 > corners() const
surface_range< 2 > surfaces() const
#define ringmesh_assert(x)
const GeoModelMeshEntity3D & mesh_entity(const MeshEntityType &entity_type, index_t entity_index) const
std::vector< std::unique_ptr< GeoModelMeshEntity3D > > regions_
std::string & modifiable_name()
index_t nb_surfaces() const
double & modifiable_epsilon()
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 c...
const GeoModelMeshEntity< DIMENSION > & mesh_entity(const MeshEntityType &entity_type, index_t entity_index) const
The MeshEntityType described the type of the meshed entities There are 4 MeshEntityTypes correspondin...
corner_range< DIMENSION > corners() const
const GeoModelGeologicalEntity< DIMENSION > & geological_entity(const GeologicalEntityType &entity_type, index_t entity_index) const
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > lines_
This template is a specialization of a gme_id to the GeoModelGeologicalEntity.
Classes to build GeoModel from various inputs.
const GeoModelGeologicalEntity< DIMENSION > & geological_entity(gmge_id id) const
Returns a const reference the identified GeoModelGeologicalEntity.
std::vector< std::unique_ptr< GeoModelMeshEntity< DIMENSION > > > & modifiable_mesh_entities(const MeshEntityType &type)
Try repairing a supposedly invalid GeoModel.
const std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > & geological_entities(index_t geological_entity_type_index) const
surface_range< DIMENSION > surfaces() const
A GeoModelEntity of type LINE.
GeoModelGeologicalEntity< DIMENSION > & modifiable_geological_entity(const gmge_id &id)
std::vector< std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > > & modifiable_geological_entities(const GeologicalEntityType &type)
This template is a specialization of a gme_id to the GeoModelMeshEntity.
index_t nb_geological_entities(const GeologicalEntityType &type) const
Returns the number of geological entities of the given type.
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)