xdr_shead.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_SHEAD_H
19 #define LIBMESH_XDR_SHEAD_H
20 
21 // Local includes
22 #include "libmesh/xdr_head.h" // for base class
23 
24 // C++ includes
25 
26 namespace libMesh
27 {
28 
29 // Forward declarations
30 class XdrSOLN;
31 
40 class XdrSHEAD : public XdrHEAD
41 {
42  friend class XdrSOLN;
43 public:
47  XdrSHEAD() {}
48 
52  ~XdrSHEAD() {}
53 
58  void setNumVar(int numvar) { m_numvar = numvar; }
59 
60  // /**
61  // * Get the total number of
62  // * solution variables.
63  // */
64  // int getNumVar() const { return m_numvar; }
65 
70  void setWrtVar(int wrtVar) { m_wrtVar = wrtVar; }
71 
76  int getWrtVar() const { return m_wrtVar; }
77 
81  void setMeshCnt(int meshCnt) { m_meshCnt = meshCnt; }
82 
83  // /**
84  // * Get the mesh file number.
85  // */
86  // int getMeshCnt() const { return m_meshCnt; }
87 
92  void setKstep(int kstep) { m_kstep = kstep; }
93 
94  // /**
95  // * Get the solution step
96  // * number.
97  // */
98  // int getKstep() const { return m_kstep; }
99 
103  void setTime(Real time) { m_time = time; }
104 
105  // /**
106  // * Get the solution time.
107  // */
108  // Real getTime() const { return m_time; }
109 
113  void setUserTitle(const char * title) { delete [] mp_userTitle; mp_userTitle = cpyString(title); }
114 
118  const char * getUserTitle() const { return mp_userTitle; }
119 
124  void setVarTitle(const char * titles, int len) { delete [] mp_varTitle; mp_varTitle = cpyString(titles, len); }
125 
130  const char * getVarTitle() const { return mp_varTitle; }
131 
132 };
133 
134 
135 } // namespace libMesh
136 
137 #endif // LIBMESH_XDR_SHEAD_H
void setNumVar(int numvar)
Definition: xdr_shead.h:58
void setTime(Real time)
Definition: xdr_shead.h:103
const char * getVarTitle() const
Definition: xdr_shead.h:130
int getWrtVar() const
Definition: xdr_shead.h:76
const char * getUserTitle() const
Definition: xdr_shead.h:118
void setUserTitle(const char *title)
Definition: xdr_shead.h:113
char * mp_userTitle
Definition: xdr_head.h:178
char * cpyString(const char *src, int len=-1)
Definition: xdr_head.C:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void setMeshCnt(int meshCnt)
Definition: xdr_shead.h:81
void setWrtVar(int wrtVar)
Definition: xdr_shead.h:70
char * mp_varTitle
Definition: xdr_head.h:183
xdr_Real m_time
Definition: xdr_head.h:188
void setVarTitle(const char *titles, int len)
Definition: xdr_shead.h:124
void setKstep(int kstep)
Definition: xdr_shead.h:92