xdr_mhead.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef LIBMESH_XDR_MHEAD_H
19 #define LIBMESH_XDR_MHEAD_H
20 
21 // Local includes
22 #include "libmesh/xdr_head.h" // for base class
23 #include "libmesh/xdr_mesh.h" // for friend
24 #include "libmesh/enum_elem_type.h" // for ElemType
25 
26 // C++ includes
27 #include <vector>
28 
29 namespace libMesh
30 {
31 
39 class XdrMHEAD : public XdrHEAD
40 {
41  friend class XdrMESH;
42 public:
47  XdrMHEAD() : _n_blocks(1) {}
48 
52  ~XdrMHEAD() {}
53 
58  void setNumEl(int numel) { m_numel = numel; }
59 
64  int getNumEl() const { return m_numel; }
65 
71  void setSumWghts(int sumWghts) { m_sumWghts = sumWghts; }
72 
78  int getSumWghts() const { return m_sumWghts; }
79 
86  unsigned int get_n_blocks() const { return _n_blocks; }
87 
91  void set_n_blocks(const unsigned int nb) { this->_n_blocks = nb; }
92 
99  void get_block_elt_types(std::vector<ElemType>& bet) const { bet = block_elt_types; }
100 
104  void set_block_elt_types(const std::vector<ElemType>& bet) { block_elt_types = bet; }
105 
113  void get_num_elem_each_block(std::vector<unsigned int>& neeb) const { neeb = num_elem_each_block; }
114 
118  void set_num_elem_each_block(const std::vector<unsigned int>& neeb) { num_elem_each_block = neeb; }
119 
120 
121 private:
122 
132  unsigned int _n_blocks;
133 
134 
144  std::vector<ElemType> block_elt_types;
145 
151  std::vector<unsigned int> num_elem_each_block;
152 
153 };
154 
155 } // namespace libMesh
156 
157 #endif // LIBMESH_XDR_MHEAD_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo