COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Shared.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text .
6 #ifndef cf3_mesh_Gmsh_Shared_hpp
7 #define cf3_mesh_Gmsh_Shared_hpp
8 
10 
11 #include "mesh/GeoShape.hpp"
12 
13 #include "mesh/gmsh/LibGmsh.hpp"
14 
16 
17 namespace cf3 {
18 namespace mesh {
19 namespace gmsh {
20 
22 
27 {
28 public:
29 
31  Shared();
32 
34  static std::string type_name() { return "Shared"; }
35 
36  std::vector<std::string>& get_supported_element_types() { return m_supported_types; }
37 
38  static std::string gmsh_name_to_cf_name(const Uint dim, const Uint gmsh_type);
39 
40 protected:
41 
48 
49 
50  static const Uint nb_gmsh_types = 37;
51 
52  static const Uint m_nodes_in_gmsh_elem[nb_gmsh_types]; //For each element type, remember how many nodes it has
53  static const Uint m_gmsh_elem_dim[nb_gmsh_types]; //Store what is the geometrical dimension of each gmsh elem
54  static const Uint m_gmsh_elem_order[nb_gmsh_types]; //Store the order of each element type
55  static const std::string gmsh_elem_geo_name[nb_gmsh_types]; //Give names to the types
56  static const std::string dim_name[4];
57  static const std::string order_name[10];
58 
59  enum gmshElement { P1LINE=1, P1TRIAG=2, P1QUAD=3, P1TETRA=4, P1HEXA=5, P1PRISM=6,
60  P2LINE=8, P2TRIAG=9, P2QUAD=10, P2TETRA=11, P2HEXA=12,
61  P0POINT=15, P3TRIAG=21, P3LINE=26, P3QUAD = 36 };
62 
63  std::map<GeoShape::Type,Uint> m_CFelement_to_GmshElement;
64  std::vector<std::string> m_supported_types;
65 
67  // std::vector<std::vector<Uint> > m_faces_cf_to_gmsh;
68  // std::vector<std::vector<Uint> > m_faces_gmsh_to_cf;
69 
70  std::vector<std::vector<Uint> > m_nodes_cf_to_gmsh;
71  std::vector<std::vector<Uint> > m_nodes_gmsh_to_cf;
72 
73 }; // end Shared
74 
75 
77 
78 } // gmsh
79 } // mesh
80 } // cf3
81 
83 
84 #endif // cf3_mesh_Gmsh_Shared_hpp
static std::string type_name()
Gets the Class name.
Definition: Shared.hpp:34
#define gmsh_API
Definition: LibGmsh.hpp:22
std::vector< std::string > m_supported_types
Definition: Shared.hpp:64
Top-level namespace for coolfluid.
Definition: Action.cpp:18
std::vector< std::vector< Uint > > m_nodes_gmsh_to_cf
Definition: Shared.hpp:71
unsigned int Uint
typedef for unsigned int
Definition: CF.hpp:90
std::vector< std::vector< Uint > > m_nodes_cf_to_gmsh
Faces are not defined in gmsh format.
Definition: Shared.hpp:70
std::map< GeoShape::Type, Uint > m_CFelement_to_GmshElement
Definition: Shared.hpp:63
std::vector< std::string > & get_supported_element_types()
Definition: Shared.hpp:36
Send comments to:
COOLFluiD Web Admin