$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 #ifndef LIBMESH_XDR_MHEAD_H 00019 #define LIBMESH_XDR_MHEAD_H 00020 00021 // Local includes 00022 #include "libmesh/xdr_head.h" // for base class 00023 #include "libmesh/xdr_mesh.h" // for friend 00024 #include "libmesh/enum_elem_type.h" // for ElemType 00025 00026 // C++ includes 00027 #include <vector> 00028 00029 namespace libMesh 00030 { 00031 00039 class XdrMHEAD : public XdrHEAD 00040 { 00041 friend class XdrMESH; 00042 public: 00047 XdrMHEAD() : _n_blocks(1) {} 00048 00052 ~XdrMHEAD() {} 00053 00058 void setNumEl(int numel) { m_numel = numel; } 00059 00064 int getNumEl() const { return m_numel; } 00065 00071 void setSumWghts(int sumWghts) { m_sumWghts = sumWghts; } 00072 00078 int getSumWghts() const { return m_sumWghts; } 00079 00086 unsigned int get_n_blocks() const { return _n_blocks; } 00087 00091 void set_n_blocks(const unsigned int nb) { this->_n_blocks = nb; } 00092 00099 void get_block_elt_types(std::vector<ElemType>& bet) const { bet = block_elt_types; } 00100 00104 void set_block_elt_types(const std::vector<ElemType>& bet) { block_elt_types = bet; } 00105 00113 void get_num_elem_each_block(std::vector<unsigned int>& neeb) const { neeb = num_elem_each_block; } 00114 00118 void set_num_elem_each_block(const std::vector<unsigned int>& neeb) { num_elem_each_block = neeb; } 00119 00120 00121 private: 00122 00132 unsigned int _n_blocks; 00133 00134 00144 std::vector<ElemType> block_elt_types; 00145 00151 std::vector<unsigned int> num_elem_each_block; 00152 00153 }; 00154 00155 } // namespace libMesh 00156 00157 #endif // LIBMESH_XDR_MHEAD_H