77 template < index_t DIMENSION >
96 mesh_base_->save_mesh( filename );
108 template < index_t DIMENSION >
120 return mesh_->vertex_attribute_manager();
126 bool is_initialized()
const;
131 void test_and_initialize()
const;
161 index_t geomodel_vertex_id(
162 const gmme_id& mesh_entity, index_t entity_vertex_index = 0 )
const;
172 index_t geomodel_vertex_id(
const gmme_id& mesh_entity,
183 std::vector< index_t > mesh_entity_vertex_id(
184 const gmme_id& mesh_entity, index_t geomodel_vertex_id )
const;
192 const std::vector< GMEVertex >& gme_vertices( index_t v )
const;
198 std::vector< GMEVertex > gme_type_vertices(
219 void update_vertex_mapping(
const gmme_id& entity_id,
220 index_t entity_vertex_index,
221 index_t geomodel_vertex_index );
228 virtual void clear();
230 void unbind_geomodel_vertex_map(
const gmme_id& mesh_entity_id );
232 void bind_geomodel_vertex_map(
const gmme_id& mesh_entity_id );
236 test_and_initialize();
237 return mesh_->vertex_nn_search();
243 void remove_colocated();
257 void erase_vertices( std::vector< index_t >& to_delete );
278 virtual index_t nb_total_vertices()
const;
279 virtual index_t fill_vertices();
314 index_t geomodel_vertex_index(
const gmme_id& mesh_entity_id,
315 index_t mesh_entity_vertex_index )
const;
324 const std::vector< GMEVertex >& mesh_entity_vertex_indices(
336 std::vector< GMEVertex > mesh_entity_vertex_indices(
348 std::vector< index_t > mesh_entity_vertex_indices(
349 index_t v,
const gmme_id& mesh_entity_id )
const;
351 const std::vector< index_t >& vertex_map(
352 const gmme_id& mesh_entity_id )
const;
354 std::vector< index_t >& vertex_map(
const gmme_id& mesh_entity_id );
370 void set_vertex_map_value(
const gmme_id& mesh_entity_id,
371 index_t mesh_entity_vertex_index,
372 index_t geomodel_entity_vertex_index );
374 void add_to_gme_vertices(
375 const GMEVertex& gme_vertex, index_t geomodel_vertex_index );
386 void update_mesh_entity_maps_and_gmes(
387 const std::vector< index_t >& old2new );
400 gme_vertices_.resize( nb );
409 gme_vertices_.clear();
410 resize_geomodel_vertex_gmes( nb );
413 void bind_all_mesh_entity_vertex_maps();
433 gme_vertices_[v].clear();
436 void clear_vertex_map(
const gmme_id& mesh_entity_id );
438 std::vector< index_t >& resize_vertex_map(
439 const gmme_id& mesh_entity_id );
450 void initialize_mesh_entity_vertex_map(
451 const gmme_id& mesh_entity_id );
460 bool test_and_initialize_mesh_entity_vertex_map(
461 const gmme_id& mesh_entity_id );
468 bool is_mesh_entity_vertex_map_initialized(
469 const gmme_id& mesh_entity_id )
const;
474 void clear_all_mesh_entity_vertex_map();
476 void resize_all_mesh_entity_vertex_maps(
483 GEO::AttributesManager& mesh_entity_vertex_attribute_manager(
484 const gmme_id& mesh_entity_id )
const;
495 std::map< MeshEntityType, std::vector< std::vector< index_t > >* >
504 std::unique_ptr< PointSetMesh< DIMENSION > >&
mesh_;
511 template < index_t DIMENSION >
528 std::unique_ptr< PointSetMesh3D >& mesh );
530 void clear()
override;
531 index_t nb_total_vertices()
const override;
532 index_t fill_vertices()
override;
537 template < index_t DIMENSION >
553 return mesh_->polygon_attribute_manager();
559 bool is_initialized()
const;
560 void test_and_initialize()
const;
572 index_t nb_vertices( index_t polygon )
const;
593 index_t surface( index_t polygon )
const;
601 index_t index_in_surface( index_t polygon )
const;
610 std::tuple< PolygonType, index_t > type( index_t polygon )
const;
651 index_t polygon( index_t surface,
659 index_t nb_triangle()
const;
665 index_t nb_triangle( index_t surface )
const;
674 index_t triangle( index_t surface, index_t triangle )
const;
680 index_t nb_quad()
const;
686 index_t nb_quad( index_t surface )
const;
695 index_t quad( index_t surface, index_t quad )
const;
701 index_t nb_unclassified_polygon()
const;
707 index_t nb_unclassified_polygon( index_t surface )
const;
716 index_t unclassified_polygon( index_t surface, index_t polygon )
const;
732 double area( index_t polygon )
const;
736 test_and_initialize();
737 return mesh_->polygon_nn_search();
757 void resize_polygones_data();
761 void clear_polygones_data();
766 void disconnect_along_lines();
775 void sort_polygons();
784 std::unique_ptr< SurfaceMesh< DIMENSION > >&
mesh_;
801 index_t nb_triangles_{ 0 };
803 index_t nb_quads_{ 0 };
805 index_t nb_unclassified_polygons_{ 0 };
808 template < index_t DIMENSION >
824 std::unique_ptr< SurfaceMesh3D >& mesh );
830 vec3 normal( index_t p )
const;
835 template < index_t DIMENSION >
851 return mesh_->edge_attribute_manager();
857 bool is_initialized()
const;
858 void test_and_initialize()
const;
880 index_t line( index_t edge )
const;
888 index_t index_in_line( index_t edge )
const;
895 index_t nb_edges( index_t line )
const;
903 index_t edge( index_t line, index_t edge )
const;
918 double length( index_t edge )
const;
922 test_and_initialize();
923 return mesh_->edge_nn_search();
943 void resize_edge_data();
947 void clear_edge_data();
956 std::unique_ptr< LineMesh< DIMENSION > >&
mesh_;
973 index_t nb_edges_{ 0 };
978 template < index_t DIMENSION >
989 return mesh_->edge_attribute_manager();
995 bool is_initialized()
const;
999 void test_and_initialize()
const;
1005 index_t nb_wells()
const;
1010 index_t nb_edges()
const;
1016 index_t nb_edges( index_t well )
const;
1025 index_t vertex( index_t well, index_t edge, index_t vertex )
const;
1043 std::unique_ptr< LineMesh< DIMENSION > >&
mesh_;
1054 template < index_t DIMENSION >
1086 return mesh_->cell_attribute_manager();
1091 bool is_initialized()
const;
1095 bool is_duplication_initialized()
const;
1101 void test_and_initialize()
const;
1111 index_t nb_duplicated_vertices()
const;
1117 index_t nb_total_vertices()
const;
1127 index_t duplicated_corner_index(
1135 index_t duplicated_vertex( index_t duplicate_vertex_index )
const;
1142 index_t nb_vertices( index_t cell )
const;
1155 index_t nb_edges( index_t cell )
const;
1160 index_t nb_facets( index_t cell )
const;
1164 index_t nb_facet_vertices(
1174 index_t local_vertex )
const;
1183 index_t edge_vertex(
1184 index_t cell, index_t local_edge, index_t local_vertex )
const;
1191 index_t adjacent( index_t cell, index_t facet )
const;
1198 index_t region( index_t cell )
const;
1206 index_t index_in_region( index_t cell )
const;
1215 CellType type( index_t cell )
const;
1250 index_t cell( index_t region,
1258 index_t nb_tet()
const;
1264 index_t nb_tet( index_t region )
const;
1272 index_t tet( index_t region, index_t tet )
const;
1278 index_t nb_hex()
const;
1284 index_t nb_hex( index_t region )
const;
1292 index_t hex( index_t region, index_t hex )
const;
1298 index_t nb_prism()
const;
1304 index_t nb_prism( index_t region )
const;
1313 index_t prism( index_t region, index_t prism )
const;
1319 index_t nb_pyramid()
const;
1325 index_t nb_pyramid( index_t region )
const;
1333 index_t pyramid( index_t region, index_t pyramid )
const;
1339 index_t nb_connector()
const;
1345 index_t nb_connector( index_t region )
const;
1354 index_t connector( index_t region, index_t connector )
const;
1363 void clear_duplication();
1376 bool is_cell_facet_on_surface( index_t cell,
1377 index_t facet_index,
1378 index_t& colocated_facet_index,
1385 vec3 barycenter( index_t cell )
const;
1390 double volume( index_t cell )
const;
1394 test_and_initialize();
1395 return mesh_->cell_nn_search();
1399 test_and_initialize();
1400 return mesh_->cell_facet_nn_search();
1434 void resize_cell_data();
1438 void clear_cell_data();
1444 void test_and_initialize_duplication()
const;
1449 void initialize_duplication();
1455 bool is_surface_to_duplicate( index_t surface )
const;
1467 bool are_corners_to_duplicate(
1468 const std::vector< action_on_surface >& surfaces,
1469 std::vector< ActionOnSurface >& info );
1474 void test_and_initialize_cell_facet()
const;
1478 void initialize_cell_facet();
1484 std::unique_ptr< VolumeMesh< DIMENSION > >&
mesh_;
1502 index_t nb_tets_{ 0 };
1504 index_t nb_hexs_{ 0 };
1506 index_t nb_prisms_{ 0 };
1508 index_t nb_pyramids_{ 0 };
1510 index_t nb_connectors_{ 0 };
1531 template < index_t DIMENSION >
1548 void remove_colocated_vertices();
1562 void erase_vertices( std::vector< index_t >& to_delete );
1568 void erase_invalid_vertices();
1570 void change_point_set_mesh_data_structure(
const MeshType& type );
1571 void change_line_mesh_data_structure(
const MeshType& type );
1572 void change_surface_mesh_data_structure(
const MeshType& type );
1592 template < index_t DIMENSION >
1612 void transfer_attributes_from_gmm_to_gm_regions()
const;
1613 void transfer_attributes_from_gm_regions_to_gmm()
const;
1614 void transfer_cell_attributes_from_gmm_to_gm_regions()
const;
1615 void transfer_cell_attributes_from_gm_regions_to_gmm()
const;
1616 void transfer_vertex_attributes_from_gmm_to_gm_regions()
const;
1617 void transfer_vertex_attributes_from_gm_regions_to_gmm()
const;
1636 const GeoModelMeshCells3D::DuplicateMode& mode )
const 1641 const_cast< GeoModelMesh3D*
>( this )->cells.clear_duplication();
1648 void change_volume_mesh_data_structure(
const MeshType& type );
1653 mutable GeoModelMeshCells3D::DuplicateMode mode_{
#define ringmesh_disable_copy_and_move(Class)
GeoModelMeshVertices< DIMENSION > vertices
std::unique_ptr< PointSetMesh< DIMENSION > > & mesh_
Attached Mesh.
GEO::vecng< DIMENSION, double > vecn
void add_vertices(LineMeshBuilder< DIMENSION > *builder, index_t size)
const NNSearch< DIMENSION > & nn_search() const
GeoModelMesh< DIMENSION > & gmm_
Attached GeoModelMesh.
void clear_and_resize_geomodel_vertex_gmes(const index_t nb)
Clears and resizes the GME_Vertex vectors.
GEO::AttributesManager & attribute_manager() const
GEO::AttributesManager & attribute_manager() const
void set_duplicate_mode(const GeoModelMeshCells3D::DuplicateMode &mode) const
GeoModelMeshCells3D cells
GeoModel< DIMENSION > & geomodel_
Attached GeoModel.
std::vector< std::vector< index_t > > line_vertex_maps_
GEO::AttributesManager & attribute_manager() const
void set_mesh(MeshBase< DIMENSION > *mesh)
void clear_geomodel_vertex_gmes(index_t v)
Clears the GME_Vertices about one geomodel vertex.
#define ringmesh_template_assert_2d_or_3d(type)
std::map< MeshEntityType, std::vector< std::vector< index_t > > *> vertex_maps_
GEO::AttributesManager & attribute_manager() const
std::unique_ptr< VolumeMesh< DIMENSION > > & mesh_
Attached Mesh.
std::unique_ptr< LineMesh< DIMENSION > > & mesh_
Attached Mesh.
static const std::string surface_att_name
std::vector< index_t > region_cell_ptr_
MeshBase< DIMENSION > * mesh_base_
Attached MeshBase.
std::vector< index_t > surface_id_
Vector storing the surface index per polygon.
const NNSearch< DIMENSION > & nn_search() const
static const std::string polygon_surface_att_name
std::vector< index_t > cell_id_
Vector storing the cell index in region per cell.
GeoModelMeshEdges< DIMENSION > edges
GeoModelMeshWells< DIMENSION > wells
void resize_geomodel_vertex_gmes(const index_t nb)
Resizes the GME_Vertex vectors.
std::pair< index_t, ActionOnSurface > action_on_surface
Action to do according a surface index.
std::vector< index_t > polygon_id_
Vector storing the polygon index in surface per polygon.
std::vector< index_t > duplicated_vertex_indices_
Vector of duplicated vertices.
static const std::string edge_line_att_name
encapsulate adimensional mesh functionalities in order to provide an API on which we base the RINGMes...
std::vector< std::vector< index_t > > corner_vertex_maps_
Vertex maps.
std::vector< index_t > line_edge_ptr_
std::vector< index_t > region_id_
Vector storing the region index per cell.
std::vector< index_t > edge_id_
Vector storing the edge index in line per edge.
GeoModelVertexMapper vertex_mapper_
Mapper from/to GeoModelMeshEntity vertices.
std::vector< std::vector< GMEVertex > > gme_vertices_
GeoModelEntity Vertices for each geomodel vertex.
static const std::string cell_region_att_name
static const std::string line_att_name
GeoModelMeshVerticesBase< DIMENSION > & geomodel_vertices_
std::vector< std::vector< index_t > > region_vertex_maps_
Vertex in a GeoModelEntity.
#define ringmesh_assert(x)
GeoModelMeshPolygons< DIMENSION > polygons
std::vector< std::vector< index_t > > surface_vertex_maps_
The MeshEntityType described the type of the meshed entities There are 4 MeshEntityTypes correspondin...
void save_mesh(const std::string &filename) const
std::vector< index_t > polygon_id_
Vector storing the colocalised polygon index per cell facet If a cell facet is on a surface...
GeoModelMeshCells3D::DuplicateMode duplicate_mode() const
Classes to build GeoModel from various inputs.
std::vector< index_t > line_id_
Vector storing the line index per edge.
const GeoModel< DIMENSION > & geomodel() const
std::unique_ptr< SurfaceMesh< DIMENSION > > & mesh_
Attached Mesh.
std::vector< index_t > surface_polygon_ptr_
const NNSearch< DIMENSION > & nn_search() const
GEO::AttributesManager & attribute_manager() const
const NNSearch< DIMENSION > & cell_nn_search() const
MeshSet< DIMENSION > mesh_set_
Mesh storing all the elements.
const GeoModel< DIMENSION > & geomodel_
This template is a specialization of a gme_id to the GeoModelMeshEntity.
static const std::string region_att_name
const GeoModel< DIMENSION > & geomodel_
std::unique_ptr< LineMesh< DIMENSION > > & mesh_
Attached Mesh.
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)
const NNSearch< DIMENSION > & cell_facet_nn_search() const
std::vector< index_t > well_ptr_