RINGMesh  Version 5.0.0
A programming library for geological model meshes
geomodel_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2017, Association Scientifique pour la Geologie et ses
3  * Applications (ASGA). All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of ASGA nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ASGA BE LIABLE FOR ANY DIRECT,
20  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  * http://www.ring-team.org
28  *
29  * RING Project
30  * Ecole Nationale Superieure de Geologie - GeoRessources
31  * 2 Rue du Doyen Marcel Roubault - TSA 70605
32  * 54518 VANDOEUVRE-LES-NANCY
33  * FRANCE
34  */
35 
36 #pragma once
37 
38 #include <ringmesh/basic/common.h>
39 
47 namespace RINGMesh
48 {
49  class MeshEntityType;
50  class GeologicalEntityType;
52 
53  ALIAS_3D( GeoModel );
54 } // namespace RINGMesh
55 
56 namespace RINGMesh
57 {
65  template < index_t DIMENSION >
66  void print_geomodel( const GeoModel< DIMENSION >& geomodel );
67 
75  template < index_t DIMENSION >
76  void print_geomodel_mesh_stats( const GeoModel< DIMENSION >& geomodel );
77 
82  void RINGMESH_API print_geomodel_mesh_cell_volumes(
83  const GeoModel3D& geomodel );
84 
92  template < index_t DIMENSION >
94  const GeoModel< DIMENSION >& geomodel,
95  const MeshEntityType& gmme_type,
96  const std::string& name );
97 
106  template < index_t DIMENSION >
108  const RINGMesh::GeoModel< DIMENSION >& geomodel,
109  const RINGMesh::GeologicalEntityType& gmge_type,
110  const std::string& name );
111 
112 #ifdef RINGMESH_WITH_TETGEN
113 
123  void RINGMESH_API tetrahedralize( GeoModel3D& geomodel,
124  const std::string& method = "TetGen",
125  index_t region_id = NO_ID,
126  bool add_steiner_points = true );
127 
140  void RINGMESH_API tetrahedralize( GeoModel3D& geomodel,
141  const std::string& method,
142  index_t region_id,
143  bool add_steiner_points,
144  const std::vector< std::vector< vec3 > >& internal_vertices );
145 
146 #endif
147 
157  template < index_t DIMENSION >
158  void translate( GeoModel< DIMENSION >& geomodel,
159  const vecn< DIMENSION >& translation_vector );
160 
178  void RINGMESH_API rotate( GeoModel3D& geomodel,
179  const vec3& origin,
180  const vec3& axis,
181  double angle,
182  bool degrees = false );
183 } // namespace RINGMesh
index_t find_mesh_entity_id_from_name(const GeoModel< DIMENSION > &geomodel, const MeshEntityType &gmme_type, const std::string &name)
The GeologicalEntityType described the type of the Geological entities User can defined there own Geo...
Definition: entity_type.h:137
vecn< 3 > vec3
Definition: types.h:76
void RINGMESH_API print_geomodel_mesh_cell_volumes(const GeoModel3D &geomodel)
void RINGMESH_API rotate(GeoModel3D &geomodel, const vec3 &origin, const vec3 &axis, double angle, bool degrees=false)
Rotate the boundary geomodel.
ALIAS_3D(GeoModel)
void translate(GeoModel< DIMENSION > &geomodel, const vecn< DIMENSION > &translation_vector)
Translates the boundary geomodel by a vector.
void print_geomodel(const GeoModel< DIMENSION > &geomodel)
Print in the console the geomodel statistics.
index_t find_geological_entity_id_from_name(const RINGMesh::GeoModel< DIMENSION > &geomodel, const RINGMesh::GeologicalEntityType &gmge_type, const std::string &name)
Classes to build GeoModel from various inputs.
Definition: algorithm.h:48
void print_geomodel_mesh_stats(const GeoModel< DIMENSION > &geomodel)
FORWARD_DECLARATION_DIMENSION_CLASS(GeoModelMeshEntityAccess)