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"
68 virtual void write (
const std::string &)
override;
73 virtual void read (
const std::string & mesh_file)
override;
86 const std::vector<Number> &,
87 const std::vector<std::string> &)
override;
133 const bool write_partitioning,
134 const std::set<std::string> * system_names=
nullptr)
const;
144 const std::vector<Number> * =
nullptr,
145 const std::vector<std::string> * =
nullptr);
159 const std::vector<Real> * cell_centered_data_vals);
176 const std::vector<Number> * =
nullptr,
177 const std::vector<std::string> * =
nullptr);
185 const std::vector<Number> * =
nullptr,
186 const std::vector<std::string> * =
nullptr);
void ErrorVector unsigned int
This is the EquationSystems class.
This class implements writing meshes in the GMV format.
bool & partitioning()
Flag indicating whether or not to write the partitioning information for the mesh.
static std::map< std::string, ElemType > _reading_element_map
Static map from string -> ElementType for use during reading.
bool & write_subdomain_id_as_material()
Flag to write element subdomain_id's as GMV "materials" instead of element processor_id's.
bool & p_levels()
Flag indicating whether or not to write p level information for p refined meshes.
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 & discontinuous()
Flag indicating whether or not to write the mesh as discontinuous cell patches.
bool _binary
Flag to write binary data.
bool _p_levels
Flag to write the mesh p refinement levels.
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.
void _read_nodes()
Helper functions for reading nodes/cells from a GMV file.
std::map< std::string, std::vector< Number > > _nodal_data
bool & binary()
Flag indicating whether or not to write a binary file.
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
bool _partitioning
Flag to write the mesh partitioning.
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...
virtual void read(const std::string &mesh_file) override
This method implements reading a mesh from a specified file.
bool & subdivide_second_order()
Flag indicating whether or not to subdivide second order elements.
ElemType gmv_elem_to_libmesh_elem(std::string elemname)
static std::map< std::string, ElemType > build_reading_element_map()
Static function used to build the _reading_element_map.
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.
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...
unsigned int _next_elem_id
bool _discontinuous
Flag to write the mesh as discontinuous patches.
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...
bool _subdivide_second_order
Flag to subdivide second order elements.
bool _write_subdomain_id_as_material
Flag to write element subdomain_id's as GMV "materials" instead of element processor_id's.
std::map< std::string, const std::vector< Real > * > _cell_centered_data
Storage for arbitrary cell-centered data.
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...
This is the MeshBase class.
This class defines an abstract interface for Mesh output.
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.