Poster of Linux kernelThe best gift for a Linux geek
XdrSOLN

XdrSOLN

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

NAME

XdrSOLN -  

SYNOPSIS


#include <xdr_soln.h>

Inherits XdrMGF.  

Public Types


enum XdrIO_TYPE { UNKNOWN = -1, ENCODE = 0, DECODE, W_ASCII, R_ASCII }
 

Public Member Functions


XdrSOLN ()

void init (XdrIO_TYPE type, const char *fn, int icnt)

~XdrSOLN ()

int header (XdrSHEAD *hd)

int values (Real *array, int size)

void init (XdrIO_TYPE t, const char *fn, const char *type, int icnt)

void fini ()

int dataBlk (int *array, int numvar, int size)

int dataBlk (Real *array, int numvar, int size)

LegacyXdrIO::FileFormat get_orig_flag () const

void set_orig_flag (LegacyXdrIO::FileFormat in_orig_flag)

void set_num_levels (unsigned int num_levels)

unsigned int get_num_levels ()
 

Protected Attributes


unsigned int _num_levels

XdrIO_TYPE m_type

XDR * mp_xdr_handle

LegacyXdrIO::FileFormat orig_flag

std::ifstream mp_in

OFStream mp_out
 

Private Attributes


int m_wrtVar
 

Detailed Description

The XdrSOLN class. This class is responsible for reading/writing information about the solution to xdr style binary files.

Author:

Bill Barth, Robert McLay.

Definition at line 38 of file xdr_soln.h.  

Member Enumeration Documentation

 

enum XdrMGF::XdrIO_TYPE [inherited]This enum specifies the access permission which will be acquired for the current xdr file. Note that it is only possible to read (DECODE) or write (ENCODE) but not both. For ASCII type files, use WRITE or READ instead!

Enumerator:

UNKNOWN
ENCODE
DECODE
W_ASCII
R_ASCII

Definition at line 94 of file xdr_mgf.h.

                  {UNKNOWN = -1, ENCODE=0, DECODE,
                   W_ASCII , R_ASCII};
 

Constructor & Destructor Documentation

 

XdrSOLN::XdrSOLN () [inline]Constructor. Initializes m_wrtVar to -1.

Definition at line 45 of file xdr_soln.h.

: m_wrtVar(-1) {}
 

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

Definition at line 62 of file xdr_soln.h.

{}
 

Member Function Documentation

 

int XdrMGF::dataBlk (int *array, intnumvar, intsize) [inherited]Reads/Writes a block of ints to/from the current xdr file/file handle.

Parameters:

array Pointer to data to be read/written
numvar The total number of variables (size of the array)
size The size of each individual variable in the array

Definition at line 275 of file xdr_mgf.C.

References XdrMGF::DECODE, XdrMGF::ENCODE, XdrMGF::m_type, XdrMGF::mp_in, XdrMGF::mp_out, XdrMGF::mp_xdr_handle, XdrMGF::R_ASCII, and XdrMGF::W_ASCII.

Referenced by XdrMESH::BC(), XdrMESH::coord(), XdrMESH::Icon(), and values().

{
  int totalSize = numvar*size;

  switch (m_type)
    {

#ifdef LIBMESH_HAVE_XDR
      
    case (XdrMGF::DECODE):
    case (XdrMGF::ENCODE):
      {
        xdr_vector(mp_xdr_handle,
                   (char *) &array[0],
                   totalSize, 
                   sizeof(int),
                   (xdrproc_t) xdr_int);
        break;
      }
      
#endif
      
    case (XdrMGF::W_ASCII):
      { 
        for (int i=0; i<size; i++)
          {
            for (int j=0; j<numvar; j++)
              mp_out << array[i*numvar + j] << ' ';
          
            mp_out << ';
          }
        
        mp_out.flush();
        break;
      }

    case (XdrMGF::R_ASCII):
      {
        libmesh_assert (mp_in.good());
        
        for (int i=0; i<size; i++)
          {
            for (int j=0; j<numvar; j++)
              {
                mp_in >> array[i*numvar + j];
              }
          
            mp_in.ignore(); // Read newline
          }
        
        break;
      }

    default:
      // Unknown access type
      libmesh_error();
    }

  return totalSize;
}
 

