Poster of Linux kernelThe best gift for a Linux geek
XdrMHEAD

XdrMHEAD

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

NAME

XdrMHEAD -  

SYNOPSIS


#include <xdr_mhead.h>

Inherits XdrHEAD.  

Public Member Functions


XdrMHEAD ()

~XdrMHEAD ()

void setNumEl (int numel)

int getNumEl () const

void setSumWghts (int sumWghts)

int getSumWghts () const

unsigned int get_n_blocks () const

void set_n_blocks (const unsigned int nb)

void get_block_elt_types (std::vector< ElemType > &bet) const

void set_block_elt_types (const std::vector< ElemType > &bet)

void get_num_elem_each_block (std::vector< unsigned int > &neeb) const

void set_num_elem_each_block (const std::vector< unsigned int > &neeb)

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 Attributes


unsigned int _n_blocks

std::vector< ElemType > block_elt_types

std::vector< unsigned int > num_elem_each_block
 

Friends


class XdrMESH
 

Detailed Description

The XdrMHEAD class. This class is responsible for reading/writing xdr mesh file headers.

Author:

Bill Barth, Robert McLay. Modified: John W. Peterson

Definition at line 38 of file xdr_mhead.h.  

Constructor & Destructor Documentation

 

XdrMHEAD::XdrMHEAD () [inline]Constructor. Initializes the number of blocks in the mesh to 1 and the number of levels to zero.

Definition at line 46 of file xdr_mhead.h.

: _n_blocks(1) {}
 

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

Definition at line 51 of file xdr_mhead.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(), 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;
}
 

void XdrMHEAD::get_block_elt_types (std::vector< ElemType > &bet) const [inline]Element block types are defined in elem_type.h. They may be for example TRI3, TRI6, QUAD4, etc.

Returns:

A writeable reference to the vector of element block types.

Definition at line 98 of file xdr_mhead.h.

References block_elt_types.

Referenced by XdrMESH::header(), and LegacyXdrIO::read_mesh().

{ bet = block_elt_types; }
 

unsigned int XdrMHEAD::get_n_blocks () const [inline]A mesh block by definition contains only a single type of element.

Returns:

The number of mesh blocks.

Definition at line 85 of file xdr_mhead.h.

References _n_blocks.

Referenced by XdrMESH::header(), and LegacyXdrIO::read_mesh().

{ return _n_blocks; }
 

void XdrMHEAD::get_num_elem_each_block (std::vector< unsigned int > &neeb) const [inline]The size of each element block is the total number of a given type of element in the mesh.

Returns:

The vector of block sizes

Definition at line 112 of file xdr_mhead.h.

References num_elem_each_block.

Referenced by XdrMESH::header(), and LegacyXdrIO::read_mesh().

{ neeb = num_elem_each_block; }
 

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 XdrMHEAD::getNumEl () const [inline]Get the number of elements in the mesh.

Definition at line 63 of file xdr_mhead.h.

References XdrHEAD::m_numel.

Referenced by LegacyXdrIO::read_mesh().

{ return m_numel; }
 

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; }
 

int XdrMHEAD::getSumWghts () const [inline]Get the mesh weighting.

{DEAL mesh specific get/set functions}

Definition at line 77 of file xdr_mhead.h.

References XdrHEAD::m_sumWghts.

Referenced by LegacyXdrIO::read_mesh().

{ return m_sumWghts; }
 

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; }
 

void XdrMHEAD::set_block_elt_types (const std::vector< ElemType > &bet) [inline]Set the vector of element block types

Definition at line 103 of file xdr_mhead.h.

References block_elt_types.

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

{ block_elt_types = bet; }
 

void XdrMHEAD::set_n_blocks (const unsigned intnb) [inline]Sets the number of mesh blocks.

Definition at line 90 of file xdr_mhead.h.

References _n_blocks.

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

{ this->_n_blocks = nb; }
 

void XdrMHEAD::set_num_elem_each_block (const std::vector< unsigned int > &neeb) [inline]Set the vector of block sizes

Definition at line 117 of file xdr_mhead.h.

References num_elem_each_block.

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

{ num_elem_each_block = neeb; }
 

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 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 XdrMHEAD::setNumEl (intnumel) [inline]Set the number of elements in the mesh.

Definition at line 57 of file xdr_mhead.h.

References XdrHEAD::m_numel.

Referenced by LegacyXdrIO::write_mesh().

{ m_numel = numel; }
 

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 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 XdrMHEAD::setSumWghts (intsumWghts) [inline]Set the mesh weighting. You probably shouldn't set this yourself ...

Definition at line 70 of file xdr_mhead.h.

References XdrHEAD::m_sumWghts.

Referenced by LegacyXdrIO::write_mesh().

