Poster of Linux kernelThe best gift for a Linux geek
XdrSHEAD

XdrSHEAD

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

XdrSHEAD -  

SYNOPSIS


#include <xdr_shead.h>

Inherits XdrHEAD.  

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 33 of file xdr_shead.h.  

Constructor & Destructor Documentation

 

XdrSHEAD::XdrSHEAD () [inline]Constructor.

Definition at line 40 of file xdr_shead.h.

{}
 

XdrSHEAD::~XdrSHEAD () [inline]Destructor.

Definition at line 45 of file xdr_shead.h.

{}
 

Member Function Documentation

 

char * XdrHEAD::cpyString (const char *src, intlen = -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!

Returns:

Copy of src

Definition at line 58 of file xdr_head.C.

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

{
  char* temp = NULL;
  int myLen = len;
  if(src)
    {
      if (myLen == -1)
        myLen = std::strlen(src)+1;
      temp = new char[myLen];
      temp = (char *) std::memcpy(temp, (char *) src, (myLen)*sizeof(char));
    }
  return temp;
}
 

const char* XdrHEAD::getId () const [inline, inherited]Get the mesh/solution file id.

Definition at line 54 of file xdr_head.h.

References XdrHEAD::mp_id.

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

{ return mp_id; }
 

int XdrHEAD::getNumBCs () const [inline, inherited]Get the number of boundary conditions in them mesh/solution file.

Definition at line 90 of file xdr_head.h.

References XdrHEAD::m_numBCs.

Referenced by LegacyXdrIO::read_mesh().

{ return m_numBCs; }
 

int XdrHEAD::getNumNodes () const [inline, inherited]Get the total number of nodes in the mesh/solution file.

Definition at line 76 of file xdr_head.h.

References XdrHEAD::m_numNodes.

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

{ return m_numNodes; }
 

const char* XdrHEAD::getTitle () const [inline, inherited]Get the mesh/solution file title.

Definition at line 64 of file xdr_head.h.

References XdrHEAD::mp_title.

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

{ return mp_title; }
 

const char* XdrSHEAD::getUserTitle () const [inline]Get the user solution title.

Definition at line 111 of file xdr_shead.h.

References XdrHEAD::mp_userTitle.

Referenced by XdrSOLN::header().

{ return mp_userTitle; }
 

const char* XdrSHEAD::getVarTitle () const [inline]Get null-terminated list of variable names.

Definition at line 123 of file xdr_shead.h.

References XdrHEAD::mp_varTitle.

Referenced by XdrSOLN::header(), and LegacyXdrIO::read_soln().

{ return mp_varTitle; }
 

int XdrSHEAD::getWrtVar () const [inline]Get the number of written solution variables.

Definition at line 69 of file xdr_shead.h.

References XdrHEAD::m_wrtVar.

Referenced by LegacyXdrIO::read_soln().

{ return m_wrtVar; }
 

void XdrHEAD::setId (const char *id) [inline, inherited]Set the mesh/solution file id.

Definition at line 49 of file xdr_head.h.

References XdrHEAD::cpyString(), and XdrHEAD::mp_id.

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

{ delete [] mp_id; mp_id = cpyString(id); }
 

void XdrSHEAD::setKstep (intkstep) [inline]Get the mesh file number. Set the solution step number.

Definition at line 85 of file xdr_shead.h.

References XdrHEAD::m_kstep.

Referenced by LegacyXdrIO::write_soln().

{ m_kstep = kstep; }
 

void XdrSHEAD::setMeshCnt (intmeshCnt) [inline]Set the mesh file number.

Definition at line 74 of file xdr_shead.h.

References XdrHEAD::m_meshCnt.

Referenced by LegacyXdrIO::write_soln().

{ m_meshCnt = meshCnt; }
 

void XdrHEAD::setNumBCs (intnumBCs) [inline, inherited]Set the number of boundary conditions in the mesh/solution file.

Definition at line 83 of file xdr_head.h.

References XdrHEAD::m_numBCs.

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

{ m_numBCs = numBCs; }
 

void XdrHEAD::setNumNodes (intnumNodes) [inline, inherited]Set the total number of nodes in the mesh/solution file.

Definition at line 70 of file xdr_head.h.

References XdrHEAD::m_numNodes.

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

{ m_numNodes = numNodes; }
 

void XdrSHEAD::setNumVar (intnumvar) [inline]Set the total number of solution variables.

Definition at line 51 of file xdr_shead.h.

References XdrHEAD::m_numvar.

Referenced by LegacyXdrIO::write_soln().

{ m_numvar = numvar; }
 

void XdrHEAD::setStrSize (intstrSize) [inline, inherited]Set the string size of the mesh/solution file. (?)

Definition at line 96 of file xdr_head.h.

References XdrHEAD::m_strSize.

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

{ m_strSize = strSize; }
 

void XdrSHEAD::setTime (Realtime) [inline]Get the solution step number. Set the solution time.

Definition at line 96 of file xdr_shead.h.

References XdrHEAD::m_time.

Referenced by LegacyXdrIO::write_soln().

{ m_time = time; }
 

void XdrHEAD::setTitle (const char *title) [inline, inherited]Set the mesh/solution file title.

Definition at line 59 of file xdr_head.h.

References XdrHEAD::cpyString(), and XdrHEAD::mp_title.

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

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

void XdrSHEAD::setUserTitle (const char *title) [inline]Get the solution time. Set the user solution title.

Definition at line 106 of file xdr_shead.h.

References XdrHEAD::cpyString(), and XdrHEAD::mp_userTitle.

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

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

void XdrSHEAD::setVarTitle (const char *titles, intlen) [inline]Set null-terminated list of variable names.

Definition at line 117 of file xdr_shead.h.

References XdrHEAD::cpyString(), and XdrHEAD::mp_varTitle.

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

{ delete [] mp_varTitle; mp_varTitle = cpyString(titles, len); }
 

void XdrSHEAD::setWrtVar (intwrtVar) [inline]Get the total number of solution variables. Set the number of written solution variables.

Definition at line 63 of file xdr_shead.h.

References XdrHEAD::m_wrtVar.

Referenced by LegacyXdrIO::write_soln().

{ m_wrtVar = wrtVar; }
 

Friends And Related Function Documentation

 

friend class XdrSOLN [friend]

Definition at line 35 of file xdr_shead.h.  

Member Data Documentation

 

int XdrHEAD::m_kstep [protected, inherited]The internal solution number.

Definition at line 130 of file xdr_head.h.

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

int XdrHEAD::m_meshCnt [protected, inherited]The mesh file number which corresponds to a given solution file.

Definition at line 125 of file xdr_head.h.

Referenced by XdrSOLN::header(), setMeshCnt(), and XdrHEAD::XdrHEAD().  

int XdrHEAD::m_numBCs [protected, inherited]Number of boundary conditions in the solution/mesh.

Definition at line 155 of file xdr_head.h.

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

int XdrHEAD::m_numel [protected, inherited]Number of elemetns in the solution/mesh.

Definition at line 136 of file xdr_head.h.

Referenced by XdrMHEAD::getNumEl(), XdrMESH::header(), XdrMHEAD::setNumEl(), and XdrHEAD::XdrHEAD().  

int XdrHEAD::m_numNodes [protected, inherited]Number of nodes in the solution/mesh.

Definition at line 142 of file xdr_head.h.

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

int XdrHEAD::m_numvar [protected, inherited]Total number of variables, may differ from the total number of variables actually written.

Definition at line 118 of file xdr_head.h.

Referenced by XdrSOLN::header(), setNumVar(), and XdrHEAD::XdrHEAD().  

int XdrHEAD::m_strSize [protected, inherited]String size (Not sure of what?)

Definition at line 160 of file xdr_head.h.

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

int XdrHEAD::m_sumWghts [protected, inherited]Total mesh weighting i.e. How many nodes are there and where are they?

Definition at line 149 of file xdr_head.h.

Referenced by XdrMHEAD::getSumWghts(), XdrMESH::header(), XdrMHEAD::setSumWghts(), and XdrHEAD::XdrHEAD().  

xdr_Real XdrHEAD::m_time [protected, inherited]Current solution time.

Definition at line 185 of file xdr_head.h.

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

int 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 110 of file xdr_head.h.

Referenced by getWrtVar(), XdrSOLN::header(), setWrtVar(), and XdrHEAD::XdrHEAD().  

char* XdrHEAD::mp_id [protected, inherited]An ID string for the file.

Definition at line 165 of file xdr_head.h.

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

char* XdrHEAD::mp_title [protected, inherited]A title string for the file.

Definition at line 170 of file xdr_head.h.

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

char* XdrHEAD::mp_userTitle [protected, inherited]User's simulation title

Definition at line 175 of file xdr_head.h.

Referenced by getUserTitle(), XdrSOLN::header(), setUserTitle(), XdrHEAD::XdrHEAD(), and XdrHEAD::~XdrHEAD().  

char* XdrHEAD::mp_varTitle [protected, inherited]List of null-separated variable names.

Definition at line 180 of file xdr_head.h.

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

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Protected Member Functions
Protected Attributes
Friends
Detailed Description
Constructor & Destructor Documentation
XdrSHEAD::XdrSHEAD () [inline]Constructor.
XdrSHEAD::~XdrSHEAD () [inline]Destructor.
Member Function Documentation
char * XdrHEAD::cpyString (const char *src, intlen = -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!
const char* XdrHEAD::getId () const [inline, inherited]Get the mesh/solution file id.
int XdrHEAD::getNumBCs () const [inline, inherited]Get the number of boundary conditions in them mesh/solution file.
int XdrHEAD::getNumNodes () const [inline, inherited]Get the total number of nodes in the mesh/solution file.
const char* XdrHEAD::getTitle () const [inline, inherited]Get the mesh/solution file title.
const char* XdrSHEAD::getUserTitle () const [inline]Get the user solution title.
const char* XdrSHEAD::getVarTitle () const [inline]Get null-terminated list of variable names.
int XdrSHEAD::getWrtVar () const [inline]Get the number of written solution variables.
void XdrHEAD::setId (const char *id) [inline, inherited]Set the mesh/solution file id.
void XdrSHEAD::setKstep (intkstep) [inline]Get the mesh file number. Set the solution step number.
void XdrSHEAD::setMeshCnt (intmeshCnt) [inline]Set the mesh file number.
void XdrHEAD::setNumBCs (intnumBCs) [inline, inherited]Set the number of boundary conditions in the mesh/solution file.
void XdrHEAD::setNumNodes (intnumNodes) [inline, inherited]Set the total number of nodes in the mesh/solution file.
void XdrSHEAD::setNumVar (intnumvar) [inline]Set the total number of solution variables.
void XdrHEAD::setStrSize (intstrSize) [inline, inherited]Set the string size of the mesh/solution file. (?)
void XdrSHEAD::setTime (Realtime) [inline]Get the solution step number. Set the solution time.
void XdrHEAD::setTitle (const char *title) [inline, inherited]Set the mesh/solution file title.
void XdrSHEAD::setUserTitle (const char *title) [inline]Get the solution time. Set the user solution title.
void XdrSHEAD::setVarTitle (const char *titles, intlen) [inline]Set null-terminated list of variable names.
void XdrSHEAD::setWrtVar (intwrtVar) [inline]Get the total number of solution variables. Set the number of written solution variables.
Friends And Related Function Documentation
friend class XdrSOLN [friend]
Member Data Documentation
int XdrHEAD::m_kstep [protected, inherited]The internal solution number.
int XdrHEAD::m_meshCnt [protected, inherited]The mesh file number which corresponds to a given solution file.
int XdrHEAD::m_numBCs [protected, inherited]Number of boundary conditions in the solution/mesh.
int XdrHEAD::m_numel [protected, inherited]Number of elemetns in the solution/mesh.
int XdrHEAD::m_numNodes [protected, inherited]Number of nodes in the solution/mesh.
int XdrHEAD::m_numvar [protected, inherited]Total number of variables, may differ from the total number of variables actually written.
int XdrHEAD::m_strSize [protected, inherited]String size (Not sure of what?)
int XdrHEAD::m_sumWghts [protected, inherited]Total mesh weighting i.e. How many nodes are there and where are they?
xdr_Real XdrHEAD::m_time [protected, inherited]Current solution time.
int 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
char* XdrHEAD::mp_id [protected, inherited]An ID string for the file.
char* XdrHEAD::mp_title [protected, inherited]A title string for the file.
char* XdrHEAD::mp_userTitle [protected, inherited]User's simulation title
char* XdrHEAD::mp_varTitle [protected, inherited]List of null-separated variable names.
Author

This document was created by man2html, using the manual pages.
Time: 21:58:35 GMT, April 16, 2011