int XdrMGF::dataBlk (Real *array, intnumvar, intsize) [inherited]Read/Writes a block of Reals to/from the current xdr file/file handle.

Definition at line 338 of file xdr_mgf.C.

References XdrMGF::DECODE, XdrMGF::ENCODE, XdrMGF::m_type, XdrMGF::mp_in, XdrMGF::mp_out, XdrMGF::mp_xdr_handle, XdrMGF::R_ASCII, and XdrMGF::W_ASCII.

{
  int totalSize = numvar*size;

  // If this function is called by coord(),
  // numvar is the problem dimension, and
  // size is the number of nodes in the problem.
  
  //std::cout << 'Total amount of data to be written: ' << totalSize << std::endl;
  
  switch (m_type)
    {
      
#ifdef LIBMESH_HAVE_XDR
      
    case (XdrMGF::DECODE):
    case (XdrMGF::ENCODE):
      { 
        // FIXME - this is probably broken for Real == long double
        // RHS
        xdr_vector(mp_xdr_handle,
                   (char *) &array[0],
                   totalSize, 
                   sizeof(Real),
                   (xdrproc_t) xdr_REAL);
      }
      
#endif
      
    case (XdrMGF::W_ASCII):
      {

        for (int i=0; i<size; i++)
          {
            for (int j=0; j<numvar; j++)
              OFSRealscientific(mp_out,17,array[i*numvar + j]) << ' 	';
            
            mp_out << ';
          }
        
        mp_out.flush();
        break;
      }

    case (XdrMGF::R_ASCII):
      {
        libmesh_assert (mp_in.good());
        
        for (int i=0; i<size; i++)
          {
            libmesh_assert (mp_in.good());
        
            for (int j=0; j<numvar; j++)
              mp_in >> array[i*numvar + j];
          
            mp_in.ignore(); // Read newline
          }
        
        break;
      }

    default:
      // Unknown access type
      libmesh_error();
    }
      
  return totalSize;
}
 

void XdrMGF::fini () [inherited]Finalizes operations on the current xdr file handle, and closes the xdr file.

Uses xdr_destroy found in rpc/rpc.h.

Definition at line 33 of file xdr_mgf.C.

References XdrMGF::mp_fp, and XdrMGF::mp_xdr_handle.

Referenced by XdrMGF::init(), and XdrMGF::~XdrMGF().

{
  
#ifdef LIBMESH_HAVE_XDR
  
  if (mp_xdr_handle)
    {
      //std::cout << 'Destroying XDR file handle.' << std::endl;
      xdr_destroy(mp_xdr_handle);
    }
  
  //std::cout << 'Deleting the file handle pointer.' << std::endl;
  delete mp_xdr_handle;
  
  mp_xdr_handle = NULL;
  
#endif
  
  if (mp_fp)
    {
      //std::cout << 'Closing file.' << std::endl;
      std::fflush(mp_fp);
      std::fclose(mp_fp);
    }

  mp_fp = NULL;
}
 

unsigned int XdrMGF::get_num_levels () [inline, inherited]Get number of levels

Definition at line 186 of file xdr_mgf.h.

References XdrMGF::_num_levels.

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

{ return _num_levels; }
 

LegacyXdrIO::FileFormat XdrMGF::get_orig_flag () const [inline, inherited]Get the originator flag.

Definition at line 170 of file xdr_mgf.h.

References XdrMGF::orig_flag.

Referenced by XdrMGF::init(), LegacyXdrIO::read_mesh(), and LegacyXdrIO::write_mesh().

{ return orig_flag; }
 

int XdrSOLN::header (XdrSHEAD *hd)Read/Write the solution header. Uses xdr_int found in rpc/rpc.h.

