libMesh::MeshInput< MT > Class Template Referenceabstract

#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 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

Detailed Description

template<class MT>
class libMesh::MeshInput< MT >

This class defines an abstract interface for Mesh input. Specific classes derived from this class actually implement reading various mesh formats.

Benjamin S. Kirk

Definition at line 51 of file mesh_input.h.

Constructor & Destructor Documentation

template<class MT >
libMesh::MeshInput< MT >::MeshInput ( bool  is_parallel_format = false)

Default constructor. Will set the _obj to NULL, effectively rendering this object useless.

Definition at line 126 of file mesh_input.h.

126  :
128  _obj (NULL),
129  _is_parallel_format(is_parallel_format)
130 {
131 }
template<class MT>
libMesh::MeshInput< MT >::MeshInput ( MT &  obj,
const bool  is_parallel_format = false 

Constructor. Takes a writeable reference to an object. This is the constructor required to read an object.

Definition at line 137 of file mesh_input.h.

References libMesh::MeshInput< MT >::_is_parallel_format, libMesh::MeshInput< MT >::mesh(), libMesh::out, and libMesh::processor_id().

137  :
139  _obj (&obj),
140  _is_parallel_format(is_parallel_format)
141 {
142  if (!_is_parallel_format && !this->mesh().is_serial())
143  {
144  if (this->mesh().processor_id() == 0)
145  {
146  libmesh_do_once(libMesh::out <<
147  "Warning: This MeshOutput subclass only supports meshes which have been serialized!"
148  << std::endl;);
149  }
150  }
151 }
template<class MT >
libMesh::MeshInput< MT >::~MeshInput ( )


Definition at line 157 of file mesh_input.h.

158 {
159 }

Member Function Documentation

template<class MT >
MT & libMesh::MeshInput< MT >::mesh ( )

Returns the object as a writeable reference.

Definition at line 165 of file mesh_input.h.

Referenced by libMesh::GMVIO::_read_materials(), 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::ExodusII_IO::copy_nodal_solution(), libMesh::GMVIO::copy_nodal_solution(), libMesh::TetGenIO::element_in(), libMesh::UNVIO::element_in(), libMesh::MeshInput< MT >::MeshInput(), libMesh::TetGenIO::node_in(), libMesh::UNVIO::node_in(), libMesh::AbaqusIO::read(), libMesh::TetGenIO::read(), libMesh::ExodusII_IO::read(), libMesh::Nemesis_IO::read(), libMesh::GMVIO::read(), libMesh::CheckpointIO::read(), libMesh::XdrIO::read(), libMesh::VTKIO::read(), libMesh::LegacyXdrIO::read_ascii(), libMesh::CheckpointIO::read_bcs(), libMesh::CheckpointIO::read_connectivity(), libMesh::AbaqusIO::read_elements(), libMesh::UCDIO::read_implementation(), libMesh::UNVIO::read_implementation(), libMesh::GmshIO::read_mesh(), libMesh::LegacyXdrIO::read_mesh(), libMesh::AbaqusIO::read_nodes(), libMesh::CheckpointIO::read_nodes(), libMesh::CheckpointIO::read_nodesets(), libMesh::XdrIO::read_serialized_bcs(), 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(), and libMesh::UNVIO::write_implementation().

166 {
167  if (_obj == NULL) libmesh_error();
168  return *_obj;
169 }
template<class MT>
virtual void libMesh::MeshInput< MT >::read ( const std::string &  )
pure virtual
template<class MT >
void libMesh::MeshInput< MT >::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.

Definition at line 174 of file mesh_input.h.

176 {
177  char c, line[256];
179  while (in.get(c), c==comment_start)
180  in.getline (line, 255);
182  // put back first character of
183  // first non-comment line
184  in.putback (c);
185 }

Member Data Documentation

template<class MT>
const bool libMesh::MeshInput< MT >::_is_parallel_format

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 117 of file mesh_input.h.

Referenced by libMesh::MeshInput< MT >::MeshInput().

template<class MT>
MT* libMesh::MeshInput< MT >::_obj

A pointer to a non-const object object. This allows us to read the object from file.

Definition at line 110 of file mesh_input.h.

template<class MT>
std::vector<bool> libMesh::MeshInput< MT >::elems_of_dimension

A vector of bools describing what dimension elements have been encountered when reading a mesh.

Definition at line 93 of file mesh_input.h.

The documentation for this class was generated from the following file:

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:27 UTC

Hosted By: Logo