xdr_head.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2016 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 
36 class XdrHEAD
37 {
38 public:
42  XdrHEAD();
43 
47  virtual ~XdrHEAD();
48 
52  void setId(const char * id) { delete [] mp_id; mp_id = cpyString(id); }
53 
57  const char * getId() const { return mp_id; }
58 
62  void setTitle(const char * title) { delete [] mp_title; mp_title = cpyString(title); }
63 
67  const char * getTitle() const { return mp_title; }
68 
73  void setNumNodes(int numNodes) { m_numNodes = numNodes; }
74 
79  int getNumNodes() const { return m_numNodes; }
80 
86  void setNumBCs(int numBCs) { m_numBCs = numBCs; }
87 
93  int getNumBCs() const { return m_numBCs; }
94 
99  void setStrSize(int strSize) { m_strSize = strSize; }
100 
101  // /**
102  // * Set the string size of the
103  // * mesh /solutionfile. (?)
104  // */
105  // int getStrSize() const { return m_strSize; }
106 
107 protected:
108 
113  int m_wrtVar;
114 
121  int m_numvar;
122 
129 
133  int m_kstep;
134 
139  int m_numel;
140 
146 
153 
158  int m_numBCs;
159 
164 
168  char * mp_id;
169 
173  char * mp_title;
174 
178  char * mp_userTitle;
179 
183  char * mp_varTitle;
184 
188  xdr_Real m_time;
189 
199  char * cpyString(const char * src, int len = -1);
200 
201 private:
202  XdrHEAD(const XdrHEAD &);
203  const XdrHEAD & operator=(const XdrHEAD &);
204 };
205 
206 
207 } // namespace libMesh
208 
209 
210 #endif // LIBMESH_XDR_HEAD_H
void setNumNodes(int numNodes)
Definition: xdr_head.h:73
const char * getTitle() const
Definition: xdr_head.h:67
const char * getId() const
Definition: xdr_head.h:57
char * mp_userTitle
Definition: xdr_head.h:178
int getNumNodes() const
Definition: xdr_head.h:79
virtual ~XdrHEAD()
Definition: xdr_head.C:49
char * cpyString(const char *src, int len=-1)
Definition: xdr_head.C:59
void setStrSize(int strSize)
Definition: xdr_head.h:99
void setId(const char *id)
Definition: xdr_head.h:52
void setNumBCs(int numBCs)
Definition: xdr_head.h:86
const XdrHEAD & operator=(const XdrHEAD &)
char * mp_varTitle
Definition: xdr_head.h:183
void setTitle(const char *title)
Definition: xdr_head.h:62
xdr_Real m_time
Definition: xdr_head.h:188
char * mp_title
Definition: xdr_head.h:173
int getNumBCs() const
Definition: xdr_head.h:93