libMesh::XdrSHEAD Class Reference

#include <xdr_shead.h>

Inheritance diagram for libMesh::XdrSHEAD:

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
 

Detailed Description

The XdrSHEAD class. This class is responsible for reading/writing xdr solution file headers.

Author
Bill Barth, Robert McLay.

Definition at line 36 of file xdr_shead.h.

Constructor & Destructor Documentation

libMesh::XdrSHEAD::XdrSHEAD ( )
inline

Constructor.

Definition at line 43 of file xdr_shead.h.

43 {}
libMesh::XdrSHEAD::~XdrSHEAD ( )
inline

Destructor.

Definition at line 48 of file xdr_shead.h.

48 {}

Member Function Documentation

char * libMesh::XdrHEAD::cpyString ( const char *  src,
int  len = -1 
)
protectedinherited

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!

Returns
Copy of src

Definition at line 59 of file xdr_head.C.

Referenced by libMesh::XdrMESH::header(), libMesh::XdrHEAD::setId(), libMesh::XdrHEAD::setTitle(), setUserTitle(), and setVarTitle().

60 {
61  char* temp = NULL;
62  int myLen = len;
63  if(src)
64  {
65  if (myLen == -1)
66  myLen = libmesh_cast_int<int>(std::strlen(src))+1;
67  temp = new char[myLen];
68  temp = (char *) std::memcpy(temp, src, (myLen)*sizeof(char));
69  }
70  return temp;
71 }
const char* libMesh::XdrHEAD::getId ( ) const
inlineinherited

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().

55 { return mp_id; }
int libMesh::XdrHEAD::getNumBCs ( ) const
inlineinherited

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().

91 { return m_numBCs; }
int libMesh::XdrHEAD::getNumNodes ( ) const
inlineinherited

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().

77 { return m_numNodes; }
const char* libMesh::XdrHEAD::getTitle ( ) const
inlineinherited

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().

65 { 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().

114 { 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().

126 { 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().

72 { return m_wrtVar; }
void libMesh::XdrHEAD::setId ( const char *  id)
inlineinherited

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().

50 { delete [] mp_id; mp_id = cpyString(id); }
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().

88 { 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().

77 { m_meshCnt = meshCnt; }
void libMesh::XdrHEAD::setNumBCs ( int  numBCs)
inlineinherited

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().

84 { m_numBCs = numBCs; }
void libMesh::XdrHEAD::setNumNodes ( int  numNodes)
inlineinherited

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().

71 { 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().

54 { m_numvar = numvar; }
void libMesh::XdrHEAD::setStrSize ( int  strSize)
inlineinherited

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().

97 { 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().

99 { m_time = time; }
void libMesh::XdrHEAD::setTitle ( const char *  title)
inlineinherited

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().

60 { delete [] mp_title; mp_title = cpyString(title); }
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().

109 { 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().

120 { 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().

66 { m_wrtVar = wrtVar; }

Friends And Related Function Documentation

friend class XdrSOLN
friend

Definition at line 38 of file xdr_shead.h.

Member Data Documentation

int libMesh::XdrHEAD::m_kstep
protectedinherited

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
protectedinherited

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
protectedinherited

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
protectedinherited

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
protectedinherited
int libMesh::XdrHEAD::m_numvar
protectedinherited

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
protectedinherited

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
protectedinherited

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
protectedinherited

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
protectedinherited

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
protectedinherited
char* libMesh::XdrHEAD::mp_title
protectedinherited
char* libMesh::XdrHEAD::mp_userTitle
protectedinherited

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
protectedinherited

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().


The documentation for this class was generated from the following file:

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

Hosted By:
SourceForge.net Logo