43 #include <geogram/basic/attributes.h> 59 struct ElementLocalVertex;
64 template < index_t DIMENSION >
92 template < index_t DIMENSION >
105 return is_on_surface_;
113 GEO::AttributesManager& vertex_attribute_manager()
const;
120 std::unique_ptr< PointSetMesh< DIMENSION > >
mesh_;
127 template < index_t DIMENSION >
169 index_t nb_edges()
const;
170 index_t nb_vertices()
const;
175 double length()
const;
197 GEO::AttributesManager& vertex_attribute_manager()
const;
198 GEO::AttributesManager& edge_attribute_manager()
const;
208 std::unique_ptr< LineMesh< DIMENSION > >
mesh_;
215 template < index_t DIMENSION >
232 return ( vertices_[0] + vertices_[1] ) * 0.5;
243 template < index_t DIMENSION >
271 void get_region_edges(
284 index_t corner_id =
static_cast< index_t
>( corners_.size() );
286 this, vertex, is_on_surface,
id ) );
316 index_t part_id =
static_cast< index_t
>( parts_.size() );
318 part_region_id_.push_back( region );
328 return *parts_[part_id];
337 return *parts_[part_id];
347 return part_region_id_[part_id];
355 return static_cast< index_t
>( corners_.size() );
362 return static_cast< index_t
>( parts_.size() );
367 index_t nb_edges()
const;
379 const std::string&
name()
const 386 std::vector< std::unique_ptr< WellCorner< DIMENSION > > >
corners_;
388 std::vector< std::unique_ptr< WellPart< DIMENSION > > >
parts_;
404 template < index_t DIMENSION >
418 void get_region_edges(
426 void get_region_edges( index_t region,
441 geomodel_ = geomodel;
449 index_t find_well(
const std::string& name )
const;
455 void create_wells( index_t nb_wells );
471 return static_cast< index_t
>( wells_.size() );
484 void compute_conformal_mesh(
489 std::vector< Well< DIMENSION >* >
wells_;
index_t part_region_id(index_t part_id) const
GEO::vecng< DIMENSION, double > vecn
std::vector< index_t > part_region_id_
Vector of the region id of the parts.
void set_name(const std::string &name)
std::vector< Well< DIMENSION > *> wells_
Vector of the wells.
std::unique_ptr< LineMesh< DIMENSION > > mesh_
WellEntity(const Well< DIMENSION > *well)
WellPart< DIMENSION > & part(index_t part_id)
index_t create_part(index_t region)
Edge(const vecn< DIMENSION > &v0, const vecn< DIMENSION > &v1)
const std::string & name() const
index_t id_
The id of the corresponding surface or region.
bool is_on_surface() const
std::array< index_t, 2 > corners_
id in the corners_ vector the the well
ringmesh_template_assert_2d_or_3d(DIMENSION)
const Well< DIMENSION > & well(index_t w) const
index_t corner(index_t c) const
const WellCorner< DIMENSION > & corner(index_t c) const
index_t nb_corners() const
vecn< DIMENSION > barycenter() const
void set_corner(index_t c, index_t id)
ringmesh_disable_copy_and_move(WellEntity)
std::unique_ptr< PointSetMesh< DIMENSION > > mesh_
const Well< DIMENSION > * well_
Pointer to the Well owning this entity.
index_t create_corner(const vecn< DIMENSION > &vertex, bool is_on_surface, index_t id)
const vecn< DIMENSION > & vertex(index_t i) const
#define ringmesh_assert(x)
const WellPart< DIMENSION > & part(index_t part_id) const
std::string name_
Name of the well.
index_t nb_edges_
Number of edges in the well.
bool is_on_surface_
True is the corner is on a surface, false if is in a region.
const Well< DIMENSION > & well() const
void set_geomodel(GeoModel< DIMENSION > *geomodel)
Classes to build GeoModel from various inputs.
const GeoModel< DIMENSION > * geomodel() const
std::vector< std::unique_ptr< WellPart< DIMENSION > > > parts_
Vector of the parts of the well.
GeoModel< DIMENSION > * geomodel_
Associated GeoModel.
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)
std::array< vecn< DIMENSION >, 2 > vertices_
std::vector< std::unique_ptr< WellCorner< DIMENSION > > > corners_
Vector of the corners of the well.
virtual ~WellEntity()=default