tecplot_io.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 00100 private: 00101 00107 void write_ascii (const std::string&, 00108 const std::vector<Number>* = NULL, 00109 const std::vector<std::string>* = NULL); 00110 00118 void write_binary (const std::string&, 00119 const std::vector<Number>* = NULL, 00120 const std::vector<std::string>* = NULL); 00121 00122 //--------------------------------------------------------------------------- 00123 // local data 00124 00128 bool _binary; 00129 00133 double _time; 00134 00138 int _strand_offset; 00139 00143 std::string _zone_title; 00144 00148 std::set<subdomain_id_type> _subdomain_ids; 00149 }; 00150 00151 00152 00153 // ------------------------------------------------------------ 00154 // TecplotIO inline members 00155 inline 00156 bool & TecplotIO::binary () 00157 { 00158 return _binary; 00159 } 00160 00161 00162 00163 inline 00164 double & TecplotIO::time () 00165 { 00166 return _time; 00167 } 00168 00169 00170 00171 inline 00172 int & TecplotIO::strand_offset () 00173 { 00174 return _strand_offset; 00175 } 00176 00177 00178 00179 inline 00180 std::string & TecplotIO::zone_title () 00181 { 00182 return _zone_title; 00183 } 00184 00185 00186 } // namespace libMesh 00187 00188 00189 #endif // LIBMESH_TECPLOT_IO_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:49 UTC
Hosted By: