$extrastylesheet
xdr_mesh.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 #ifndef LIBMESH_XDR_MESH_H
00019 #define LIBMESH_XDR_MESH_H
00020 
00021 // Local Includes
00022 #include "libmesh/xdr_mgf.h"
00023 
00024 // C++ includes
00025 
00026 namespace libMesh
00027 {
00028 
00029 // forward declarations
00030 class XdrMHEAD;
00031 
00041 class XdrMESH: public XdrMGF
00042 {
00043 public:
00044 
00049   XdrMESH() : m_dim(-1) {}
00050 
00061   void init(XdrIO_TYPE type, const char* fn, int icnt, int dim=3)
00062   { XdrMGF::init(type, fn, "mesh", icnt); m_dim = dim;}
00063 
00067   ~XdrMESH() {}
00068 
00077   int header(XdrMHEAD *hd);
00078 
00087   int Icon(int* array, int numvar, int num)   { return dataBlk(array, numvar, num);}
00088 
00096   int coord(Real* array, int dim, int size)  { return dataBlk(array, dim, size);}
00097 
00105   int BC(int* array, int size)                { return dataBlk(array, 3, size);}
00106 
00107 
00108 private:
00109 
00113   int m_dim;
00114 };
00115 
00116 } // namespace libMesh
00117 
00118 #endif // LIBMESH_XDR_MESH_H