$extrastylesheet
#include <mesh_input.h>
Public Member Functions | |
| virtual | ~MeshInput () |
| virtual void | read (const std::string &)=0 |
Protected Member Functions | |
| MeshInput (bool is_parallel_format=false) | |
| MeshInput (MT &, const bool is_parallel_format=false) | |
| MT & | mesh () |
| void | set_n_partitions (unsigned int n_parts) |
| void | skip_comment_lines (std::istream &in, const char comment_start) |
Protected Attributes | |
| std::vector< bool > | elems_of_dimension |
Private Attributes | |
| MT * | _obj |
| const bool | _is_parallel_format |
This class defines an abstract interface for Mesh input. Specific classes derived from this class actually implement reading various mesh formats.
Definition at line 51 of file mesh_input.h.
| libMesh::MeshInput< MT >::MeshInput | ( | bool | is_parallel_format = false | ) | [inline, explicit, protected] |
Default constructor. Will set the _obj to NULL, effectively rendering this object useless.
Definition at line 133 of file mesh_input.h.
: elems_of_dimension(), _obj (NULL), _is_parallel_format(is_parallel_format) { }
| libMesh::MeshInput< MT >::MeshInput | ( | MT & | obj, |
| const bool | is_parallel_format = false |
||
| ) | [inline, explicit, protected] |
Constructor. Takes a writeable reference to an object. This is the constructor required to read an object.
Definition at line 144 of file mesh_input.h.
References libMesh::MeshInput< MT >::_is_parallel_format, libMesh::MeshInput< MT >::mesh(), libMesh::out, and libMesh::processor_id().
: elems_of_dimension(), _obj (&obj), _is_parallel_format(is_parallel_format) { if (!_is_parallel_format && !this->mesh().is_serial()) { if (this->mesh().processor_id() == 0) { libmesh_do_once(libMesh::out << "Warning: This MeshOutput subclass only supports meshes which have been serialized!" << std::endl;); } } }
| libMesh::MeshInput< MT >::~MeshInput | ( | ) | [inline, virtual] |
| MT & libMesh::MeshInput< MT >::mesh | ( | ) | [inline, protected] |
Returns the object as a writeable reference.
Definition at line 172 of file mesh_input.h.
Referenced by libMesh::MeshInput< MT >::MeshInput(), and libMesh::MeshInput< MeshBase >::set_n_partitions().
| virtual void libMesh::MeshInput< MT >::read | ( | const std::string & | ) | [pure virtual] |
This method implements reading a mesh from a specified file.
Implemented in libMesh::MatlabIO, libMesh::VTKIO, libMesh::XdrIO, libMesh::CheckpointIO, libMesh::LegacyXdrIO, libMesh::GMVIO, libMesh::ExodusII_IO, libMesh::GmshIO, libMesh::UNVIO, libMesh::Nemesis_IO, libMesh::TetGenIO, libMesh::UCDIO, libMesh::NameBasedIO, libMesh::OFFIO, and libMesh::AbaqusIO.
| void libMesh::MeshInput< MT >::set_n_partitions | ( | unsigned int | n_parts | ) | [inline, protected] |
Sets the number of partitions in the mesh. Typically this gets done by the partitioner, but some parallel file formats begin "pre-partitioned".
Definition at line 94 of file mesh_input.h.
{ this->mesh().set_n_partitions() = n_parts; }
| void libMesh::MeshInput< MT >::skip_comment_lines | ( | std::istream & | in, |
| const char | comment_start | ||
| ) | [protected] |
Reads input from in, skipping all the lines that start with the character comment_start.
Definition at line 182 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);
}
const bool libMesh::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 124 of file mesh_input.h.
Referenced by libMesh::MeshInput< MT >::MeshInput().
MT* libMesh::MeshInput< MT >::_obj [private] |
A pointer to a non-const object object. This allows us to read the object from file.
Definition at line 117 of file mesh_input.h.
std::vector<bool> libMesh::MeshInput< MT >::elems_of_dimension [protected] |
A vector of bools describing what dimension elements have been encountered when reading a mesh.
Definition at line 100 of file mesh_input.h.