20#ifndef LIBMESH_NEMESIS_IO_H
21#define LIBMESH_NEMESIS_IO_H
25#include "libmesh/libmesh_common.h"
26#include "libmesh/mesh_input.h"
27#include "libmesh/mesh_output.h"
28#include "libmesh/parallel_object.h"
36class Nemesis_IO_Helper;
82 virtual void read (
const std::string & base_filename)
override;
87 virtual void write (
const std::string & base_filename)
override;
107 bool allow_empty =
true);
113 const std::vector<Number> & soln,
114 const std::vector<std::string> & names)
override;
121 const std::set<std::string> * system_names)
override;
128 const std::vector<std::string> & names)
override;
142 void verbose (
bool set_verbosity);
155 const std::vector<std::string> &);
205 std::string system_var_name,
206 std::string exodus_var_name,
207 unsigned int timestep=1);
214 std::string system_var_name,
215 std::string exodus_var_name,
216 unsigned int timestep=1);
222 std::vector<std::string> system_var_names,
223 std::vector<std::string> exodus_var_names,
224 unsigned int timestep=1);
234 unsigned int timestep,
235 std::vector<Real> & global_values);
245#ifdef LIBMESH_HAVE_NEMESIS_API
262#if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API)
289 const std::vector<std::string> & names);
This is the EquationSystems class.
This is the MeshBase class.
This class defines an abstract interface for Mesh output.
This is the Nemesis_IO_Helper class.
The Nemesis_IO class implements reading parallel meshes in the Nemesis file format from Sandia Nation...
std::unique_ptr< Nemesis_IO_Helper > nemhelper
void write_complex_magnitude(bool val)
Set the flag indicating whether the complex modulus should be written when complex numbers are enable...
std::vector< std::string > _output_variables
The names of the variables to be output.
virtual ~Nemesis_IO()
Destructor.
bool _allow_empty_variables
If true, _output_variables is allowed to remain empty.
bool _append
Default false.
void set_hdf5_writing(bool write_hdf5)
Set to true (the default) to write files in an HDF5-based file format (when HDF5 is available),...
void verbose(bool set_verbosity)
Set the flag indicating if we should be verbose.
const std::vector< std::string > & get_nodal_var_names()
Return list of the nodal variable names.
const std::vector< std::string > & get_elem_var_names()
Return list of the elemental variable names.
const std::vector< std::string > & get_global_var_names()
Return list of the global variable names.
void write_element_data(const EquationSystems &es)
Write out element solution in parallel, without localizing the solution vector.
virtual void read(const std::string &base_filename) override
Implements reading the mesh from several different files.
void assert_symmetric_cmaps()
void write_global_data(const std::vector< Number > &, const std::vector< std::string > &)
Write out global variables.
void read_global_variable(std::vector< std::string > global_var_names, unsigned int timestep, std::vector< Real > &global_values)
Given a vector of global variables and a time step, returns the values of the global variable at the ...
const std::vector< Real > & get_time_steps()
Nemesis_IO_Helper & get_nemio_helper()
Return a reference to the Nemesis_IO_Helper object.
void write_timestep(const std::string &fname, const EquationSystems &es, const int timestep, const Real time)
Write one timestep's worth of the solution.
void append(bool val)
If true, this flag will cause the Nemesis_IO object to attempt to open an existing file for writing,...
virtual void write_nodal_data(const std::string &fname, const std::vector< Number > &soln, const std::vector< std::string > &names) override
Output a nodal solution from data in soln.
void set_output_variables(const std::vector< std::string > &output_variables, bool allow_empty=true)
Specify the list of variables which should be included in the output (whitelist) If empty,...
virtual void write(const std::string &base_filename) override
This method implements writing a mesh to a specified file.
void write_information_records(const std::vector< std::string > &)
Write out information records.
void prepare_to_write_nodal_data(const std::string &fname, const std::vector< std::string > &names)
Helper function containing code shared between the two different versions of write_nodal_data which t...
void copy_scalar_solution(System &system, std::vector< std::string > system_var_names, std::vector< std::string > exodus_var_names, unsigned int timestep=1)
Copy global variables into scalar variables of a System object.
int _timestep
Keeps track of the current timestep index being written.
void copy_nodal_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)
If we read in a nodal solution while reading in a mesh, we can attempt to copy that nodal solution in...
void copy_elemental_solution(System &system, std::string system_var_name, std::string exodus_var_name, unsigned int timestep=1)
If we read in a elemental solution while reading in a mesh, we can attempt to copy that elemental sol...
bool _verbose
Controls whether extra debugging information is printed to the screen or not.
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
An object whose state is distributed along a set of processors.
Manages consistently variables, degrees of freedom, and coefficient vectors.
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real