#include <xdr_soln.h>

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 |
| std::ofstream | mp_out |
Private Attributes | |
| int | m_wrtVar |
The XdrSOLN class. This class is responsible for reading/writing information about the solution to xdr style binary files.
Definition at line 43 of file xdr_soln.h.
|
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 100 of file xdr_mgf.h.
|
inline |
|
inline |
|
inherited |
Reads/Writes a block of ints to/from the current xdr file/file handle.
| 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 264 of file xdr_mgf.C.
References libMesh::XdrMGF::DECODE, libMesh::XdrMGF::ENCODE, libMesh::libmesh_assert(), libMesh::XdrMGF::m_type, libMesh::XdrMGF::mp_in, libMesh::XdrMGF::mp_out, libMesh::XdrMGF::mp_xdr_handle, libMesh::XdrMGF::R_ASCII, and libMesh::XdrMGF::W_ASCII.
Referenced by libMesh::XdrMESH::BC(), libMesh::XdrMESH::coord(), libMesh::XdrMESH::Icon(), and values().
|
inherited |
Read/Writes a block of Reals to/from the current xdr file/file handle.
Definition at line 327 of file xdr_mgf.C.
References libMesh::XdrMGF::DECODE, libMesh::XdrMGF::ENCODE, libMesh::libmesh_assert(), libMesh::XdrMGF::m_type, libMesh::XdrMGF::mp_in, libMesh::XdrMGF::mp_out, libMesh::XdrMGF::mp_xdr_handle, libMesh::XdrMGF::R_ASCII, libMesh::Real, and libMesh::XdrMGF::W_ASCII.
|
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 35 of file xdr_mgf.C.
References libmesh_nullptr, libMesh::XdrMGF::mp_fp, and libMesh::XdrMGF::mp_xdr_handle.
Referenced by libMesh::XdrMGF::init(), and libMesh::XdrMGF::~XdrMGF().
|
inlineinherited |
Get number of levels
Definition at line 184 of file xdr_mgf.h.
References libMesh::XdrMGF::_num_levels.
Referenced by libMesh::XdrMESH::header(), libMesh::XdrMGF::init(), and libMesh::LegacyXdrIO::read_mesh().
|
inlineinherited |
Get the originator flag.
Definition at line 168 of file xdr_mgf.h.
References libMesh::XdrMGF::orig_flag.
Referenced by libMesh::XdrMGF::init(), libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
| int libMesh::XdrSOLN::header | ( | XdrSHEAD * | hd | ) |
Read/Write the solution header. Uses xdr_int found in rpc/rpc.h.
| hd | Pointer to an xdr solution header object |
Definition at line 32 of file xdr_soln.C.
References libMesh::XdrMGF::DECODE, libMesh::XdrMGF::ENCODE, libMesh::XdrHEAD::getId(), libMesh::XdrHEAD::getTitle(), libMesh::XdrSHEAD::getUserTitle(), libMesh::XdrSHEAD::getVarTitle(), libMesh::libmesh_assert(), libMesh::XdrHEAD::m_kstep, libMesh::XdrHEAD::m_meshCnt, libMesh::XdrHEAD::m_numNodes, libMesh::XdrHEAD::m_numvar, libMesh::XdrHEAD::m_strSize, libMesh::XdrHEAD::m_time, libMesh::XdrMGF::m_type, m_wrtVar, libMesh::XdrHEAD::m_wrtVar, libMesh::XdrHEAD::mp_id, libMesh::XdrMGF::mp_in, libMesh::XdrMGF::mp_out, libMesh::XdrHEAD::mp_title, libMesh::XdrHEAD::mp_userTitle, libMesh::XdrHEAD::mp_varTitle, libMesh::XdrMGF::mp_xdr_handle, libMesh::XdrMGF::R_ASCII, libMesh::XdrHEAD::setId(), libMesh::XdrHEAD::setTitle(), libMesh::XdrSHEAD::setUserTitle(), libMesh::XdrSHEAD::setVarTitle(), and libMesh::XdrMGF::W_ASCII.
Referenced by libMesh::LegacyXdrIO::read_soln(), and libMesh::LegacyXdrIO::write_soln().
|
inline |
Calls the init method in the parent class, XdrMGF with the appropriate 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 61 of file xdr_soln.h.
References libMesh::XdrMGF::init().
Referenced by libMesh::LegacyXdrIO::read_soln(), and libMesh::LegacyXdrIO::write_soln().
|
inherited |
Initialization of the xdr file. This function performs the following operations:
xdr file if necessary.xdr file name and opens this file.xdr file handle.Definition at line 68 of file xdr_mgf.C.
References libMesh::LegacyXdrIO::DEAL, libMesh::XdrMGF::DECODE, libMesh::XdrMGF::ENCODE, libMesh::XdrMGF::fini(), libMesh::XdrMGF::get_num_levels(), libMesh::XdrMGF::get_orig_flag(), libMesh::LegacyXdrIO::LIBM, libMesh::XdrMGF::m_type, libMesh::LegacyXdrIO::MGF, libMesh::XdrMGF::mp_fp, libMesh::XdrMGF::mp_in, libMesh::XdrMGF::mp_out, libMesh::XdrMGF::mp_xdr_handle, libMesh::Quality::name(), libMesh::XdrMGF::orig_flag, libMesh::out, libMesh::XdrMGF::R_ASCII, libMesh::XdrMGF::tokenize_first_line(), and libMesh::XdrMGF::W_ASCII.
Referenced by init(), and libMesh::XdrMESH::init().
|
inlineinherited |
Set number of levels
Definition at line 179 of file xdr_mgf.h.
References libMesh::XdrMGF::_num_levels.
Referenced by libMesh::LegacyXdrIO::write_mesh().
|
inlineinherited |
Set the originator flag.
Definition at line 173 of file xdr_mgf.h.
References libMesh::XdrMGF::orig_flag.
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
inline |
Read/Write solution values.
| array | Pointer to array of Reals to be read/written |
| size | Size of individual variables to be written |
Definition at line 86 of file xdr_soln.h.
References libMesh::XdrMGF::dataBlk(), and m_wrtVar.
Referenced by libMesh::LegacyXdrIO::read_soln(), and libMesh::LegacyXdrIO::write_soln().
|
protectedinherited |
Number of levels of refinement in the mesh
Definition at line 191 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::get_num_levels(), and libMesh::XdrMGF::set_num_levels().
|
protectedinherited |
Specifies the read/write permission for the current xdr file. Possibilities are:
UNKNOWN = -1ENCODE = 0DECODE = 1 Definition at line 200 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::dataBlk(), header(), libMesh::XdrMESH::header(), and libMesh::XdrMGF::init().
|
private |
Definition at line 89 of file xdr_soln.h.
|
protectedinherited |
An input file stream object
Definition at line 228 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::dataBlk(), header(), libMesh::XdrMESH::header(), and libMesh::XdrMGF::init().
|
protectedinherited |
An output file stream object.
Definition at line 233 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::dataBlk(), header(), libMesh::XdrMESH::header(), and libMesh::XdrMGF::init().
|
protectedinherited |
Pointer to the standard {xdr} struct. See the standard header file rpc/rpc.h for more information.
Definition at line 210 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::dataBlk(), libMesh::XdrMGF::fini(), header(), libMesh::XdrMESH::header(), and libMesh::XdrMGF::init().
|
protectedinherited |
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:
Definition at line 223 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::get_orig_flag(), libMesh::XdrMESH::header(), libMesh::XdrMGF::init(), and libMesh::XdrMGF::set_orig_flag().