Parameters:

hd Pointer to an xdr solution header object

Returns:

1 on success

Definition at line 31 of file xdr_soln.C.

References XdrMGF::DECODE, XdrMGF::ENCODE, XdrHEAD::getId(), XdrHEAD::getTitle(), XdrSHEAD::getUserTitle(), XdrSHEAD::getVarTitle(), XdrHEAD::m_kstep, XdrHEAD::m_meshCnt, XdrHEAD::m_numNodes, XdrHEAD::m_numvar, XdrHEAD::m_strSize, XdrHEAD::m_time, XdrMGF::m_type, m_wrtVar, XdrHEAD::m_wrtVar, XdrHEAD::mp_id, XdrMGF::mp_in, XdrMGF::mp_out, XdrHEAD::mp_title, XdrHEAD::mp_userTitle, XdrHEAD::mp_varTitle, XdrMGF::mp_xdr_handle, XdrMGF::R_ASCII, XdrHEAD::setId(), XdrHEAD::setTitle(), XdrSHEAD::setUserTitle(), XdrSHEAD::setVarTitle(), and XdrMGF::W_ASCII.

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

{
  // Temporary variables to facilitate stream reading
  const int comm_len= 80;  
  char comment[comm_len];


  
  switch (m_type)
    {
      
#ifdef LIBMESH_HAVE_XDR
      
    case (XdrMGF::ENCODE):
    case (XdrMGF::DECODE):
      {
  
        xdr_int(mp_xdr_handle,  &(hd->m_wrtVar));
        xdr_int(mp_xdr_handle,  &(hd->m_numvar));
        xdr_int(mp_xdr_handle,  &(hd->m_numNodes));
        xdr_int(mp_xdr_handle,  &(hd->m_meshCnt));
        xdr_int(mp_xdr_handle,  &(hd->m_kstep));
        xdr_int(mp_xdr_handle,  &(hd->m_strSize));
        xdr_REAL(mp_xdr_handle, &(hd->m_time));
        
        m_wrtVar=hd->m_wrtVar;

        char* temp = const_cast<char *>(hd->getId());
        xdr_string(mp_xdr_handle,&(temp),
                   ((m_type == XdrMGF::ENCODE) ? std::strlen(temp)    : hd->m_strSize));
        hd->setId(temp);
        
        temp = const_cast<char *>(hd->getTitle());
        xdr_string(mp_xdr_handle,&(temp),
                   ((m_type == XdrMGF::ENCODE) ? std::strlen(temp) : hd->m_strSize));
        hd->setTitle(temp);

        temp = const_cast<char *>(hd->getUserTitle());
        xdr_string(mp_xdr_handle,&(temp),
                   ((m_type == XdrMGF::ENCODE) ? std::strlen(temp) : hd->m_strSize));
        hd->setUserTitle(temp);
                
        
        char * tempTitle = new char[hd->m_strSize*m_wrtVar];
  
  
        if (m_type == XdrMGF::DECODE)
          {
            int tempSize = 0;
            xdr_string(mp_xdr_handle, &tempTitle, hd->m_strSize*m_wrtVar);
            int olen= std::strlen(tempTitle);
            char *p;
            char *top = tempTitle;
            for (int ivar = 0; ivar < m_wrtVar; ++ivar)
              {
                p = strchr(tempTitle,' ');
                *p = ' ';
                tempSize = std::strlen(tempTitle) ;
                tempTitle+=tempSize+1;
              }
            tempTitle = top;
            hd->mp_varTitle = new char[olen];
            std::memcpy(hd->mp_varTitle,tempTitle,olen*sizeof(char));
          }
        else if (m_type == XdrMGF::ENCODE)
          {
            char *p = hd->mp_varTitle;
            char *top = tempTitle;
            for (int ivar = 0; ivar < m_wrtVar; ++ivar)
              {
                int tempSize = std::strlen(p) + 1;
                std::memcpy(tempTitle,p,tempSize*sizeof(char));
                tempSize = std::strlen(tempTitle);
                tempTitle[tempSize] = ' ';
                tempTitle += tempSize+1;
                p += tempSize+1;
              }
            tempTitle = top;
            xdr_string(mp_xdr_handle, &tempTitle, hd->m_strSize*m_wrtVar);
          }
        delete [] tempTitle;

        return 0;
      }
#endif


    case (XdrMGF::R_ASCII):
      {
        libmesh_assert (mp_in.good());
        
        mp_in >> hd->m_numNodes ; mp_in.getline(comment, comm_len);
        mp_in >> hd->m_wrtVar   ; mp_in.getline(comment, comm_len);
        mp_in >> hd->m_strSize  ; mp_in.getline(comment, comm_len);
        mp_in >> hd->m_time     ; mp_in.getline(comment, comm_len);
        
        mp_in.getline(comment, comm_len);
        hd->setId(comment);

        mp_in.getline(comment, comm_len);
        hd->setTitle(comment);

        mp_in.getline(comment, comm_len);
        hd->setUserTitle(comment);

        m_wrtVar = hd->m_wrtVar;

        // Read the variable names
        {
          std::string var_name;
          char* titles = new char[hd->m_wrtVar*hd->m_strSize];
          unsigned int c=0;
          
          for (int var=0; var < hd->m_wrtVar; var++)
            {
              mp_in >> var_name;

              for (unsigned int l=0; l<var_name.size(); l++)
                titles[c++] = var_name[l];

              titles[c++] = ' ';
            }

          mp_in.getline(comment, comm_len);

          hd->setVarTitle(titles, c);

          delete [] titles;
        }

        
        return 0;
      }

      
    case (XdrMGF::W_ASCII):
      {
        mp_out << hd->m_numNodes   << '	 # Num. Nodes;
        mp_out << hd->m_wrtVar     << '	 # Num. of Vars;
        mp_out << hd->m_strSize    << '	 # String Size (ignore);
        mp_out << hd->m_time       << '	 # Current Time;
        mp_out << hd->mp_id        << ';
        mp_out << hd->mp_title     << ';
        mp_out << hd->mp_userTitle << ';

        // write the variable names
        {
          const char* p = hd->getVarTitle();

          for (int var=0; var<hd->m_wrtVar ; var++)
            {
              mp_out << p << ' ';
              p += std::strlen(p)+1;
            }     
          mp_out << '	 # Variable Names;
        }

        m_wrtVar = hd->m_wrtVar;

        return 0;
      }


      
    default:
      // Unknown access type
      libmesh_error();

    }
  
  return 1;
}
 

