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" 40 class EquationSystems;
41 template <
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> *);
168 const MT &
mesh()
const;
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)
236 if (!_is_parallel_format && !this->
mesh().is_serial())
238 if (this->
mesh().processor_id() == 0)
241 "Warning: This MeshOutput subclass only supports meshes which have been serialized!" 271 return _ascii_precision;
278 #endif // LIBMESH_MESH_OUTPUT_H
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 ~MeshOutput()
Destructor.
This is the EquationSystems class.
virtual bool get_add_sides()
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...
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 MT *const _obj
A pointer to a constant object.
const bool _is_parallel_format
Flag specifying whether this format is parallel-capable.
unsigned int & ascii_precision()
Return/set the precision to use when writing ASCII files.
This class defines an abstract interface for Mesh output.
The libMesh namespace provides an interface to certain functionality in the library.
MeshOutput(const bool is_parallel_format=false, const bool serial_only_needed_on_proc_0=false)
Default constructor.
unsigned int _ascii_precision
Precision to use when writing ASCII files.
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...
virtual void write(const std::string &)=0
This method implements writing a mesh to a specified file.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _serial_only_needed_on_proc_0
Flag specifying whether this format can be written by only serializing the mesh to processor zero...