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);
253 #endif // LIBMESH_GMV_IO_H std::string name(const ElemQuality q)
This function returns a string containing some name for q.
virtual void read(const std::string &mesh_file) override
This method implements reading a mesh from a specified file.
ElemType
Defines an enum for geometric element types.
This is the EquationSystems class.
void _read_nodes()
Helper functions for reading nodes/cells from a GMV file.
bool _binary
Flag to write binary data.
static std::map< std::string, ElemType > _reading_element_map
Static map from string -> ElementType for use during reading.
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
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.
This class defines an abstract interface for Mesh output.
The libMesh namespace provides an interface to certain functionality in the library.
This class implements writing meshes in the GMV format.
bool & partitioning()
Flag indicating whether or not to write the partitioning information for the mesh.
std::map< std::string, std::vector< Number > > _nodal_data
This is the MeshBase class.
bool & binary()
Flag indicating whether or not to write a binary file.
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 & 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)
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.
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. ...
bool _subdivide_second_order
Flag to subdivide second order elements.
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...
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...
bool & subdivide_second_order()
Flag indicating whether or not to subdivide second order elements.
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...
GMVIO(const MeshBase &)
Constructor.
bool & discontinuous()
Flag indicating whether or not to write the mesh as discontinuous cell patches.
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.
bool _partitioning
Flag to write the mesh partitioning.
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 ErrorVector unsigned int