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_neu_Writer_hpp
8 #define cf3_mesh_neu_Writer_hpp
9 
11 
12 #include "mesh/MeshWriter.hpp"
13 
14 #include "mesh/neu/LibNeu.hpp"
15 #include "mesh/neu/Shared.hpp"
16 
18 
19 namespace cf3 {
20 namespace mesh {
21  class Elements;
22 
23 namespace neu {
24 
25 
27 
30 class neu_API Writer : public MeshWriter, public 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 "neu"; }
42 
43  virtual std::vector<std::string> get_extensions();
44 
45 private: // functions
46 
47  virtual void write();
48 
49  void write_headerData(std::fstream& file, const Mesh& mesh);
50 
51  void write_coordinates(std::fstream& file, const Mesh& mesh);
52 
53  void write_connectivity(std::fstream& file, const Mesh& mesh);
54 
55  void write_groups(std::fstream& file, const Mesh& mesh);
56 
57  void write_boundaries(std::fstream& file, const Mesh& mesh);
58 
59  void create_nodes_to_element_connectivity(const Mesh& mesh);
60 
61 private: // data
62 
64  std::map<Handle< Elements const >,Uint> m_global_start_idx;
65 
66  std::string m_fileBasename;
67 
68 }; // end Writer
69 
70 
72 
73 } // neu
74 } // mesh
75 } // cf3
76 
78 
79 #endif // cf3_mesh_neu_Writer_hpp
std::string name(ComponentWrapper &self)
virtual std::string get_format()
Definition: Writer.hpp:41
#define neu_API
Definition: LibNeu.hpp:22
Top-level namespace for coolfluid.
Definition: Action.cpp:18
std::map< Handle< Elements const >, Uint > m_global_start_idx
implementation detail, raw pointers are safe as keys
Definition: Writer.hpp:64
std::string m_fileBasename
Definition: Writer.hpp:66
unsigned int Uint
typedef for unsigned int
Definition: CF.hpp:90
static std::string type_name()
Gets the Class name.
Definition: Writer.hpp:39
Send comments to:
COOLFluiD Web Admin