$extrastylesheet
#include <xdr_shead.h>

Public Member Functions | |
| XdrSHEAD () | |
| ~XdrSHEAD () | |
| void | setNumVar (int numvar) |
| void | setWrtVar (int wrtVar) |
| int | getWrtVar () const |
| void | setMeshCnt (int meshCnt) |
| void | setKstep (int kstep) |
| void | setTime (Real time) |
| void | setUserTitle (const char *title) |
| const char * | getUserTitle () const |
| void | setVarTitle (const char *titles, int len) |
| const char * | getVarTitle () const |
| void | setId (const char *id) |
| const char * | getId () const |
| void | setTitle (const char *title) |
| const char * | getTitle () const |
| void | setNumNodes (int numNodes) |
| int | getNumNodes () const |
| void | setNumBCs (int numBCs) |
| int | getNumBCs () const |
| void | setStrSize (int strSize) |
Protected Member Functions | |
| char * | cpyString (const char *src, int len=-1) |
Protected Attributes | |
| int | m_wrtVar |
| int | m_numvar |
| int | m_meshCnt |
| int | m_kstep |
| int | m_numel |
| int | m_numNodes |
| int | m_sumWghts |
| int | m_numBCs |
| int | m_strSize |
| char * | mp_id |
| char * | mp_title |
| char * | mp_userTitle |
| char * | mp_varTitle |
| xdr_Real | m_time |
Friends | |
| class | XdrSOLN |
The XdrSHEAD class. This class is responsible for reading/writing xdr solution file headers.
Definition at line 36 of file xdr_shead.h.
| libMesh::XdrSHEAD::XdrSHEAD | ( | ) | [inline] |
| libMesh::XdrSHEAD::~XdrSHEAD | ( | ) | [inline] |
| char * libMesh::XdrHEAD::cpyString | ( | const char * | src, |
| int | len = -1 |
||
| ) | [protected, inherited] |
Uses std::memcpy to create an exact copy of src, then returns that copy. Note: I don't know where the memory allocated for this copy gets deleted!
src Definition at line 59 of file xdr_head.C.
Referenced by libMesh::XdrMESH::header(), libMesh::XdrHEAD::setId(), libMesh::XdrHEAD::setTitle(), setUserTitle(), and setVarTitle().
{
char* temp = NULL;
int myLen = len;
if(src)
{
if (myLen == -1)
myLen = cast_int<int>(std::strlen(src))+1;
temp = new char[myLen];
temp = (char *) std::memcpy(temp, src, (myLen)*sizeof(char));
}
return temp;
}
| const char* libMesh::XdrHEAD::getId | ( | ) | const [inline, inherited] |
Get the mesh/solution file id.
Definition at line 55 of file xdr_head.h.
References libMesh::XdrHEAD::mp_id.
Referenced by libMesh::XdrSOLN::header(), and libMesh::XdrMESH::header().
{ return mp_id; }
| int libMesh::XdrHEAD::getNumBCs | ( | ) | const [inline, inherited] |
Get the number of boundary conditions in them mesh/solution file.
Definition at line 91 of file xdr_head.h.
References libMesh::XdrHEAD::m_numBCs.
Referenced by libMesh::LegacyXdrIO::read_mesh().
{ return m_numBCs; }
| int libMesh::XdrHEAD::getNumNodes | ( | ) | const [inline, inherited] |
Get the total number of nodes in the mesh/solution file.
Definition at line 77 of file xdr_head.h.
References libMesh::XdrHEAD::m_numNodes.
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::read_soln().
{ return m_numNodes; }
| const char* libMesh::XdrHEAD::getTitle | ( | ) | const [inline, inherited] |
Get the mesh/solution file title.
Definition at line 65 of file xdr_head.h.
References libMesh::XdrHEAD::mp_title.
Referenced by libMesh::XdrSOLN::header(), and libMesh::XdrMESH::header().
{ return mp_title; }
| const char* libMesh::XdrSHEAD::getUserTitle | ( | ) | const [inline] |
Get the user solution title.
Definition at line 114 of file xdr_shead.h.
References libMesh::XdrHEAD::mp_userTitle.
Referenced by libMesh::XdrSOLN::header().
{ return mp_userTitle; }
| const char* libMesh::XdrSHEAD::getVarTitle | ( | ) | const [inline] |
Get null-terminated list of variable names.
Definition at line 126 of file xdr_shead.h.
References libMesh::XdrHEAD::mp_varTitle.
Referenced by libMesh::XdrSOLN::header(), and libMesh::LegacyXdrIO::read_soln().
{ return mp_varTitle; }
| int libMesh::XdrSHEAD::getWrtVar | ( | ) | const [inline] |
Get the number of written solution variables.
Definition at line 72 of file xdr_shead.h.
References libMesh::XdrHEAD::m_wrtVar.
Referenced by libMesh::LegacyXdrIO::read_soln().
{ return m_wrtVar; }
| void libMesh::XdrHEAD::setId | ( | const char * | id | ) | [inline, inherited] |
Set the mesh/solution file id.
Definition at line 50 of file xdr_head.h.
References libMesh::XdrHEAD::cpyString(), and libMesh::XdrHEAD::mp_id.
Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().
| void libMesh::XdrSHEAD::setKstep | ( | int | kstep | ) | [inline] |
Get the mesh file number. Set the solution step number.
Definition at line 88 of file xdr_shead.h.
References libMesh::XdrHEAD::m_kstep.
Referenced by libMesh::LegacyXdrIO::write_soln().
{ m_kstep = kstep; }
| void libMesh::XdrSHEAD::setMeshCnt | ( | int | meshCnt | ) | [inline] |
Set the mesh file number.
Definition at line 77 of file xdr_shead.h.
References libMesh::XdrHEAD::m_meshCnt.
Referenced by libMesh::LegacyXdrIO::write_soln().
{ m_meshCnt = meshCnt; }
| void libMesh::XdrHEAD::setNumBCs | ( | int | numBCs | ) | [inline, inherited] |
Set the number of boundary conditions in the mesh/solution file.
Definition at line 84 of file xdr_head.h.
References libMesh::XdrHEAD::m_numBCs.
Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().
{ m_numBCs = numBCs; }
| void libMesh::XdrHEAD::setNumNodes | ( | int | numNodes | ) | [inline, inherited] |
Set the total number of nodes in the mesh/solution file.
Definition at line 71 of file xdr_head.h.
References libMesh::XdrHEAD::m_numNodes.
Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().
{ m_numNodes = numNodes; }
| void libMesh::XdrSHEAD::setNumVar | ( | int | numvar | ) | [inline] |
Set the total number of solution variables.
Definition at line 54 of file xdr_shead.h.
References libMesh::XdrHEAD::m_numvar.
Referenced by libMesh::LegacyXdrIO::write_soln().
{ m_numvar = numvar; }
| void libMesh::XdrHEAD::setStrSize | ( | int | strSize | ) | [inline, inherited] |
Set the string size of the mesh/solution file. (?)
Definition at line 97 of file xdr_head.h.
References libMesh::XdrHEAD::m_strSize.
Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().
{ m_strSize = strSize; }
| void libMesh::XdrSHEAD::setTime | ( | Real | time | ) | [inline] |
Get the solution step number. Set the solution time.
Definition at line 99 of file xdr_shead.h.
References libMesh::XdrHEAD::m_time.
Referenced by libMesh::LegacyXdrIO::write_soln().
{ m_time = time; }
| void libMesh::XdrHEAD::setTitle | ( | const char * | title | ) | [inline, inherited] |
Set the mesh/solution file title.
Definition at line 60 of file xdr_head.h.
References libMesh::XdrHEAD::cpyString(), and libMesh::XdrHEAD::mp_title.
Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().
| void libMesh::XdrSHEAD::setUserTitle | ( | const char * | title | ) | [inline] |
Get the solution time. Set the user solution title.
Definition at line 109 of file xdr_shead.h.
References libMesh::XdrHEAD::cpyString(), and libMesh::XdrHEAD::mp_userTitle.
Referenced by libMesh::XdrSOLN::header(), and libMesh::LegacyXdrIO::write_soln().
{ delete [] mp_userTitle; mp_userTitle = cpyString(title); }
| void libMesh::XdrSHEAD::setVarTitle | ( | const char * | titles, |
| int | len | ||
| ) | [inline] |
Set null-terminated list of variable names.
Definition at line 120 of file xdr_shead.h.
References libMesh::XdrHEAD::cpyString(), and libMesh::XdrHEAD::mp_varTitle.
Referenced by libMesh::XdrSOLN::header(), and libMesh::LegacyXdrIO::write_soln().
{ delete [] mp_varTitle; mp_varTitle = cpyString(titles, len); }
| void libMesh::XdrSHEAD::setWrtVar | ( | int | wrtVar | ) | [inline] |
Get the total number of solution variables. Set the number of written solution variables.
Definition at line 66 of file xdr_shead.h.
References libMesh::XdrHEAD::m_wrtVar.
Referenced by libMesh::LegacyXdrIO::write_soln().
{ m_wrtVar = wrtVar; }
friend class XdrSOLN [friend] |
Definition at line 38 of file xdr_shead.h.
int libMesh::XdrHEAD::m_kstep [protected, inherited] |
The internal solution number.
Definition at line 131 of file xdr_head.h.
Referenced by libMesh::XdrSOLN::header(), setKstep(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_meshCnt [protected, inherited] |
The mesh file number which corresponds to a given solution file.
Definition at line 126 of file xdr_head.h.
Referenced by libMesh::XdrSOLN::header(), setMeshCnt(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_numBCs [protected, inherited] |
Number of boundary conditions in the solution/mesh.
Definition at line 156 of file xdr_head.h.
Referenced by libMesh::XdrHEAD::getNumBCs(), libMesh::XdrMESH::header(), libMesh::XdrHEAD::setNumBCs(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_numel [protected, inherited] |
Number of elemetns in the solution/mesh.
Definition at line 137 of file xdr_head.h.
Referenced by libMesh::XdrMHEAD::getNumEl(), libMesh::XdrMESH::header(), libMesh::XdrMHEAD::setNumEl(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_numNodes [protected, inherited] |
Number of nodes in the solution/mesh.
Definition at line 143 of file xdr_head.h.
Referenced by libMesh::XdrHEAD::getNumNodes(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::XdrHEAD::setNumNodes(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_numvar [protected, inherited] |
Total number of variables, may differ from the total number of variables actually written.
Definition at line 119 of file xdr_head.h.
Referenced by libMesh::XdrSOLN::header(), setNumVar(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_strSize [protected, inherited] |
String size (Not sure of what?)
Definition at line 161 of file xdr_head.h.
Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::XdrHEAD::setStrSize(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_sumWghts [protected, inherited] |
Total mesh weighting i.e. How many nodes are there and where are they?
Definition at line 150 of file xdr_head.h.
Referenced by libMesh::XdrMHEAD::getSumWghts(), libMesh::XdrMESH::header(), libMesh::XdrMHEAD::setSumWghts(), and libMesh::XdrHEAD::XdrHEAD().
xdr_Real libMesh::XdrHEAD::m_time [protected, inherited] |
Current solution time.
Definition at line 186 of file xdr_head.h.
Referenced by libMesh::XdrSOLN::header(), setTime(), and libMesh::XdrHEAD::XdrHEAD().
int libMesh::XdrHEAD::m_wrtVar [protected, inherited] |
Set the string size of the mesh /solutionfile. (?) Number of variables written to output, e.g. u,v,w,p,T = 5
Definition at line 111 of file xdr_head.h.
Referenced by getWrtVar(), libMesh::XdrSOLN::header(), setWrtVar(), and libMesh::XdrHEAD::XdrHEAD().
char* libMesh::XdrHEAD::mp_id [protected, inherited] |
An ID string for the file.
Definition at line 166 of file xdr_head.h.
Referenced by libMesh::XdrHEAD::getId(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::XdrHEAD::setId(), libMesh::XdrHEAD::XdrHEAD(), and libMesh::XdrHEAD::~XdrHEAD().
char* libMesh::XdrHEAD::mp_title [protected, inherited] |
A title string for the file.
Definition at line 171 of file xdr_head.h.
Referenced by libMesh::XdrHEAD::getTitle(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::XdrHEAD::setTitle(), libMesh::XdrHEAD::XdrHEAD(), and libMesh::XdrHEAD::~XdrHEAD().
char* libMesh::XdrHEAD::mp_userTitle [protected, inherited] |
User's simulation title
Definition at line 176 of file xdr_head.h.
Referenced by getUserTitle(), libMesh::XdrSOLN::header(), setUserTitle(), libMesh::XdrHEAD::XdrHEAD(), and libMesh::XdrHEAD::~XdrHEAD().
char* libMesh::XdrHEAD::mp_varTitle [protected, inherited] |
List of null-separated variable names.
Definition at line 181 of file xdr_head.h.
Referenced by getVarTitle(), libMesh::XdrSOLN::header(), setVarTitle(), libMesh::XdrHEAD::XdrHEAD(), and libMesh::XdrHEAD::~XdrHEAD().