Flow123d  jenkins-Flow123d-windows32-release-multijob-51
output_msh.h
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id: $
21  * $Revision: $
22  * $LastChangedBy: $
23  * $LastChangedDate: $
24  *
25  * @file output_msh.h
26  * @brief Header: The functions for MSH (GMSH) outputs.
27  *
28  */
29 
30 #ifndef OUTPUT_MSH_HH_
31 #define OUTPUT_MSH_HH_
32 
33 #include "io/output.h"
34 
35 /**
36  * \brief This class is used for output data to VTK file format
37  */
38 class OutputMSH : public OutputTime {
39 public:
40 
41  /**
42  * \brief The constructor of this class
43  */
44  OutputMSH();
45 
46  /**
47  * \brief The constructor of this class
48  */
49  OutputMSH(const Input::Record &in_rec);
50 
51  /**
52  * \brief The destructor of this class
53  */
54  ~OutputMSH();
55 
56  /**
57  * \brief The definition of input record for gmsh file format
58  */
60 
61  /**
62  * \brief This method writes head of GMSH (.msh) file format
63  *
64  * \return This function returns 1
65  */
66  int write_head(void);
67 
68  /**
69  * \brief This method writes data to GMSH (.msh) file format for current time
70  *
71  * \return This function returns 1
72  */
73  int write_data(void);
74 
75  /**
76  * \brief This method should write tail of GMSH (.msh) file format
77  *
78  * It is stupid file format. It doesn't write anything special at the end of
79  * the file
80  *
81  * \return This function returns 1
82  */
83  int write_tail(void);
84 
85 
86 private:
87 
88  /**
89  * Was header already written to output file?
90  */
92 
93  /**
94  * \brief This function write header of GMSH (.msh) file format
95  */
96  void write_msh_header(void);
97 
98  /**
99  * \brief This function writes geometry (position of nodes) to GMSH (.msh) file
100  * format
101  */
102  void write_msh_geometry(void);
103 
104  /**
105  * \brief This function writes topology (connection of nodes) to the GMSH (.msh)
106  * file format
107  */
108  void write_msh_topology(void);
109 
110  /**
111  * \brief This function writes continuous ascii data to GMSH (.msh) output file.
112  *
113  * \param[in] *out_data The pointer at structure storing pointer at own data.
114  */
115  template<class element>
117 
118  /**
119  * \brief This function writes discontinuous ascii data to GMSH (.msh) output file.
120  *
121  * \param[in] *out_data The pointer at structure storing pointer at own data.
122  */
123  void write_msh_ascii_discont_data(OutputDataBase* output_data);
124 
125  /**
126  * \brief This function write all data on nodes to output file. This function
127  * is used for static and dynamic data
128  *
129  * \param[in] time The time from start
130  * \param[in] step The number of steps from start
131  */
132  void write_msh_node_data(double time, int step);
133 
134 
135  /**
136  * \brief This function write all data on elements to output file. This
137  * function is used for static and dynamic data
138  *
139  * \param[in] time The time from start
140  * \param[in] step The number of steps from start
141  */
142  void write_msh_elem_data(double time, int step);
143 };
144 
145 #endif /* OUTPUT_MSH_HH_ */
double time
The newest time of registered data.
Definition: output_time.hh:274
void write_msh_header(void)
This function write header of GMSH (.msh) file format.
Definition: output_msh.cc:44
Common parent class for templated OutputData.
void write_msh_elem_data(double time, int step)
This function write all data on elements to output file. This function is used for static and dynamic...
Definition: output_msh.cc:194
Header: The functions for all outputs.
OutputMSH()
The constructor of this class.
void write_msh_geometry(void)
This function writes geometry (position of nodes) to GMSH (.msh) file format.
Definition: output_msh.cc:54
int write_tail(void)
This method should write tail of GMSH (.msh) file format.
Definition: output_msh.cc:263
Small extension of Vector container with support to Id numbers.
Definition: sys_vector.hh:164
static Input::Type::Record input_type
The definition of input record for gmsh file format.
Definition: output_msh.h:59
void write_msh_ascii_cont_data(flow::VectorId< element > &vec, OutputDataBase *output_data)
This function writes continuous ascii data to GMSH (.msh) output file.
Definition: output_msh.cc:93
void write_msh_topology(void)
This function writes topology (connection of nodes) to the GMSH (.msh) file format.
Definition: output_msh.cc:68
Accessor to the data with type Type::Record.
Definition: accessors.hh:308
void write_msh_ascii_discont_data(OutputDataBase *output_data)
This function writes discontinuous ascii data to GMSH (.msh) output file.
Definition: output_msh.cc:111
bool header_written
Definition: output_msh.h:91
void write_msh_node_data(double time, int step)
This function write all data on nodes to output file. This function is used for static and dynamic da...
Definition: output_msh.cc:135
~OutputMSH()
The destructor of this class.
Definition: output_msh.cc:274
The class for outputing data during time.
Definition: output_time.hh:37
int write_data(void)
This method writes data to GMSH (.msh) file format for current time.
Definition: output_msh.cc:242
Record type proxy class.
Definition: type_record.hh:161
This class is used for output data to VTK file format.
Definition: output_msh.h:38
int write_head(void)
This method writes head of GMSH (.msh) file format.
Definition: output_msh.cc:227