COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Writer.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 
7 #ifndef cf3_mesh_Gmsh_Writer_hpp
8 #define cf3_mesh_Gmsh_Writer_hpp
9 
11 
12 #include "mesh/MeshWriter.hpp"
13 #include "mesh/GeoShape.hpp"
14 
15 #include "mesh/gmsh/LibGmsh.hpp"
16 #include "mesh/gmsh/Shared.hpp"
17 
19 
20 namespace cf3 {
21 namespace mesh {
22  class Entities;
23  class ShapeFunction;
24 namespace gmsh {
25 
27 
30 class gmsh_API Writer : public MeshWriter, public gmsh::Shared
31 {
32 
33 public: // functions
34 
36  Writer( const std::string& name );
37 
39  static std::string type_name() { return "Writer"; }
40 
41  virtual std::string get_format() { return "Gmsh"; }
42 
43  virtual std::vector<std::string> get_extensions();
44 
45 private: // functions
46 
47  virtual void write();
48 
49  void write_header(std::fstream& file);
50 
51  void write_coordinates(std::fstream& file);
52 
53  void write_connectivity(std::fstream& file);
54 
55  void write_interpolation_schemes(std::fstream& file);
56 
57  void write_nodal_data(std::fstream& file);
58 
59  void write_elem_nodal_data(std::fstream& file);
60 
61 // void write_element_data(std::fstream& file);
62 
63 private: // data
64 
65  std::map<std::string,Uint> m_groupnumber;
66 
67  std::map<std::string,Uint> m_elementTypes;
68 
69  std::vector< Handle<Entities const> > m_entities_vector;
70 
71 }; // end Writer
72 
73 
75 
76 } // gmsh
77 } // mesh
78 } // cf3
79 
81 
82 #endif // cf3_mesh_Gmsh_Writer_hpp
std::string name(ComponentWrapper &self)
std::map< std::string, Uint > m_elementTypes
Definition: Writer.hpp:67
#define gmsh_API
Definition: LibGmsh.hpp:22
Top-level namespace for coolfluid.
Definition: Action.cpp:18
virtual std::string get_format()
Definition: Writer.hpp:41
static std::string type_name()
Gets the Class name.
Definition: Writer.hpp:39
std::vector< Handle< Entities const > > m_entities_vector
Definition: Writer.hpp:69
std::map< std::string, Uint > m_groupnumber
Definition: Writer.hpp:65
Send comments to:
COOLFluiD Web Admin