$extrastylesheet
tecplot_io.h
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
00003 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 
00019 
00020 #ifndef LIBMESH_TECPLOT_IO_H
00021 #define LIBMESH_TECPLOT_IO_H
00022 
00023 // Local includes
00024 #include "libmesh/libmesh_common.h"
00025 #include "libmesh/mesh_output.h"
00026 
00027 // C++ Includes
00028 #include <cstddef>
00029 #include <set>
00030 
00031 namespace libMesh
00032 {
00033 
00034 // Forward declarations
00035 class MeshBase;
00036 
00037 
00038 
00045 // ------------------------------------------------------------
00046 // TecplotIO class definition
00047 class TecplotIO : public MeshOutput<MeshBase>
00048 {
00049 public:
00050 
00058   explicit
00059   TecplotIO (const MeshBase&, const bool binary=false,
00060              const double time=0., const int strand_offset=0);
00061 
00065   virtual void write (const std::string& );
00066 
00071   virtual void write_nodal_data (const std::string&,
00072                                  const std::vector<Number>&,
00073                                  const std::vector<std::string>&);
00074 
00079   bool & binary ();
00080 
00085   double & time ();
00086 
00093   int & strand_offset ();
00094 
00098   std::string & zone_title ();
00099 
00105   bool & ascii_append ();
00106 
00107 private:
00108 
00114   void write_ascii (const std::string&,
00115                     const std::vector<Number>* = NULL,
00116                     const std::vector<std::string>* = NULL);
00117 
00125   void write_binary (const std::string&,
00126                      const std::vector<Number>* = NULL,
00127                      const std::vector<std::string>* = NULL);
00128 
00136   unsigned elem_dimension();
00137 
00138   //---------------------------------------------------------------------------
00139   // local data
00140 
00144   bool _binary;
00145 
00149   double _time;
00150 
00154   int _strand_offset;
00155 
00159   std::string _zone_title;
00160 
00165   bool _ascii_append;
00166 
00170   std::set<subdomain_id_type> _subdomain_ids;
00171 };
00172 
00173 } // namespace libMesh
00174 
00175 
00176 #endif // LIBMESH_TECPLOT_IO_H