20#ifndef LIBMESH_MESH_OUTPUT_H
21#define LIBMESH_MESH_OUTPUT_H
25#include "libmesh/libmesh_common.h"
26#include "libmesh/libmesh_logging.h"
27#include "libmesh/mesh_base.h"
28#include "libmesh/mesh_serializer.h"
41template <
typename T>
class NumericVector;
62 MeshOutput (
const bool is_parallel_format =
false,
const bool serial_only_needed_on_proc_0 =
false);
69 MeshOutput (
const MT &,
const bool is_parallel_format =
false,
const bool serial_only_needed_on_proc_0 =
false);
86 virtual void write (
const std::string &) = 0;
94 const std::set<std::string> * system_names=
nullptr);
103 const std::set<std::string> * system_names=
nullptr);
110 const std::vector<Number> &,
111 const std::vector<std::string> &)
112 { libmesh_not_implemented(); }
119 const std::vector<Number> &,
120 const std::vector<std::string> &)
121 { libmesh_not_implemented(); }
138 const std::vector<std::string> &);
151 const std::set<std::string> *);
220 _is_parallel_format(is_parallel_format),
221 _serial_only_needed_on_proc_0(serial_only_needed_on_proc_0),
223 _ascii_precision (
std::numeric_limits<
Real>::max_digits10)
231 _is_parallel_format(is_parallel_format),
232 _serial_only_needed_on_proc_0(serial_only_needed_on_proc_0),
234 _ascii_precision (
std::numeric_limits<
Real>::max_digits10)
238 if (this->
mesh().processor_id() == 0)
241 "Warning: This MeshOutput subclass only supports meshes which have been serialized!"
271 return _ascii_precision;
This is the EquationSystems class.
This class defines an abstract interface for Mesh output.
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 ...
const bool _is_parallel_format
Flag specifying whether this format is parallel-capable.
unsigned int _ascii_precision
Precision to use when writing ASCII files.
virtual ~MeshOutput()
Destructor.
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 t...
const MT *const _obj
A pointer to a constant object.
const bool _serial_only_needed_on_proc_0
Flag specifying whether this format can be written by only serializing the mesh to processor zero.
virtual bool get_add_sides()
MeshOutput(const MT &, const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false)
Constructor.
MeshOutput(const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false)
Default constructor.
virtual void write(const std::string &)=0
This method implements writing a mesh to a specified file.
unsigned int & ascii_precision()
Return/set the precision to use when writing ASCII files.
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 va...
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 dat...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real