/usr/include/libmesh/xdr_head.h is in libmesh-dev 0.7.1-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | // $Id: xdr_head.h 3874 2010-07-02 21:57:26Z roystgnr $
// The libMesh Finite Element Library.
// Copyright (C) 2002-2008 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef __xdr_head_h__
#define __xdr_head_h__
// Local includes
#include "xdr_mgf.h"
namespace libMesh
{
/**
* The \p XdrHEAD class. This is a base class for deriving either
* solution (\p XdrSHEAD) or mesh (\p XdrMHEAD) header interface
* classes.
*
* @author Bill Barth, Robert McLay.
*/
class XdrHEAD
{
public:
/**
* Constructor.
*/
XdrHEAD();
/**
* Destructor.
*/
virtual ~XdrHEAD();
/**
* Set the mesh/solution file id.
*/
void setId(const char* id) { delete [] mp_id; mp_id = cpyString(id); }
/**
* Get the mesh/solution file id.
*/
const char* getId() const { return mp_id; }
/**
* Set the mesh/solution file title.
*/
void setTitle(const char* title) { delete [] mp_title; mp_title = cpyString(title); }
/**
* Get the mesh/solution file title.
*/
const char* getTitle() const { return mp_title; }
/**
* Set the total number of
* nodes in the mesh/solution file.
*/
void setNumNodes(int numNodes) { m_numNodes = numNodes; }
/**
* Get the total number of
* nodes in the mesh/solution file.
*/
int getNumNodes() const { return m_numNodes; }
/**
* Set the number of
* boundary conditions in the
* mesh/solution file.
*/
void setNumBCs(int numBCs) { m_numBCs = numBCs; }
/**
* Get the number of
* boundary conditions in
* them mesh/solution file.
*/
int getNumBCs() const { return m_numBCs; }
/**
* Set the string size of the
* mesh/solution file. (?)
*/
void setStrSize(int strSize) { m_strSize = strSize; }
// /**
// * Set the string size of the
// * mesh /solutionfile. (?)
// */
// int getStrSize() const { return m_strSize; }
protected:
/**
* Number of variables written
* to output, e.g. u,v,w,p,T = 5
*/
int m_wrtVar;
/**
* Total number of variables,
* may differ from the total
* number of variables actually
* written.
*/
int m_numvar;
/**
* The mesh file number
* which corresponds to a given
* solution file.
*/
int m_meshCnt;
/**
* The internal solution number.
*/
int m_kstep;
/**
* Number of elemetns in the
* solution/mesh.
*/
int m_numel;
/**
* Number of nodes in the
* solution/mesh.
*/
int m_numNodes;
/**
* Total mesh weighting i.e.
* How many nodes are there
* and where are they?
*/
int m_sumWghts;
/**
* Number of boundary
* conditions in the solution/mesh.
*/
int m_numBCs;
/**
* String size (Not sure of what?)
*/
int m_strSize;
/**
* An ID string for the file.
*/
char* mp_id;
/**
* A title string for the file.
*/
char* mp_title;
/**
* User's simulation title
*/
char* mp_userTitle;
/**
* List of null-separated variable names.
*/
char* mp_varTitle;
/**
* Current solution time.
*/
xdr_Real m_time;
/**
* Uses std::memcpy to create an exact
* copy of \p src, then returns
* that copy. Note: I don't know
* where the memory allocated
* for this copy gets deleted!
*
* @return Copy of \p src
*/
char* cpyString(const char* src, int len = -1);
private:
XdrHEAD(const XdrHEAD&);
const XdrHEAD& operator=(const XdrHEAD&);
};
} // namespace libMesh
#endif // #ifndef __xdr_head_h__
|