72 template < index_t DIMENSION >
79 map.emplace( type, boundary );
94 template < index_t DIMENSION >
101 map.emplace( type, incident_entity );
109 template < index_t DIMENSION >
117 return static_cast< index_t
>( mesh_entity_types_.size() );
121 return mesh_entity_types_;
137 template < index_t DIMENSION >
143 return type == mesh_entity_types_.container()[0];
148 return type == mesh_entity_types_.container()[1];
153 return type == mesh_entity_types_.container()[2];
158 return find( mesh_entity_types_.container(), type ) != NO_ID;
164 MeshEntityTypeMap::const_iterator itr{
165 boundary_relationships_.map.find( mesh_entity_type )
174 MeshEntityTypeMap::const_iterator itr{
175 incident_entity_relationships_.map.find( mesh_entity_type )
183 return mesh_entity_types_.container();
188 return static_cast< index_t
>( mesh_entity_types_.size() );
201 template < index_t DIMENSION >
213 return type == mesh_entity_types_.container()[3];
230 index_t nb_geological_entity_types()
const;
231 const std::vector< GeologicalEntityType >&
232 geological_entity_types()
const;
234 index_t index )
const;
235 index_t geological_entity_type_index(
246 if( !
contains( geological_entity_types_, geological_type_name ) )
248 geological_entity_types_.push_back( ( geological_type_name ) );
271 std::map< GeologicalEntityType, MeshEntityType >;
273 std::map< MeshEntityType, std::set< GeologicalEntityType > >;
275 std::vector< GeologicalEntityType > parent_types(
277 index_t nb_parent_types(
const MeshEntityType& child_type )
const;
289 return boundary_relationships_[relation_id].boundary_id_;
294 return boundary_relationships_[relation_id].incident_entity_id_;
305 return parent_child_relationships_[relation_id].parent_id_;
310 return parent_child_relationships_[relation_id].child_id_;
318 parent_to_child_[parent_type_name] = child_type_name;
319 child_to_parents_[child_type_name].insert( parent_type_name );
330 index_t relationship_id{
static_cast< index_t
>(
331 boundary_relationships_.size() ) };
332 boundary_relationships_.emplace_back( incident_entity, boundary );
333 return relationship_id;
339 return find( boundary_relationships_,
344 index_t relationship_id,
const gmme_id& boundary )
346 boundary_relationships_[relationship_id].boundary_id_ = boundary;
351 index_t relationship_id,
const gmme_id& incident_entity )
353 boundary_relationships_[relationship_id].incident_entity_id_ =
360 : incident_entity_id_( std::move( incident_entity ) ),
361 boundary_id_( std::move( boundary ) )
381 index_t relationship_id{
static_cast< index_t
>(
382 parent_child_relationships_.size() ) };
383 parent_child_relationships_.emplace_back( parent, child );
384 return relationship_id;
390 return find( parent_child_relationships_,
395 index_t relationship_id,
const gmge_id& parent )
397 parent_child_relationships_[relationship_id].parent_id_ = parent;
401 index_t relationship_id,
const gmme_id& child )
403 parent_child_relationships_[relationship_id].child_id_ = child;
409 : parent_id_( std::move( parent ) ),
410 child_id_( std::move( child ) )
434 template < index_t DIMENSION >
void set_incident_entity_to_boundary_relationship(index_t relationship_id, const gmme_id &incident_entity)
MeshEntityTypeBoundaryMap()
MeshEntityToParents child_to_parents_
void register_incident_entity(const MeshEntityType &type, const MeshEntityType &incident_entity)
bool operator==(const ParentChildRelationship &rhs) const
std::map< GeologicalEntityType, MeshEntityType > GeologicalEntityToChild
GeologicalTypeManager geological_entity_manager
this class contains methods to manage the type of the GeoModelGeologicalEntity. It gives access to th...
gmme_id incident_entity_id_
void register_geology_relationship(const GeologicalEntityType &parent_type_name, const MeshEntityType &child_type_name)
bool operator==(const BoundaryRelationship &rhs) const
The GeologicalEntityType described the type of the Geological entities User can defined there own Geo...
MeshEntityTypeBoundaryMap< DIMENSION > boundary_relationships_
void set_boundary_to_boundary_relationship(index_t relationship_id, const gmme_id &boundary)
index_t find_boundary_relationship(const gmme_id &incident_entity, const gmme_id &boundary)
GeologicalEntityToChild parent_to_child_
MeshEntityTypes< DIMENSION > mesh_entity_types_
std::vector< MeshEntityType > mesh_entity_types_
const std::vector< MeshEntityType > & container() const
std::map< MeshEntityType, std::set< GeologicalEntityType > > MeshEntityToParents
std::deque< ParentChildRelationship > parent_child_relationships_
MeshEntityTypeIncidentEntityMap< DIMENSION > incident_entity_relationships_
bool is_line(const MeshEntityType &type) const
const gmme_id & boundary_gmme(index_t relation_id) const
index_t find_parent_child_relationship(const gmge_id &parent, const gmme_id &child)
RelationshipManager relationship_manager
MeshEntityTypeManager< DIMENSION > mesh_entity_manager
index_t add_parent_child_relationship(const gmge_id &parent, const gmme_id &child)
const gmge_id & parent_of_gmme(index_t relation_id) const
void register_geological_entity_type(const GeologicalEntityType &geological_type_name)
bool is_surface(const MeshEntityType &type) const
BoundaryRelationship(gmme_id incident_entity, gmme_id boundary)
FORWARD_DECLARATION_DIMENSION_STRUCT(EntityTypeManager)
index_t find(const container &in, const T &value)
Returns the position of the first entity matching.
void register_boundary(const MeshEntityType &type, const MeshEntityType &boundary)
bool is_corner(const MeshEntityType &type) const
struct used to map the type of a Mesh Entity to the type of its incident mesh entity "Line" is incide...
const gmme_id & child_of_gmge(index_t relation_id) const
index_t nb_mesh_entity_types() const
index_t add_boundary_relationship(const gmme_id &incident_entity, const gmme_id &boundary)
const std::vector< MeshEntityType > & mesh_entity_types() const
bool is_valid_type(const MeshEntityType &type) const
Global entity manager which could be associated to a geomodel to give access to different manager to ...
#define ringmesh_assert(x)
bool contains(const container &in, const T &value)
const MeshEntityType & incident_entity_type(const MeshEntityType &mesh_entity_type) const
std::deque< BoundaryRelationship > boundary_relationships_
const MeshEntityType & boundary_entity_type(const MeshEntityType &mesh_entity_type) const
struct used to map the type of a Mesh Entity to the type of its boundary "Corner" is boundary of "Lin...
The MeshEntityType described the type of the meshed entities There are 4 MeshEntityTypes correspondin...
This template is a specialization of a gme_id to the GeoModelGeologicalEntity.
this class contains methods to manage relations between Geological and Mesh entities. For instance: A "Contact" can be the parent of one or more "Line" An "Interface" can the parent of one or more "Surface" A "Layer" can be the parent of one or more "Region"
Classes to build GeoModel from various inputs.
this class contains only static methods to manage the type of the GeoModelMeshEntity. It gives access to the number of meshed entities of each type and also their (in) boundary
void set_child_to_parent_child_relationship(index_t relationship_id, const gmme_id &child)
std::map< MeshEntityType, MeshEntityType > MeshEntityTypeMap
std::vector< GeologicalEntityType > geological_entity_types_
ParentChildRelationship(gmge_id parent, gmme_id child)
bool is_region(const MeshEntityType &type) const
This template is a specialization of a gme_id to the GeoModelMeshEntity.
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)
void set_parent_to_parent_child_relationship(index_t relationship_id, const gmge_id &parent)
const gmme_id & incident_entity_gmme(index_t relation_id) const