$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_MEDIT_IO_H 00021 #define LIBMESH_MEDIT_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 00030 namespace libMesh 00031 { 00032 00033 // Forward declarations: 00034 class MeshBase; 00035 00036 00037 00049 // ------------------------------------------------------------ 00050 // medit_io class definition 00051 class MEDITIO : public MeshOutput<MeshBase> 00052 { 00053 public: 00054 00059 explicit 00060 MEDITIO (const MeshBase&); 00061 00067 MEDITIO (const MeshBase&, unsigned int c); 00068 00072 virtual void write (const std::string& ); 00073 00078 virtual void write_nodal_data (const std::string&, 00079 const std::vector<Number>&, 00080 const std::vector<std::string>&); 00081 00085 bool & binary (); 00086 00087 private: 00088 00094 virtual void write_ascii (const std::string&, 00095 const std::vector<Number>* = NULL, 00096 const std::vector<std::string>* = NULL); 00097 00101 bool _binary; 00102 00103 unsigned int scalar_idx; 00104 }; 00105 00106 00107 00108 // ------------------------------------------------------------ 00109 // medit_io inline members 00110 inline 00111 MEDITIO::MEDITIO (const MeshBase& mesh_in) : 00112 MeshOutput<MeshBase> (mesh_in), 00113 _binary (false), 00114 scalar_idx (0) 00115 { 00116 } 00117 00118 inline 00119 MEDITIO::MEDITIO (const MeshBase& mesh_in, unsigned int c) : 00120 MeshOutput<MeshBase> (mesh_in), 00121 _binary (false), 00122 scalar_idx (c) 00123 { 00124 } 00125 00126 00127 inline 00128 bool & MEDITIO::binary () 00129 { 00130 return _binary; 00131 } 00132 00133 00134 } // namespace libMesh 00135 00136 00137 #endif // LIBMESH_MEDIT_IO_H