xdr_head.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_HEAD_H
19 #define LIBMESH_XDR_HEAD_H
20 
21 // Local includes
22 #include "libmesh/xdr_mgf.h"
23 
24 namespace libMesh
25 {
26 
34 class XdrHEAD
35 {
36 public:
40  XdrHEAD();
41 
45  virtual ~XdrHEAD();
46 
50  void setId(const char* id) { delete [] mp_id; mp_id = cpyString(id); }
51 
55  const char* getId() const { return mp_id; }
56 
60  void setTitle(const char* title) { delete [] mp_title; mp_title = cpyString(title); }
61 
65  const char* getTitle() const { return mp_title; }
66 
71  void setNumNodes(int numNodes) { m_numNodes = numNodes; }
72 
77  int getNumNodes() const { return m_numNodes; }
78 
84  void setNumBCs(int numBCs) { m_numBCs = numBCs; }
85 
91  int getNumBCs() const { return m_numBCs; }
92 
97  void setStrSize(int strSize) { m_strSize = strSize; }
98 
99  // /**
100  // * Set the string size of the
101  // * mesh /solutionfile. (?)
102  // */
103  // int getStrSize() const { return m_strSize; }
104 
105 protected:
106 
111  int m_wrtVar;
112 
119  int m_numvar;
120 
127 
131  int m_kstep;
132 
137  int m_numel;
138 
144 
151 
156  int m_numBCs;
157 
162 
166  char* mp_id;
167 
171  char* mp_title;
172 
177 
181  char* mp_varTitle;
182 
186  xdr_Real m_time;
187 
197  char* cpyString(const char* src, int len = -1);
198 
199 private:
200  XdrHEAD(const XdrHEAD&);
201  const XdrHEAD& operator=(const XdrHEAD&);
202 };
203 
204 
205 } // namespace libMesh
206 
207 
208 #endif // LIBMESH_XDR_HEAD_H

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

Hosted By:
SourceForge.net Logo