Poster of Linux kernelThe best gift for a Linux geek
XdrHEAD

XdrHEAD

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

NAME

XdrHEAD -  

SYNOPSIS


#include <xdr_head.h>

Inherited by XdrMHEAD, and XdrSHEAD.  

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 XdrHEAD & operator= (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 33 of file xdr_head.h.  

Constructor & Destructor Documentation

 

XdrHEAD::XdrHEAD ()Constructor.

Definition at line 25 of file xdr_head.C.

References m_kstep, m_meshCnt, m_numBCs, m_numel, m_numNodes, m_numvar, m_strSize, m_sumWghts, m_time, m_wrtVar, mp_id, mp_title, mp_userTitle, and mp_varTitle.

{
  m_wrtVar = 0;
  m_numvar = 0;
  
  m_meshCnt = 0;
  m_kstep = 0;
  
  m_numel = 0;
  m_numNodes = 0;
  m_sumWghts = 0;
  m_numBCs = 0;
  m_strSize = 0;
  mp_id = 0;
  mp_title = 0;
  mp_userTitle = 0;
  mp_varTitle = 0;
  
  m_time = 0;
}
 

XdrHEAD::~XdrHEAD () [virtual]Destructor.

Definition at line 48 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; 
}
 

XdrHEAD::XdrHEAD (const XdrHEAD &) [private]

 

Member Function Documentation

 

char * XdrHEAD::cpyString (const char *src, intlen = -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 58 of file xdr_head.C.

Referenced by XdrMESH::header(), setId(), setTitle(), XdrSHEAD::setUserTitle(), and XdrSHEAD::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]Get the mesh/solution file id.

Definition at line 54 of file xdr_head.h.

References mp_id.

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

{ return mp_id; }
 

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

Definition at line 90 of file xdr_head.h.

References m_numBCs.

Referenced by LegacyXdrIO::read_mesh().

{ return m_numBCs; }
 

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

Definition at line 76 of file xdr_head.h.

References m_numNodes.

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

{ return m_numNodes; }
 

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

Definition at line 64 of file xdr_head.h.

References mp_title.

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

{ return mp_title; }
 

const XdrHEAD& XdrHEAD::operator= (const XdrHEAD &) [private]

 

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

Definition at line 49 of file xdr_head.h.

References cpyString(), and mp_id.

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

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

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

Definition at line 83 of file xdr_head.h.

References m_numBCs.

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

{ m_numBCs = numBCs; }
 

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

Definition at line 70 of file xdr_head.h.

References m_numNodes.

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

{ m_numNodes = numNodes; }
 

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

Definition at line 96 of file xdr_head.h.

References m_strSize.

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

{ m_strSize = strSize; }
 

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

Definition at line 59 of file xdr_head.h.

References cpyString(), and mp_title.

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

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

Member Data Documentation

 

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

Definition at line 130 of file xdr_head.h.

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

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

Definition at line 125 of file xdr_head.h.

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

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

Definition at line 155 of file xdr_head.h.

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

int XdrHEAD::m_numel [protected]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().  

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

Definition at line 142 of file xdr_head.h.

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

int XdrHEAD::m_numvar [protected]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(), XdrSHEAD::setNumVar(), and XdrHEAD().  

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

Definition at line 160 of file xdr_head.h.

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

int XdrHEAD::m_sumWghts [protected]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().  

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

Definition at line 185 of file xdr_head.h.

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

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

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

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

Definition at line 165 of file xdr_head.h.

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

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

Definition at line 170 of file xdr_head.h.

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

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

Definition at line 175 of file xdr_head.h.

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

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

Definition at line 180 of file xdr_head.h.

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

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

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

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