#include <xdr_mesh.h>

Public Types | |
| enum | XdrIO_TYPE { UNKNOWN = -1, ENCODE =0, DECODE, W_ASCII, R_ASCII } |
Public Member Functions | |
| XdrMESH () | |
| void | init (XdrIO_TYPE type, const char *fn, int icnt, int dim=3) |
| ~XdrMESH () | |
| int | header (XdrMHEAD *hd) |
| int | Icon (int *array, int numvar, int num) |
| int | coord (Real *array, int dim, int size) |
| int | BC (int *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_dim |
The XdrMESH class. This class is responsible for reading/writing information about the mesh to xdr style binary files.
Definition at line 43 of file xdr_mesh.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 |
|
inline |
Read/Write a BC of appropriate size
| array | Pointer to an array of Reals |
| size | Size of array (number of elements) |
Definition at line 107 of file xdr_mesh.h.
References libMesh::XdrMGF::dataBlk().
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
inline |
Read/Write a coord of appropriate size.
| array | Pointer to an array of Reals |
| size | Size of array (number of elements) |
Definition at line 98 of file xdr_mesh.h.
References libMesh::XdrMGF::dataBlk().
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
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 BC(), coord(), Icon(), and libMesh::XdrSOLN::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 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::XdrMESH::header | ( | XdrMHEAD * | hd | ) |
Read/Write the mesh_base.header. Uses xdr_int found in rpc/rpc.h.
| hd | Pointer to an xdr mesh_base.header object |
Definition at line 28 of file xdr_mesh.C.
References libMesh::XdrHEAD::cpyString(), libMesh::XdrMGF::DECODE, libMesh::XdrMGF::ENCODE, libMesh::XdrMHEAD::get_block_elt_types(), libMesh::XdrMHEAD::get_n_blocks(), libMesh::XdrMHEAD::get_num_elem_each_block(), libMesh::XdrMGF::get_num_levels(), libMesh::XdrHEAD::getId(), libMesh::XdrHEAD::getTitle(), libMesh::libmesh_assert(), libMesh::XdrHEAD::m_numBCs, libMesh::XdrHEAD::m_numel, libMesh::XdrHEAD::m_numNodes, libMesh::XdrHEAD::m_strSize, libMesh::XdrHEAD::m_sumWghts, libMesh::XdrMGF::m_type, libMesh::XdrHEAD::mp_id, libMesh::XdrMGF::mp_in, libMesh::XdrMGF::mp_out, libMesh::XdrHEAD::mp_title, libMesh::XdrMGF::mp_xdr_handle, libMesh::XdrMGF::orig_flag, libMesh::XdrMGF::R_ASCII, libMesh::XdrMHEAD::set_block_elt_types(), libMesh::XdrMHEAD::set_n_blocks(), libMesh::XdrMHEAD::set_num_elem_each_block(), libMesh::XdrHEAD::setId(), libMesh::XdrHEAD::setTitle(), and libMesh::XdrMGF::W_ASCII.
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
inline |
Read/Write an integer connectivity array
| array | Pointer to an array of ints |
| numvar | Total number of variables to be read/written |
| num | Basically a dummy parameter |
Definition at line 89 of file xdr_mesh.h.
References libMesh::XdrMGF::dataBlk().
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
inline |
Calls the init method in the parent class, XdrMGF with the appropriate parameters.
| type | One of: UNKNOWN, ENCODE, DECODE |
| fn | const char pointer which points to the filename |
| icnt | Number to be appended to file e.g. name.mesh.0000 |
| dim | Problem dimension (always three in MGF) |
Definition at line 63 of file xdr_mesh.h.
References libMesh::dim, libMesh::XdrMGF::init(), and m_dim.
Referenced by libMesh::LegacyXdrIO::read_mesh(), and libMesh::LegacyXdrIO::write_mesh().
|
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 libMesh::XdrSOLN::init(), and 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().
|
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().
|
private |
|
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(), libMesh::XdrSOLN::header(), header(), and libMesh::XdrMGF::init().
|
protectedinherited |
An input file stream object
Definition at line 228 of file xdr_mgf.h.
Referenced by libMesh::XdrMGF::dataBlk(), libMesh::XdrSOLN::header(), 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(), libMesh::XdrSOLN::header(), 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(), libMesh::XdrSOLN::header(), 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(), header(), libMesh::XdrMGF::init(), and libMesh::XdrMGF::set_orig_flag().