tecplot_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_TECPLOT_IO_H
21 #define LIBMESH_TECPLOT_IO_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/mesh_output.h"
26 
27 // C++ Includes
28 #include <cstddef>
29 #include <set>
30 
31 namespace libMesh
32 {
33 
34 // Forward declarations
35 class MeshBase;
36 
37 
38 
45 // ------------------------------------------------------------
46 // TecplotIO class definition
47 class TecplotIO : public MeshOutput<MeshBase>
48 {
49  public:
50 
58  explicit
59  TecplotIO (const MeshBase&, const bool binary=false,
60  const double time=0., const int strand_offset=0);
61 
65  virtual void write (const std::string& );
66 
71  virtual void write_nodal_data (const std::string&,
72  const std::vector<Number>&,
73  const std::vector<std::string>&);
74 
79  bool & binary ();
80 
85  double & time ();
86 
93  int & strand_offset ();
94 
98  std::string & zone_title ();
99 
100  private:
101 
107  void write_ascii (const std::string&,
108  const std::vector<Number>* = NULL,
109  const std::vector<std::string>* = NULL);
110 
118  void write_binary (const std::string&,
119  const std::vector<Number>* = NULL,
120  const std::vector<std::string>* = NULL);
121 
122  //---------------------------------------------------------------------------
123  // local data
124 
128  bool _binary;
129 
133  double _time;
134 
139 
143  std::string _zone_title;
144 
148  std::set<subdomain_id_type> _subdomain_ids;
149 };
150 
151 
152 
153 // ------------------------------------------------------------
154 // TecplotIO inline members
155 inline
157 {
158  return _binary;
159 }
160 
161 
162 
163 inline
164 double & TecplotIO::time ()
165 {
166  return _time;
167 }
168 
169 
170 
171 inline
173 {
174  return _strand_offset;
175 }
176 
177 
178 
179 inline
180 std::string & TecplotIO::zone_title ()
181 {
182  return _zone_title;
183 }
184 
185 
186 } // namespace libMesh
187 
188 
189 #endif // LIBMESH_TECPLOT_IO_H

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

Hosted By:
SourceForge.net Logo