$extrastylesheet
libMesh::XdrHEAD Class Reference

#include <xdr_head.h>

Inheritance diagram for libMesh::XdrHEAD:

List of all members.

Public Member Functions

 XdrHEAD ()
virtual ~XdrHEAD ()
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

Private Member Functions

 XdrHEAD (const XdrHEAD &)
const XdrHEADoperator= (const XdrHEAD &)

Detailed Description

The XdrHEAD class. This is a base class for deriving either solution (XdrSHEAD) or mesh (XdrMHEAD) header interface classes.

Author:
Bill Barth, Robert McLay.

Definition at line 34 of file xdr_head.h.


Constructor & Destructor Documentation

Destructor.

Definition at line 49 of file xdr_head.C.

References mp_id, mp_title, mp_userTitle, and mp_varTitle.

{
  delete [] mp_id;
  delete [] mp_title;
  delete [] mp_userTitle;
  delete [] mp_varTitle;
}
libMesh::XdrHEAD::XdrHEAD ( const XdrHEAD ) [private]

Member Function Documentation

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

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(), setId(), setTitle(), libMesh::XdrSHEAD::setUserTitle(), and libMesh::XdrSHEAD::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]

Get the mesh/solution file id.

Definition at line 55 of file xdr_head.h.

References mp_id.

Referenced by libMesh::XdrSOLN::header(), and libMesh::XdrMESH::header().

{ return mp_id; }
int libMesh::XdrHEAD::getNumBCs ( ) const [inline]

Get the number of boundary conditions in them mesh/solution file.

Definition at line 91 of file xdr_head.h.

References m_numBCs.

Referenced by libMesh::LegacyXdrIO::read_mesh().

{ return m_numBCs; }
int libMesh::XdrHEAD::getNumNodes ( ) const [inline]

Get the total number of nodes in the mesh/solution file.

Definition at line 77 of file xdr_head.h.

References m_numNodes.

Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::read_soln().

{ return m_numNodes; }
const char* libMesh::XdrHEAD::getTitle ( ) const [inline]

Get the mesh/solution file title.

Definition at line 65 of file xdr_head.h.

References mp_title.

Referenced by libMesh::XdrSOLN::header(), and libMesh::XdrMESH::header().

{ return mp_title; }
const XdrHEAD& libMesh::XdrHEAD::operator= ( const XdrHEAD ) [private]
void libMesh::XdrHEAD::setId ( const char *  id) [inline]

Set the mesh/solution file id.

Definition at line 50 of file xdr_head.h.

References cpyString(), and mp_id.

Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().

{ delete [] mp_id; mp_id = cpyString(id); }
void libMesh::XdrHEAD::setNumBCs ( int  numBCs) [inline]

Set the number of boundary conditions in the mesh/solution file.

Definition at line 84 of file xdr_head.h.

References m_numBCs.

Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().

{ m_numBCs = numBCs; }
void libMesh::XdrHEAD::setNumNodes ( int  numNodes) [inline]

Set the total number of nodes in the mesh/solution file.

Definition at line 71 of file xdr_head.h.

References m_numNodes.

Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().

{ m_numNodes = numNodes; }
void libMesh::XdrHEAD::setStrSize ( int  strSize) [inline]

Set the string size of the mesh/solution file. (?)

Definition at line 97 of file xdr_head.h.

References m_strSize.

Referenced by libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().

{ m_strSize = strSize; }
void libMesh::XdrHEAD::setTitle ( const char *  title) [inline]

Set the mesh/solution file title.

Definition at line 60 of file xdr_head.h.

References cpyString(), and mp_title.

Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), libMesh::LegacyXdrIO::write_mesh(), and libMesh::LegacyXdrIO::write_soln().

{ delete [] mp_title; mp_title = cpyString(title); }

Member Data Documentation

int libMesh::XdrHEAD::m_kstep [protected]

The internal solution number.

Definition at line 131 of file xdr_head.h.

Referenced by libMesh::XdrSOLN::header(), libMesh::XdrSHEAD::setKstep(), and XdrHEAD().

int libMesh::XdrHEAD::m_meshCnt [protected]

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(), libMesh::XdrSHEAD::setMeshCnt(), and XdrHEAD().

int libMesh::XdrHEAD::m_numBCs [protected]

Number of boundary conditions in the solution/mesh.

Definition at line 156 of file xdr_head.h.

Referenced by getNumBCs(), libMesh::XdrMESH::header(), setNumBCs(), and XdrHEAD().

int libMesh::XdrHEAD::m_numel [protected]

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

Number of nodes in the solution/mesh.

Definition at line 143 of file xdr_head.h.

Referenced by getNumNodes(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), setNumNodes(), and XdrHEAD().

int libMesh::XdrHEAD::m_numvar [protected]

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(), libMesh::XdrSHEAD::setNumVar(), and XdrHEAD().

int libMesh::XdrHEAD::m_strSize [protected]

String size (Not sure of what?)

Definition at line 161 of file xdr_head.h.

Referenced by libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), setStrSize(), and XdrHEAD().

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

xdr_Real libMesh::XdrHEAD::m_time [protected]

Current solution time.

Definition at line 186 of file xdr_head.h.

Referenced by libMesh::XdrSOLN::header(), libMesh::XdrSHEAD::setTime(), and XdrHEAD().

int libMesh::XdrHEAD::m_wrtVar [protected]

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 libMesh::XdrSHEAD::getWrtVar(), libMesh::XdrSOLN::header(), libMesh::XdrSHEAD::setWrtVar(), and XdrHEAD().

char* libMesh::XdrHEAD::mp_id [protected]

An ID string for the file.

Definition at line 166 of file xdr_head.h.

Referenced by getId(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), setId(), XdrHEAD(), and ~XdrHEAD().

char* libMesh::XdrHEAD::mp_title [protected]

A title string for the file.

Definition at line 171 of file xdr_head.h.

Referenced by getTitle(), libMesh::XdrSOLN::header(), libMesh::XdrMESH::header(), setTitle(), XdrHEAD(), and ~XdrHEAD().

char* libMesh::XdrHEAD::mp_varTitle [protected]

List of null-separated variable names.

Definition at line 181 of file xdr_head.h.

Referenced by libMesh::XdrSHEAD::getVarTitle(), libMesh::XdrSOLN::header(), libMesh::XdrSHEAD::setVarTitle(), XdrHEAD(), and ~XdrHEAD().


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