$extrastylesheet
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_NEMESIS_IO_H 00021 #define LIBMESH_NEMESIS_IO_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/mesh_input.h" 00027 #include "libmesh/mesh_output.h" 00028 #include "libmesh/parallel_object.h" 00029 00030 // C++ includes 00031 00032 namespace libMesh 00033 { 00034 00035 // Forward declarations 00036 class Nemesis_IO_Helper; 00037 00038 00051 // ------------------------------------------------------------ 00052 // Nemesis_IO class definition 00053 class Nemesis_IO : public MeshInput<MeshBase>, 00054 public MeshOutput<MeshBase>, 00055 public ParallelObject 00056 { 00057 00058 public: 00059 00064 explicit 00065 Nemesis_IO (MeshBase& mesh, bool single_precision=false); 00066 00070 virtual ~Nemesis_IO (); 00071 00077 virtual void read (const std::string& base_filename); 00078 00082 virtual void write (const std::string& base_filename); 00083 00087 void write_timestep (const std::string& fname, const EquationSystems& es, const int timestep, const Real time); 00088 00092 void write_nodal_data (const std::string& fname, const std::vector<Number>& soln, const std::vector<std::string>& names); 00093 00097 void verbose (bool set_verbosity); 00098 00102 void write_global_data (const std::vector<Number>&, 00103 const std::vector<std::string>&); 00104 00108 void write_information_records (const std::vector<std::string>&); 00109 00115 void append(bool val); 00116 00117 private: 00118 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 00119 Nemesis_IO_Helper *nemhelper; 00120 #endif 00121 int _timestep; 00122 00123 bool _verbose; 00124 00129 bool _append; 00130 }; 00131 00132 00133 } // namespace libMesh 00134 00135 00136 #endif // LIBMESH_NEMESIS_IO_H