50 template < index_t DIMENSION >
65 template < index_t DIMENSION >
68 const std::string& in )
70 if( in ==
"reverse_fault" )
72 return GEOL_FEATURE::REVERSE_FAULT;
74 else if( in ==
"normal_fault" )
76 return GEOL_FEATURE::NORMAL_FAULT;
78 else if( in ==
"fault" )
80 return GEOL_FEATURE::FAULT;
82 else if( in ==
"top" )
84 return GEOL_FEATURE::STRATI;
86 else if( in ==
"none" )
90 return GEOL_FEATURE::STRATI;
92 else if( in ==
"topographic" )
94 return GEOL_FEATURE::STRATI;
96 else if( in ==
"unconformity" )
98 return GEOL_FEATURE::UNCONFORMITY;
100 else if( in ==
"boundary" )
102 return GEOL_FEATURE::VOI;
104 else if( in ==
"lease" )
106 return GEOL_FEATURE::VOI;
111 return GEOL_FEATURE::NO_GEOL;
115 template < index_t DIMENSION >
121 case GEOL_FEATURE::STRATI:
123 case GEOL_FEATURE::FAULT:
125 case GEOL_FEATURE::REVERSE_FAULT:
126 return "reverse_fault";
127 case GEOL_FEATURE::NORMAL_FAULT:
128 return "normal_fault";
129 case GEOL_FEATURE::UNCONFORMITY:
130 return "unconformity";
131 case GEOL_FEATURE::VOI:
133 case GEOL_FEATURE::NO_GEOL:
134 return "no_geological_feature";
136 return "no_geological_feature";
141 template < index_t DIMENSION >
145 return feature == GEOL_FEATURE::FAULT
146 || feature == GEOL_FEATURE::REVERSE_FAULT
147 || feature == GEOL_FEATURE::NORMAL_FAULT;
150 template < index_t DIMENSION >
155 return this->geomodel()
156 .entity_type_manager()
157 .relationship_manager.child_of_gmge( children_[x] );
160 template < index_t DIMENSION >
164 return this->geomodel().mesh_entity( child_gmme( x ) );
167 template < index_t DIMENSION >
170 for(
auto i :
range( nb_children() ) )
172 if( !child( i ).is_on_voi() )
180 template < index_t DIMENSION >
184 < this->geomodel().nb_geological_entities( type_name() );
187 template < index_t DIMENSION >
191 if( nb_children() == 0 )
194 "GeologicalEntity", gmge(),
" is undefined. No child. " );
201 for(
auto i :
range( nb_children() ) )
204 if( one_child.
parent_gmge( entity_type ) != gmge() )
207 "Inconsistency child-parent between ", gmge(),
" and ",
216 template < index_t DIMENSION >
219 bool is_valid =
true;
220 if( !gmge().is_defined() )
223 " Entity associated to geomodel ", this->geomodel().name(),
224 "has no type and/or no index " );
229 if( !is_index_valid() )
231 Logger::warn(
"GeoModelGeologicalEntity",
" Entity index ", gmge(),
240 template < index_t DIMENSION >
243 return check_has_children( *
this );
249 GeoModelGeologicalEntityFactory2D::register_creator< Contact2D >(
250 Contact2D::type_name_static() );
251 GeoModelGeologicalEntityFactory2D::register_creator< Interface2D >(
252 Interface2D::type_name_static() );
253 GeoModelGeologicalEntityFactory2D::register_creator< Layer2D >(
254 Layer2D::type_name_static() );
260 GeoModelGeologicalEntityFactory3D::register_creator< Contact3D >(
261 Contact3D::type_name_static() );
262 GeoModelGeologicalEntityFactory3D::register_creator< Interface3D >(
263 Interface3D::type_name_static() );
264 GeoModelGeologicalEntityFactory3D::register_creator< Layer3D >(
265 Layer3D::type_name_static() );
271 return Corner2D::type_name_static();
277 return Line2D::type_name_static();
283 return Surface2D::type_name_static();
289 return Line3D::type_name_static();
295 return Surface3D::type_name_static();
301 return Region3D::type_name_static();
304 template < index_t DIMENSION >
305 std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > >
309 index_t index_in_geomodel )
313 GMGE->id_ = index_in_geomodel;
const GeoModelMeshEntity< DIMENSION > & child(index_t x) const
Abstract base class for GeoModelMeshEntity.
static std::unique_ptr< BaseClass > create(const Key &key, const Args &... args)
virtual GeologicalEntityType type_name() const
virtual bool is_on_voi() const
static std::string geol_name(GEOL_FEATURE feature)
The GeologicalEntityType described the type of the Geological entities User can defined there own Geo...
virtual bool is_valid() const
static void warn(const std::string &feature, const Args &... args)
static std::unique_ptr< GeoModelGeologicalEntity< DIMENSION > > create_geological_entity(const GeologicalEntityType &type, const GeoModel< DIMENSION > &geomodel, index_t index_in_geomodel)
GEOL_FEATURE
Geological feature types for GeoModelEntity.
const gmge_id & parent_gmge(index_t id) const
static void err(const std::string &feature, const Args &... args)
virtual bool is_identification_valid() const
const gmme_id & child_gmme(index_t x) const
MeshEntityType child_type_name() const override
static bool is_fault(GEOL_FEATURE feature)
#define ringmesh_assert(x)
index_t nb_children() const
virtual bool is_index_valid() const
MeshEntityType child_type_name() const override
The MeshEntityType described the type of the meshed entities There are 4 MeshEntityTypes correspondin...
static GEOL_FEATURE determine_geological_type(const std::string &in)
Map the name of a geological type with a value of GEOL_FEATURE.
Classes to build GeoModel from various inputs.
This template is a specialization of a gme_id to the GeoModelMeshEntity.
virtual bool is_connectivity_valid() const
#define ringmesh_assert_not_reached