exodusII_io.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_EXODUSII_IO_H
21 #define LIBMESH_EXODUSII_IO_H
22 
23 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/mesh_input.h"
27 #include "libmesh/mesh_output.h"
29 
30 // C++ includes
31 
32 namespace libMesh
33 {
34 
35 // Forward declarations
36 class EquationSystems;
37 class ExodusII_IO_Helper;
38 class MeshBase;
39 class System;
40 
50 // ------------------------------------------------------------
51 // ExodusII_IO class definition
52 class ExodusII_IO : public MeshInput<MeshBase>,
53  public MeshOutput<MeshBase>,
54  public ParallelObject
55 {
56  public:
57 
62  explicit
64 
68  virtual ~ExodusII_IO ();
69 
77  virtual void read (const std::string& name);
78 
82  virtual void write (const std::string& fname);
83 
87  void verbose (bool set_verbosity);
88 
92  const std::vector<Real>& get_time_steps();
93 
101  int get_num_time_steps();
102 
106  void copy_nodal_solution(System& system, std::string var_name, unsigned int timestep=1);
107 
112  void copy_nodal_solution(System& es, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1);
113 
118  void copy_elemental_solution(System& es, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1);
119 
123  void write_discontinuous_exodusII (const std::string& name, const EquationSystems& es);
124 
128  void write_element_data (const EquationSystems& es);
129 
133  void write_nodal_data (const std::string&,
134  const std::vector<Number>&,
135  const std::vector<std::string>&);
136 
140  void write_nodal_data_discontinuous (const std::string&,
141  const std::vector<Number>&,
142  const std::vector<std::string>&);
143 
147  void write_global_data (const std::vector<Number>&,
148  const std::vector<std::string>&);
149 
153  void write_information_records (const std::vector<std::string>&);
154 
159  void write_timestep (const std::string& fname,
160  const EquationSystems& es,
161  const int timestep,
162  const Real time);
163 
172  void set_output_variables(const std::vector<std::string> & output_variables, bool allow_empty = true);
173 
186 
192 
198  void append(bool val);
199 
200  private:
206 #ifdef LIBMESH_HAVE_EXODUS_API
208 #endif
209 
215 
219  bool _verbose;
220 
225  std::vector<std::string> _output_variables;
226 
231  bool _append;
232 
237  void write_nodal_data_common(std::string fname,
238  const std::vector<std::string>& names,
239  bool continuous=true);
240 
247 
248 };
249 
250 
251 } // namespace libMesh
252 
253 
254 #endif // LIBMESH_EXODUSII_IO_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo