This class defines an abstract interface for Mesh input. Specific classes derived from this class actually implement reading various mesh formats.
Author:
Benjamin S. Kirk
Date:
2004
Version:
Revision:
3391
Definition at line 49 of file mesh_input.h.
Constructor & Destructor Documentation
template<class MT > MeshInput< MT >::MeshInput (boolis_parallel_format = false) [inline, protected]Default constructor. Will set the _obj to NULL, effectively rendering this object useless.
template<class MT> MeshInput< MT >::MeshInput (MT &obj, const boolis_parallel_format = false) [inline, protected]Constructor. Takes a writeable reference to an object. This is the constructor required to read an object.
Definition at line 126 of file mesh_input.h.
References MeshInput< MT >::_is_parallel_format, MeshInput< MT >::mesh(), and libMesh::processor_id().
:
_obj (&obj),
_is_parallel_format(is_parallel_format)
{
if (!_is_parallel_format && !this->mesh().is_serial())
{
if (libMesh::processor_id() == 0)
{
std::cerr << 'Warning: This I/O operation may only be supported for meshes which have been serialized!'
<< std::endl;
libmesh_here();
}
// libmesh_error();
}
}
template<class MT > MT & MeshInput< MT >::mesh () [inline, protected]Returns the object as a writeable reference.
Definition at line 154 of file mesh_input.h.
Referenced by MeshInput< MT >::MeshInput().
{
if (_obj == NULL) libmesh_error();
return *_obj;
}
template<class MT> virtual void MeshInput< MT >::read (const std::string &) [pure virtual]This method implements reading a mesh from a specified file.
Implemented in ExodusII_IO, GmshIO, GMVIO, LegacyXdrIO, MatlabIO, Nemesis_IO, OFFIO, TetGenIO, UCDIO, UNVIO, VTKIO, and XdrIO.
template<class MT > void MeshInput< MT >::skip_comment_lines (std::istream &in, const charcomment_start) [protected]Reads input from in, skipping all the lines that start with the character comment_start.
Definition at line 163 of file mesh_input.h.
{
char c, line[256];
while (in.get(c), c==comment_start)
in.getline (line, 255);
// put back first character of
// first non-comment line
in.putback (c);
}
Member Data Documentation
template<class MT> const bool MeshInput< MT >::_is_parallel_format [private]Flag specifying whether this format is parallel-capable. If this is false (default) I/O is only permitted when the mesh has been serialized.
Definition at line 107 of file mesh_input.h.
Referenced by MeshInput< MT >::MeshInput().
template<class MT> MT* MeshInput< MT >::_obj [private]A pointer to a non-const object object. This allows us to read the object from file.
Definition at line 100 of file mesh_input.h.
Author
Generated automatically by Doxygen for libMesh from the source code.