void XdrMGF::init (XdrMGF::XdrIO_TYPEt, const char *fn, const char *type, inticnt) [inherited]Initialization of the xdr file. This function performs the following operations: {itemize} Closes the old xdr file if necessary.

Creates a new xdr file name and opens this file.

Opens the appropriate xdr file handle.

Reads/Writes a signature to the file.

{itemize}

Definition at line 66 of file xdr_mgf.C.

References LegacyXdrIO::DEAL, XdrMGF::DECODE, XdrMGF::ENCODE, XdrMGF::fini(), XdrMGF::get_num_levels(), XdrMGF::get_orig_flag(), LegacyXdrIO::LIBM, XdrMGF::m_type, LegacyXdrIO::MGF, XdrMGF::mp_fp, XdrMGF::mp_in, XdrMGF::mp_out, XdrMGF::mp_xdr_handle, Quality::name(), XdrMGF::orig_flag, XdrMGF::R_ASCII, XdrMGF::tokenize_first_line(), and XdrMGF::W_ASCII.

{
  m_type=t;

  // Close old file if necessary
  if (mp_fp) this->fini(); 

  
  // Open file 
  switch (m_type)
    {
      
#ifdef LIBMESH_HAVE_XDR
      
    case (XdrMGF::ENCODE):
    case (XdrMGF::DECODE):
      {
        mp_fp = fopen (fn, (m_type == ENCODE) ? 'w' : 'r');

        // Make sure the file is ready for use
        if (!mp_fp)
          {
            std::cerr << 'XDR Error: Accessing file: '
                      << fn
                      << ' failed.'
                      << std::endl;
            libmesh_error();
          }

        // Create the XDR handle 
        mp_xdr_handle = new XDR;
        xdrstdio_create(mp_xdr_handle,
                        mp_fp,
                        ((m_type == ENCODE) ? XDR_ENCODE : XDR_DECODE));
        
        break;
      }
      
#endif
      
    case (XdrMGF::R_ASCII):
      {
        mp_in.open(fn, std::ios::in);

        // Make sure it opened correctly
        if (!mp_in.good())
          libmesh_file_error(fn);

        break;
      }
      
    case (XdrMGF::W_ASCII):
      {
        mp_out.open(fn, std::ios::out);

        // Make sure it opened correctly
        if (!mp_out.good())
          libmesh_file_error(fn);

        break;
      }
      
    default:
      {
        std::cout << 'Unrecognized file access type!' << std::endl;
        libmesh_error();
      }
    }




  
  // Read/Write the file signature
  const int  bufLen = 12;
  char       buf[bufLen+1];

  switch (m_type)
    {
      
#ifdef LIBMESH_HAVE_XDR
      
    case (XdrMGF::ENCODE):
      {
        char* p = &buf[0];
        const LegacyXdrIO::FileFormat orig = this->get_orig_flag();

        std::ostringstream name;
        if (orig == LegacyXdrIO::DEAL)
          name << 'DEAL 003:003';
          
        else if (orig == LegacyXdrIO::MGF)
          name << 'MGF  002:000';
          
        else if (orig == LegacyXdrIO::LIBM)
          name << 'LIBM ' << this->get_num_levels();

        else
          libmesh_error();

        // Fill the buffer
        std::sprintf(&buf[0], '%s', name.str().c_str());
          
        xdr_string(mp_xdr_handle, &p, bufLen);  // Writes binary signature

        break;
      }
      
    case (XdrMGF::DECODE):
      {
        char* p = &buf[0];
        xdr_string(mp_xdr_handle, &p, bufLen); // Reads binary signature
         
        // Set the number of levels used in the mesh
        this->tokenize_first_line(p);

        break;
      }
      
#endif
      
    case (XdrMGF::W_ASCII):
      {
        const LegacyXdrIO::FileFormat orig = this->get_orig_flag();

        if (orig == LegacyXdrIO::DEAL)
          std::sprintf(&buf[0], '%s %03d:%03d', 'DEAL', 3, 3);
          
        else if (orig == LegacyXdrIO::MGF)
          std::sprintf(&buf[0], '%s %03d:%03d', 'MGF ', 2, 0);

        else if (orig == LegacyXdrIO::LIBM)
          std::sprintf(&buf[0], '%s %d', 'LIBM', this->get_num_levels());
          
        mp_out << buf << ';
        
        break;
      }
      
    case (XdrMGF::R_ASCII):
      {

#ifdef __HP_aCC
        // weirdly, _only_ here aCC
        // is not fond of mp_in.getline()
        // however, using mp_in.getline()
        // further below is ok...
        std::string buf_buf;
        std::getline (mp_in, buf_buf, ');
        libmesh_assert (buf_buf.size() <= bufLen);

        buf_buf.copy (buf, std::string::npos);
#else

        // Here we first use getline() to grab the very 
        // first line of the file into a char buffer.  Then
        // this line is tokenized to look for:
        // 1.) The name LIBM, which specifies the new Mesh style.
        // 2.) The number of levels in the Mesh which is being read.
        // Note that 'buf' will be further processed below, here we
        // are just attempting to get the number of levels.
        mp_in.getline(buf, bufLen+1);

#endif

        // Determine the number of levels in this mesh
        this->tokenize_first_line(buf);

        break;
      }

    default:
      libmesh_error();
    }



  // If you are reading or decoding, process the signature
  if ((m_type == R_ASCII) || (m_type == DECODE))
    {
      char name[5];
      std::strncpy(name, &buf[0], 4);
      name[4] = ' ';

      if (std::strcmp (name, 'DEAL') == 0)
        {
          this->orig_flag = LegacyXdrIO::DEAL; // 0 is the DEAL identifier by definition
        }
      else if (std::strcmp (name, 'MGF ') == 0)
        {
          this->orig_flag = LegacyXdrIO::MGF; // 1 is the MGF identifier by definition
        }
      else if (std::strcmp (name, 'LIBM') == 0)
        {
          this->orig_flag = LegacyXdrIO::LIBM; // the New and Improved XDA
        }

      else
        {
          std::cerr << 'No originating software can be determined. Error.' 
                    << std::endl;
          libmesh_error();
        }
    }
  
}
 

void XdrSOLN::init (XdrIO_TYPEtype, const char *fn, inticnt) [inline]Calls the init method in the parent class, XdrMGF with the appropriate parameters.

Parameters:

type One of: UNKNOWN, ENCODE, DECODE
fn const char pointer to a file name
icnt Number to be appended to file e.g. name.soln.0000

Definition at line 56 of file xdr_soln.h.

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

  {XdrMGF::init (type, fn, 'soln',icnt);}
 

void XdrMGF::set_num_levels (unsigned intnum_levels) [inline, inherited]Set number of levels

Definition at line 181 of file xdr_mgf.h.

References XdrMGF::_num_levels.

Referenced by LegacyXdrIO::write_mesh().

{ _num_levels = num_levels; }
 

void XdrMGF::set_orig_flag (LegacyXdrIO::FileFormatin_orig_flag) [inline, inherited]Set the originator flag.

Definition at line 175 of file xdr_mgf.h.

References XdrMGF::orig_flag.

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

{ orig_flag = in_orig_flag; }
 

int XdrSOLN::values (Real *array, intsize) [inline]Read/Write solution values.

Parameters:

array Pointer to array of Reals to be read/written
size Size of individual variables to be written

Returns:

m_wrtVar*size

Definition at line 81 of file xdr_soln.h.

References XdrMGF::dataBlk(), and m_wrtVar.

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

{ return dataBlk(array, m_wrtVar, size);}
 

Member Data Documentation

 

unsigned int XdrMGF::_num_levels [protected, inherited]Number of levels of refinement in the mesh

Definition at line 193 of file xdr_mgf.h.

Referenced by XdrMGF::get_num_levels(), XdrMGF::set_num_levels(), and XdrMGF::tokenize_first_line().  

XdrIO_TYPE XdrMGF::m_type [protected, inherited]Specifies the read/write permission for the current xdr file. Possibilities are: {itemize} UNKNOWN = -1 ENCODE = 0 DECODE = 1 {itemize}

Definition at line 206 of file xdr_mgf.h.

Referenced by XdrMGF::dataBlk(), header(), XdrMESH::header(), and XdrMGF::init().  

int XdrSOLN::m_wrtVar [private]

Definition at line 84 of file xdr_soln.h.

Referenced by header(), and values().  

std::ifstream XdrMGF::mp_in [protected, inherited]An input file stream object

Definition at line 240 of file xdr_mgf.h.

Referenced by XdrMGF::dataBlk(), header(), XdrMESH::header(), and XdrMGF::init().  

OFStream XdrMGF::mp_out [protected, inherited]An output file stream object. Use the customized class to enable features also for compilers with broken iostream

Definition at line 248 of file xdr_mgf.h.

Referenced by XdrMGF::dataBlk(), header(), XdrMESH::header(), and XdrMGF::init().  

XDR* XdrMGF::mp_xdr_handle [protected, inherited]Pointer to the standard {xdr} struct. See the standard header file rpc/rpc.h for more information.

Definition at line 216 of file xdr_mgf.h.

Referenced by XdrMGF::dataBlk(), XdrMGF::fini(), header(), XdrMESH::header(), and XdrMGF::init().  

LegacyXdrIO::FileFormat XdrMGF::orig_flag [protected, inherited]Flag indicating how much checking we need to do. We can read in mgf meshes more quickly because there is only one type of element in these meshes. Deal meshes on the other hand will require a check for each element to find out what type it is. Possible values are: {itemize} 0: It's an DEAL style mesh 1: It's a MGF style mesh {itemize}

Definition at line 235 of file xdr_mgf.h.

Referenced by XdrMGF::get_orig_flag(), XdrMESH::header(), XdrMGF::init(), and XdrMGF::set_orig_flag().

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Public Member Functions
Protected Attributes
Private Attributes
Detailed Description
Member Enumeration Documentation
enum XdrMGF::XdrIO_TYPE [inherited]This enum specifies the access permission which will be acquired for the current xdr file. Note that it is only possible to read (DECODE) or write (ENCODE) but not both. For ASCII type files, use WRITE or READ instead!
Constructor & Destructor Documentation
XdrSOLN::XdrSOLN () [inline]Constructor. Initializes m_wrtVar to -1.
XdrSOLN::~XdrSOLN () [inline]Destructor.
Member Function Documentation
int XdrMGF::dataBlk (int *array, intnumvar, intsize) [inherited]Reads/Writes a block of ints to/from the current xdr file/file handle.
int XdrMGF::dataBlk (Real *array, intnumvar, intsize) [inherited]Read/Writes a block of Reals to/from the current xdr file/file handle.
void XdrMGF::fini () [inherited]Finalizes operations on the current xdr file handle, and closes the xdr file.
unsigned int XdrMGF::get_num_levels () [inline, inherited]Get number of levels
LegacyXdrIO::FileFormat XdrMGF::get_orig_flag () const [inline, inherited]Get the originator flag.
int XdrSOLN::header (XdrSHEAD *hd)Read/Write the solution header. Uses xdr_int found in rpc/rpc.h.
void XdrMGF::init (XdrMGF::XdrIO_TYPEt, const char *fn, const char *type, inticnt) [inherited]Initialization of the xdr file. This function performs the following operations: {itemize} Closes the old xdr file if necessary.
void XdrSOLN::init (XdrIO_TYPEtype, const char *fn, inticnt) [inline]Calls the init method in the parent class, XdrMGF with the appropriate parameters.
void XdrMGF::set_num_levels (unsigned intnum_levels) [inline, inherited]Set number of levels
void XdrMGF::set_orig_flag (LegacyXdrIO::FileFormatin_orig_flag) [inline, inherited]Set the originator flag.
int XdrSOLN::values (Real *array, intsize) [inline]Read/Write solution values.
Member Data Documentation
unsigned int XdrMGF::_num_levels [protected, inherited]Number of levels of refinement in the mesh
XdrIO_TYPE XdrMGF::m_type [protected, inherited]Specifies the read/write permission for the current xdr file. Possibilities are: {itemize} UNKNOWN = -1 ENCODE = 0 DECODE = 1 {itemize}
int XdrSOLN::m_wrtVar [private]
std::ifstream XdrMGF::mp_in [protected, inherited]An input file stream object
OFStream XdrMGF::mp_out [protected, inherited]An output file stream object. Use the customized class to enable features also for compilers with broken iostream
XDR* XdrMGF::mp_xdr_handle [protected, inherited]Pointer to the standard {xdr} struct. See the standard header file rpc/rpc.h for more information.
LegacyXdrIO::FileFormat XdrMGF::orig_flag [protected, inherited]Flag indicating how much checking we need to do. We can read in mgf meshes more quickly because there is only one type of element in these meshes. Deal meshes on the other hand will require a check for each element to find out what type it is. Possible values are: {itemize} 0: It's an DEAL style mesh 1: It's a MGF style mesh {itemize}
Author

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