libMesh
|
This class defines an abstract interface for Mesh
output.
More...
#include <mesh_output.h>
Public Member Functions | |
virtual | ~MeshOutput () |
Destructor. More... | |
virtual void | write (const std::string &)=0 |
This method implements writing a mesh to a specified file. More... | |
virtual void | write_equation_systems (const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr) |
This method implements writing a mesh with data to a specified file where the data is taken from the EquationSystems object. More... | |
virtual void | write_discontinuous_equation_systems (const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr) |
This method implements writing a mesh with discontinuous data to a specified file where the data is taken from the EquationSystems object. More... | |
virtual void | write_nodal_data (const std::string &, const std::vector< Number > &, const std::vector< std::string > &) |
This method implements writing a mesh with nodal data to a specified file where the nodal data and variable names are provided. More... | |
virtual void | write_nodal_data_discontinuous (const std::string &, const std::vector< Number > &, const std::vector< std::string > &) |
This method implements writing a mesh with discontinuous data to a specified file where the nodal data and variables names are provided. More... | |
virtual void | write_nodal_data (const std::string &, const NumericVector< Number > &, const std::vector< std::string > &) |
This method may be overridden by "parallel" output formats for writing nodal data. More... | |
virtual void | write_nodal_data (const std::string &, const EquationSystems &, const std::set< std::string > *) |
This method should be overridden by "parallel" output formats for writing nodal data. More... | |
unsigned int & | ascii_precision () |
Return/set the precision to use when writing ASCII files. More... | |
Protected Member Functions | |
MeshOutput (const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false) | |
Default constructor. More... | |
MeshOutput (const MT &, const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false) | |
Constructor. More... | |
const MT & | mesh () const |
virtual bool | get_add_sides () |
Protected Attributes | |
const bool | _is_parallel_format |
Flag specifying whether this format is parallel-capable. More... | |
const bool | _serial_only_needed_on_proc_0 |
Flag specifying whether this format can be written by only serializing the mesh to processor zero. More... | |
Private Attributes | |
const MT *const | _obj |
A pointer to a constant object. More... | |
unsigned int | _ascii_precision |
Precision to use when writing ASCII files. More... | |
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 219 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 230 of file mesh_output.h.
|
inlinevirtual |
|
inline |
Return/set the precision to use when writing ASCII files.
By default we use numeric_limits<Real>::max_digits10, which should be enough to write out to ASCII and get the exact same Real back when reading in.
Definition at line 269 of file mesh_output.h.
|
inlineprotectedvirtual |
Reimplemented in libMesh::ExodusII_IO.
Definition at line 176 of file mesh_output.h.
|
inlineprotected |
Definition at line 259 of file mesh_output.h.
Referenced by libMesh::VTKIO::cells_to_vtk(), libMesh::TecplotIO::elem_dimension(), libMesh::UNVIO::elements_out(), libMesh::VTKIO::get_local_node_values(), libMesh::ExodusII_IO::get_sideset_data_indices(), libMesh::UNVIO::nodes_out(), libMesh::VTKIO::nodes_to_vtk(), libMesh::Nemesis_IO::prepare_to_write_nodal_data(), libMesh::ExodusII_IO::read_sideset_data(), libMesh::FroIO::write(), libMesh::PostscriptIO::write(), libMesh::TetGenIO::write(), libMesh::Nemesis_IO::write(), libMesh::XdrIO::write(), libMesh::CheckpointIO::write(), libMesh::ExodusII_IO::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::CheckpointIO::write_connectivity(), libMesh::GMVIO::write_discontinuous_gmv(), libMesh::Nemesis_IO::write_element_data(), libMesh::ExodusII_IO::write_element_data(), libMesh::ExodusII_IO::write_element_data_from_discontinuous_nodal_data(), libMesh::ExodusII_IO::write_elemsets(), libMesh::EnsightIO::write_geometry_ascii(), libMesh::UCDIO::write_implementation(), libMesh::GmshIO::write_mesh(), libMesh::UCDIO::write_nodal_data(), libMesh::VTKIO::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_nodes(), 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::ExodusII_IO::write_sideset_data(), 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.
Note that writes may be buffered for efficiency, and so may not reach disk until after the file has been closed, which happens when the MeshOutput
object is destructed.
Implemented in libMesh::ExodusII_IO, libMesh::CheckpointIO, libMesh::VTKIO, libMesh::EnsightIO, libMesh::XdrIO, libMesh::GmshIO, libMesh::UNVIO, libMesh::Nemesis_IO, libMesh::UCDIO, libMesh::TetGenIO, libMesh::NameBasedIO, libMesh::PostscriptIO, libMesh::GMVIO, 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 89 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::RBConstruction::enrich_basis_from_rhs_terms(), main(), libMesh::ErrorVector::plot_error(), scale_mesh_and_plot(), MeshInputTest::testExodusWriteElementDataFromDiscontinuousNodalData(), PeriodicBCTest::testPeriodicBC(), MeshInputTest::testSingleElementImpl(), WriteVecAndScalar::testWriteExodus(), WriteVecAndScalar::testWriteNemesis(), transform_mesh_and_plot(), libMesh::TransientRBConstruction::truth_solve(), libMesh::RBConstruction::truth_solve(), libMesh::NameBasedIO::write_equation_systems(), and write_output().
|
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::GmshIO, libMesh::NameBasedIO, libMesh::VTKIO, libMesh::UCDIO, libMesh::GMVIO, libMesh::MEDITIO, libMesh::GnuPlotIO, and libMesh::TecplotIO.
Definition at line 109 of file mesh_output.h.
|
virtual |
This method may 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 149 of file mesh_output.C.
|
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 directly uses EquationSystems current_local_solution vectors to look up nodal values.
If not implemented, reorders the solutions into a nodal-only NumericVector and calls the above version of this function.
Reimplemented in libMesh::Nemesis_IO.
Definition at line 162 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 118 of file mesh_output.h.
|
private |
Precision to use when writing ASCII files.
Definition at line 207 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 184 of file mesh_output.h.
|
private |
A pointer to a constant object.
This allows us to write the object to file.
Definition at line 202 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 193 of file mesh_output.h.