Go to the documentation of this file.
20 #ifndef LIBMESH_GMV_IO_H
21 #define LIBMESH_GMV_IO_H
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/mesh_output.h"
26 #include "libmesh/mesh_input.h"
28 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS
34 #include "libmesh/enum_elem_type.h"
76 virtual void write (
const std::string &)
override;
81 virtual void read (
const std::string & mesh_file)
override;
94 const std::vector<Number> &,
95 const std::vector<std::string> &)
override;
141 const bool write_partitioning,
142 const std::set<std::string> * system_names=
nullptr)
const;
152 const std::vector<Number> * =
nullptr,
153 const std::vector<std::string> * =
nullptr);
167 const std::vector<Real> * cell_centered_data_vals);
184 const std::vector<Number> * =
nullptr,
185 const std::vector<std::string> * =
nullptr);
193 const std::vector<Number> * =
nullptr,
194 const std::vector<std::string> * =
nullptr);
261 #endif // LIBMESH_GMV_IO_H
bool _subdivide_second_order
Flag to subdivide second order elements.
bool & p_levels()
Flag indicating whether or not to write p level information for p refined meshes.
void write_ascii_old_impl(const std::string &, const std::vector< Number > *=nullptr, const std::vector< std::string > *=nullptr)
This method implements writing a mesh with nodal data to a specified file where the nodal data and va...
void copy_nodal_solution(EquationSystems &es)
If we read in a nodal solution while reading in a mesh, we can attempt to copy that nodal solution in...
bool _write_subdomain_id_as_material
Flag to write element subdomain_id's as GMV "materials" instead of element processor_id's.
The libMesh namespace provides an interface to certain functionality in the library.
GMVIO(const MeshBase &)
Constructor.
bool & discontinuous()
Flag indicating whether or not to write the mesh as discontinuous cell patches.
bool & subdivide_second_order()
Flag indicating whether or not to subdivide second order elements.
This class implements writing meshes in the GMV format.
void write_ascii_new_impl(const std::string &, const std::vector< Number > *=nullptr, const std::vector< std::string > *=nullptr)
This method implements writing a mesh with nodal data to a specified file where the nodal data and va...
bool _partitioning
Flag to write the mesh partitioning.
void add_cell_centered_data(const std::string &cell_centered_data_name, const std::vector< Real > *cell_centered_data_vals)
Takes a vector of cell-centered data to be plotted.
bool _p_levels
Flag to write the mesh p refinement levels.
This is the MeshBase class.
void write_discontinuous_gmv(const std::string &name, const EquationSystems &es, const bool write_partitioning, const std::set< std::string > *system_names=nullptr) const
Writes a GMV file with discontinuous data.
static std::map< std::string, ElemType > _reading_element_map
Static map from string -> ElementType for use during reading.
virtual void read(const std::string &mesh_file) override
This method implements reading a mesh from a specified file.
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
bool _binary
Flag to write binary data.
This is the EquationSystems class.
unsigned int _next_elem_id
void _read_nodes()
Helper functions for reading nodes/cells from a GMV file.
This class defines an abstract interface for Mesh output.
void write_binary(const std::string &, const std::vector< Number > *=nullptr, const std::vector< std::string > *=nullptr)
This method implements writing a mesh with nodal data to a specified file where the nodal data and va...
bool & partitioning()
Flag indicating whether or not to write the partitioning information for the mesh.
bool & binary()
Flag indicating whether or not to write a binary file.
bool _discontinuous
Flag to write the mesh as discontinuous patches.
bool & write_subdomain_id_as_material()
Flag to write element subdomain_id's as GMV "materials" instead of element processor_id's.
ElemType gmv_elem_to_libmesh_elem(std::string elemname)
virtual void write_nodal_data(const std::string &, const std::vector< Number > &, const std::vector< std::string > &) override
This method implements writing a mesh with nodal data to a specified file where the nodal data and va...
std::map< std::string, std::vector< Number > > _nodal_data
void ErrorVector unsigned int
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
ElemType
Defines an enum for geometric element types.
std::map< std::string, const std::vector< Real > * > _cell_centered_data
Storage for arbitrary cell-centered data.
static std::map< std::string, ElemType > build_reading_element_map()
Static function used to build the _reading_element_map.