19 #include "libmesh/dof_map.h" 20 #include "libmesh/nemesis_io.h" 32 params.
addClassDescription(
"Object for output data in the Nemesis (parallel ExodusII) format.");
40 _nemesis_io_ptr(nullptr),
43 _nemesis_initialized(false)
86 for (
const auto &
name : pps)
100 for (
const auto & out_name :
out)
110 const std::vector<dof_id_type> & dof_indices = scalar_var.
dofIndices();
111 const unsigned int n = dof_indices.size();
114 const DofMap & dof_map = scalar_var.
sys().
dofMap();
115 for (
unsigned int i = 0; i != n; ++i)
131 for (
unsigned int i = 0; i < n; ++i)
133 std::ostringstream
os;
134 os << out_name <<
"_" << i;
179 std::ostringstream
output;
184 output <<
"-s" << std::setw(
_padding) << std::setprecision(0) << std::setfill(
'0') << std::right
const std::set< std::string > & getPostprocessorOutput()
The list of postprocessor names that are set for output.
virtual void initialSetup() override
Sets up the libMesh::NemesisII_IO object used for outputting to the Nemesis format.
static InputParameters validParams()
std::vector< Real > _global_values
Storage for scalar values (postprocessors and scalar AuxVariables)
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
virtual void outputScalarVariables() override
Writes scalar AuxVariables to global output parameters.
std::vector< std::string > _global_names
Storage for names of the above scalar values.
unsigned int _nemesis_num
Count of outputs per exodus file.
const Parallel::Communicator & comm() const
std::string _file_base
The base filename from the input paramaters.
virtual void output()
A single call to this function should output all the necessary data for a single timestep.
std::basic_ostream< charT, traits > * os
virtual const std::string & name() const
Get the name of the class.
unsigned int _padding
Number of digits to pad the extensions.
uint8_t processor_id_type
virtual DofMap & dofMap()
Gets writeable reference to the dof map.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
const std::set< std::string > & getScalarOutput()
The list of scalar variables names that are set for output.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
EquationSystems * _es_ptr
Reference the the libMesh::EquationSystems object that contains the data.
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
MooseApp & _app
The MOOSE application this is associated with.
static InputParameters enableOutputTypes(const std::string &names=std::string())
A method for enabling individual output type control.
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
virtual void output() override
Overload the Output::output method, this is required for Nemesis output due to the method utilized fo...
Based class for output objects.
OutputTools< Real >::VariableValue VariableValue
virtual void initialSetup()
Call init() method on setup.
bool _nemesis_initialized
Flag if the output has been initialized.
Class for scalar variables (they are different).
virtual MooseMesh & mesh() override
const std::set< std::string > & getElementalVariableOutput()
The list of elemental nonlinear variables names that are set for output.
const std::set< std::string > & getNodalVariableOutput()
The list of nodal nonlinear variables names that are set for output.
virtual void outputPostprocessors() override
Writes postprocessor values to global output parameters.
unsigned int _file_num
Current output filename; utilized by filename() to create the proper suffix.
registerMooseObject("MooseApp", Nemesis)
static InputParameters validParams()
virtual void meshChanged() override
Creates a new NemesisII_IO output object for outputting a new mesh.
virtual std::string filename() override
Returns the current filename, this method handles the -s000 suffix common to NemesisII files...
SystemBase & sys()
Get the system this variable is part of.
Nemesis(const InputParameters ¶meters)
Class constructor.
Real getGlobalTimeOffset() const
Each App has it's own local time.
const VariableValue & sln() const
virtual ~Nemesis()
Class destructor.
virtual Real getOutputTime()
Get the time that will be used for stream/file outputting.
std::unique_ptr< Nemesis_IO > _nemesis_io_ptr
Pointer to the libMesh::NemesisII_IO object that performs the actual data output. ...
Class for output data to the Nemesis format.