{ m_sumWghts = sumWghts; }
 

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); }
 

Friends And Related Function Documentation

 

friend class XdrMESH [friend]

Definition at line 40 of file xdr_mhead.h.  

Member Data Documentation

 

unsigned int XdrMHEAD::_n_blocks [private]DEAL mesh specific variables:

Tells the total number of element blocks. An element block is contains only a single type of element.

Definition at line 131 of file xdr_mhead.h.

Referenced by get_n_blocks(), and set_n_blocks().  

std::vector<ElemType> XdrMHEAD::block_elt_types [private]A vector of length n_blocks which describes the elemnt type in each block e.g. TRI, QUAD, etc. Note: The element type uniquely defines the number of nodes for that element.

See also:

elem_type.h for more

Definition at line 143 of file xdr_mhead.h.

Referenced by get_block_elt_types(), and set_block_elt_types().  

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

Definition at line 130 of file xdr_head.h.

Referenced by XdrSOLN::header(), XdrSHEAD::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(), XdrSHEAD::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 getNumEl(), XdrMESH::header(), 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(), XdrSHEAD::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 getSumWghts(), XdrMESH::header(), 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(), XdrSHEAD::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 XdrSHEAD::getWrtVar(), XdrSOLN::header(), XdrSHEAD::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 XdrSHEAD::getUserTitle(), XdrSOLN::header(), XdrSHEAD::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 XdrSHEAD::getVarTitle(), XdrSOLN::header(), XdrSHEAD::setVarTitle(), XdrHEAD::XdrHEAD(), and XdrHEAD::~XdrHEAD().  

std::vector<unsigned int> XdrMHEAD::num_elem_each_block [private]A vector of length n_blocks containing the number of elements in each block.

Definition at line 150 of file xdr_mhead.h.

Referenced by get_num_elem_each_block(), and set_num_elem_each_block().

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Protected Member Functions
Protected Attributes
Private Attributes
Friends
Detailed Description
Constructor & Destructor Documentation
XdrMHEAD::XdrMHEAD () [inline]Constructor. Initializes the number of blocks in the mesh to 1 and the number of levels to zero.
XdrMHEAD::~XdrMHEAD () [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!
void XdrMHEAD::get_block_elt_types (std::vector< ElemType > &bet) const [inline]Element block types are defined in elem_type.h. They may be for example TRI3, TRI6, QUAD4, etc.
unsigned int XdrMHEAD::get_n_blocks () const [inline]A mesh block by definition contains only a single type of element.
void XdrMHEAD::get_num_elem_each_block (std::vector< unsigned int > &neeb) const [inline]The size of each element block is the total number of a given type of element in the mesh.
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 XdrMHEAD::getNumEl () const [inline]Get the number of elements in the mesh.
int XdrHEAD::getNumNodes () const [inline, inherited]Get the total number of nodes in the mesh/solution file.
int XdrMHEAD::getSumWghts () const [inline]Get the mesh weighting.
const char* XdrHEAD::getTitle () const [inline, inherited]Get the mesh/solution file title.
void XdrMHEAD::set_block_elt_types (const std::vector< ElemType > &bet) [inline]Set the vector of element block types
void XdrMHEAD::set_n_blocks (const unsigned intnb) [inline]Sets the number of mesh blocks.
void XdrMHEAD::set_num_elem_each_block (const std::vector< unsigned int > &neeb) [inline]Set the vector of block sizes
void XdrHEAD::setId (const char *id) [inline, inherited]Set the mesh/solution file id.
void XdrHEAD::setNumBCs (intnumBCs) [inline, inherited]Set the number of boundary conditions in the mesh/solution file.
void XdrMHEAD::setNumEl (intnumel) [inline]Set the number of elements in the mesh.
void XdrHEAD::setNumNodes (intnumNodes) [inline, inherited]Set the total number of nodes in the mesh/solution file.
void XdrHEAD::setStrSize (intstrSize) [inline, inherited]Set the string size of the mesh/solution file. (?)
void XdrMHEAD::setSumWghts (intsumWghts) [inline]Set the mesh weighting. You probably shouldn't set this yourself ...
void XdrHEAD::setTitle (const char *title) [inline, inherited]Set the mesh/solution file title.
Friends And Related Function Documentation
friend class XdrMESH [friend]
Member Data Documentation
unsigned int XdrMHEAD::_n_blocks [private]DEAL mesh specific variables:
std::vector<ElemType> XdrMHEAD::block_elt_types [private]A vector of length n_blocks which describes the elemnt type in each block e.g. TRI, QUAD, etc. Note: The element type uniquely defines the number of nodes for that element.
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.
std::vector<unsigned int> XdrMHEAD::num_elem_each_block [private]A vector of length n_blocks containing the number of elements in each block.
Author

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