libMesh
|
This class defines an abstract interface for Mesh
input.
More...
#include <mesh_base.h>
Public Member Functions | |
virtual | ~MeshInput () |
Destructor. More... | |
virtual void | read (const std::string &)=0 |
This method implements reading a mesh from a specified file. More... | |
bool | is_parallel_format () const |
Returns true iff this mesh file format and input class are parallelized, so that all processors can read their share of the data at once. More... | |
Protected Member Functions | |
MeshInput (bool is_parallel_format=false) | |
Default constructor. More... | |
MeshInput (MT &, const bool is_parallel_format=false) | |
Constructor. More... | |
MT & | mesh () |
void | set_n_partitions (unsigned int n_parts) |
Sets the number of partitions in the mesh. More... | |
void | skip_comment_lines (std::istream &in, const char comment_start) |
Reads input from in , skipping all the lines that start with the character comment_start . More... | |
Protected Attributes | |
std::vector< bool > | elems_of_dimension |
A vector of bools describing what dimension elements have been encountered when reading a mesh. More... | |
Private Attributes | |
MT * | _obj |
A pointer to a non-const object object. More... | |
const bool | _is_parallel_format |
Flag specifying whether this format is parallel-capable. More... | |
This class defines an abstract interface for Mesh
input.
Specific classes derived from this class actually implement reading various mesh formats.
Definition at line 56 of file mesh_base.h.
|
inlineexplicitprotected |
Default constructor.
Will set the _obj to nullptr, effectively rendering this object useless.
Definition at line 139 of file mesh_input.h.
|
inlineexplicitprotected |
Constructor.
Takes a writable reference to an object. This is the constructor required to read an object.
Definition at line 150 of file mesh_input.h.
|
inlinevirtual |
|
inline |
Returns true iff this mesh file format and input class are parallelized, so that all processors can read their share of the data at once.
Definition at line 87 of file mesh_input.h.
Referenced by MeshInputTest::testSingleElementImpl().
|
inlineprotected |
Definition at line 178 of file mesh_input.h.
Referenced by libMesh::GMVIO::_read_nodes(), libMesh::GMVIO::_read_one_cell(), libMesh::AbaqusIO::assign_boundary_node_ids(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::AbaqusIO::assign_subdomain_ids(), libMesh::ExodusII_IO::copy_elemental_solution(), libMesh::Nemesis_IO::copy_elemental_solution(), libMesh::GMVIO::copy_nodal_solution(), libMesh::ExodusII_IO::copy_nodal_solution(), libMesh::Nemesis_IO::copy_nodal_solution(), libMesh::TetGenIO::element_in(), libMesh::UNVIO::elements_in(), libMesh::UNVIO::groups_in(), libMesh::TetGenIO::node_in(), libMesh::UNVIO::nodes_in(), libMesh::AbaqusIO::read(), libMesh::NameBasedIO::read(), libMesh::TetGenIO::read(), libMesh::GMVIO::read(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::XdrIO::read(), libMesh::CheckpointIO::read(), libMesh::VTKIO::read(), libMesh::CheckpointIO::read_bcs(), libMesh::CheckpointIO::read_connectivity(), libMesh::ExodusII_IO::read_elemental_variable(), libMesh::AbaqusIO::read_elements(), libMesh::ExodusII_IO::read_header(), libMesh::CheckpointIO::read_header(), libMesh::XdrIO::read_header(), libMesh::UCDIO::read_implementation(), libMesh::UNVIO::read_implementation(), libMesh::GmshIO::read_mesh(), libMesh::DynaIO::read_mesh(), libMesh::AbaqusIO::read_nodes(), libMesh::CheckpointIO::read_nodes(), libMesh::CheckpointIO::read_nodesets(), libMesh::CheckpointIO::read_remote_elem(), libMesh::XdrIO::read_serialized_bcs_helper(), libMesh::XdrIO::read_serialized_connectivity(), libMesh::XdrIO::read_serialized_nodes(), libMesh::XdrIO::read_serialized_nodesets(), libMesh::XdrIO::read_serialized_subdomain_names(), libMesh::OFFIO::read_stream(), libMesh::MatlabIO::read_stream(), libMesh::CheckpointIO::read_subdomain_names(), libMesh::MeshInput< MeshBase >::set_n_partitions(), libMesh::NameBasedIO::write(), and libMesh::NameBasedIO::write_nodal_data().
|
pure virtual |
This method implements reading a mesh from a specified file.
This should typically be called in parallel if is_parallel_format(), but should be called only on processor 0 (after which a mesh broadcast() is called) otherwise.
Implemented in libMesh::VTKIO, libMesh::CheckpointIO, libMesh::MatlabIO, libMesh::ExodusII_IO, libMesh::XdrIO, libMesh::DynaIO, libMesh::GmshIO, libMesh::UNVIO, libMesh::Nemesis_IO, libMesh::GMVIO, libMesh::UCDIO, libMesh::TetGenIO, libMesh::NameBasedIO, libMesh::AbaqusIO, and libMesh::OFFIO.
|
inlineprotected |
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 101 of file mesh_input.h.
|
protected |
Reads input from in
, skipping all the lines that start with the character comment_start
.
Definition at line 187 of file mesh_input.h.
|
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 130 of file mesh_input.h.
Referenced by libMesh::MeshInput< MeshBase >::is_parallel_format().
|
private |
A pointer to a non-const object object.
This allows us to read the object from file.
Definition at line 123 of file mesh_input.h.
|
protected |
A vector of bools describing what dimension elements have been encountered when reading a mesh.
Definition at line 107 of file mesh_input.h.