#include <mesh_output.h>
Public Member Functions | |
virtual | ~MeshOutput () |
virtual void | write (const std::string &)=0 |
virtual void | write_equation_systems (const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr) |
virtual void | write_discontinuous_equation_systems (const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr) |
virtual void | write_nodal_data (const std::string &, const std::vector< Number > &, const std::vector< std::string > &) |
virtual void | write_nodal_data_discontinuous (const std::string &, const std::vector< Number > &, const std::vector< std::string > &) |
virtual void | write_nodal_data (const std::string &, const NumericVector< Number > &, const std::vector< std::string > &) |
unsigned int & | ascii_precision () |
Protected Member Functions | |
MeshOutput (const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false) | |
MeshOutput (const MT &, const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false) | |
const MT & | mesh () const |
Protected Attributes | |
const bool | _is_parallel_format |
const bool | _serial_only_needed_on_proc_0 |
Private Attributes | |
const MT *const | _obj |
unsigned int | _ascii_precision |
This class defines an abstract interface for Mesh
output. Specific classes derived from this class actually implement writing various mesh formats.
Definition at line 53 of file mesh_output.h.
|
inlineexplicitprotected |
Default constructor. Will set the _obj to nullptr, effectively rendering this object useless.
Definition at line 194 of file mesh_output.h.
|
inlineexplicitprotected |
Constructor. Takes a reference to a constant object. This constructor will only allow us to write the object.
Definition at line 205 of file mesh_output.h.
|
inlinevirtual |
|
inline |
Return/set the precision to use when writing ASCII files.
By default we use numeric_limits<Real>::digits10 + 2, which should be enough to write out to ASCII and get the exact same Real back when reading in.
Definition at line 244 of file mesh_output.h.
|
inlineprotected |
Definition at line 234 of file mesh_output.h.
Referenced by libMesh::VTKIO::cells_to_vtk(), libMesh::TecplotIO::elem_dimension(), libMesh::UNVIO::elements_out(), libMesh::UNVIO::nodes_out(), libMesh::VTKIO::nodes_to_vtk(), libMesh::Nemesis_IO::prepare_to_write_nodal_data(), libMesh::FroIO::write(), libMesh::PostscriptIO::write(), libMesh::TetGenIO::write(), libMesh::Nemesis_IO::write(), libMesh::ExodusII_IO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), libMesh::MEDITIO::write_ascii(), libMesh::TecplotIO::write_ascii(), libMesh::GMVIO::write_ascii_new_impl(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::TecplotIO::write_binary(), libMesh::GMVIO::write_binary(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::Nemesis_IO::write_element_data(), libMesh::ExodusII_IO::write_element_data(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::UCDIO::write_implementation(), libMesh::GmshIO::write_mesh(), libMesh::VTKIO::write_nodal_data(), libMesh::UCDIO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data(), libMesh::ExodusII_IO::write_nodal_data_common(), libMesh::ExodusII_IO::write_nodal_data_discontinuous(), libMesh::CheckpointIO::write_nodesets(), libMesh::XdrIO::write_parallel(), libMesh::GmshIO::write_post(), libMesh::EnsightIO::write_scalar_ascii(), libMesh::XdrIO::write_serialized_bcs_helper(), libMesh::XdrIO::write_serialized_connectivity(), libMesh::XdrIO::write_serialized_nodes(), libMesh::XdrIO::write_serialized_nodesets(), libMesh::XdrIO::write_serialized_subdomain_names(), libMesh::GnuPlotIO::write_solution(), libMesh::CheckpointIO::write_subdomain_names(), and libMesh::EnsightIO::write_vector_ascii().
|
pure virtual |
This method implements writing a mesh to a specified file.
Implemented in libMesh::EnsightIO, libMesh::CheckpointIO, libMesh::VTKIO, libMesh::XdrIO, libMesh::UCDIO, libMesh::ExodusII_IO, libMesh::UNVIO, libMesh::GmshIO, libMesh::Nemesis_IO, libMesh::GMVIO, libMesh::TetGenIO, libMesh::NameBasedIO, libMesh::PostscriptIO, libMesh::MEDITIO, libMesh::GnuPlotIO, libMesh::TecplotIO, and libMesh::FroIO.
|
virtual |
This method implements writing a mesh with discontinuous data to a specified file where the data is taken from the EquationSystems
object.
Definition at line 92 of file mesh_output.C.
|
virtual |
This method implements writing a mesh with data to a specified file where the data is taken from the EquationSystems
object.
Reimplemented in libMesh::NameBasedIO.
Definition at line 31 of file mesh_output.C.
Referenced by libMesh::ErrorVector::plot_error(), and libMesh::NameBasedIO::write_equation_systems().
|
inlinevirtual |
This method implements writing a mesh with nodal data to a specified file where the nodal data and variable names are provided.
Reimplemented in libMesh::ExodusII_IO, libMesh::Nemesis_IO, libMesh::UCDIO, libMesh::NameBasedIO, libMesh::GmshIO, libMesh::GMVIO, libMesh::VTKIO, libMesh::MEDITIO, libMesh::GnuPlotIO, and libMesh::TecplotIO.
Definition at line 105 of file mesh_output.h.
|
virtual |
This method should be overridden by "parallel" output formats for writing nodal data. Instead of getting a localized copy of the nodal solution vector, it is passed a NumericVector of type=PARALLEL which is in node-major order i.e. (u0,v0,w0, u1,v1,w1, u2,v2,w2, u3,v3,w3, ...) and contains n_nodes*n_vars total entries. Then, it is up to the individual I/O class to extract the required solution values from this vector and write them in parallel.
If not implemented, localizes the parallel vector into a std::vector and calls the other version of this function.
Reimplemented in libMesh::Nemesis_IO.
Definition at line 150 of file mesh_output.C.
|
inlinevirtual |
This method implements writing a mesh with discontinuous data to a specified file where the nodal data and variables names are provided.
Reimplemented in libMesh::ExodusII_IO.
Definition at line 114 of file mesh_output.h.
|
private |
Precision to use when writing ASCII files.
Definition at line 182 of file mesh_output.h.
|
protected |
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 159 of file mesh_output.h.
|
private |
A pointer to a constant object. This allows us to write the object to file.
Definition at line 177 of file mesh_output.h.
|
protected |
Flag specifying whether this format can be written by only serializing the mesh to processor zero
If this is false (default) the mesh will be serialized to all processors
Definition at line 168 of file mesh_output.h.