https://mooseframework.inl.gov
Nemesis.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
13 #include "AdvancedOutput.h"
14 
15 // libMesh forward declarations
16 namespace libMesh
17 {
18 class Nemesis_IO;
19 }
20 
24 class Nemesis : public AdvancedOutput
25 {
26 public:
28 
33 
37  virtual void initialSetup() override;
38 
42  virtual void meshChanged() override;
43 
52  virtual void outputSetup();
53 
54  bool supportsMaterialPropertyOutput() const override { return true; }
55 
56 protected:
61  virtual void output() override;
62 
66  virtual void outputPostprocessors() override;
67 
71  virtual void outputScalarVariables() override;
72 
78  virtual std::string filename() override;
79 
81  std::unique_ptr<libMesh::Nemesis_IO> _nemesis_io_ptr;
82 
84  std::vector<Real> _global_values;
85 
87  std::vector<std::string> _global_names;
88 
90  unsigned int & _file_num;
91 
92 private:
94  unsigned int & _nemesis_num;
95 
98 
101 
104 
110 };
virtual void outputScalarVariables() override
Writes scalar AuxVariables to global output parameters.
virtual void meshChanged() override
Creates a new NemesisII_IO output object for outputting a new mesh.
std::vector< Real > _global_values
Storage for scalar values (postprocessors and scalar AuxVariables)
Definition: Nemesis.h:84
bool _recovering
Flag indicating MOOSE is recovering via –recover command-line option.
Definition: Nemesis.h:100
std::unique_ptr< libMesh::Nemesis_IO > _nemesis_io_ptr
Pointer to the libMesh::NemesisII_IO object that performs the actual data output. ...
Definition: Nemesis.h:81
std::vector< std::string > _global_names
Storage for names of the above scalar values.
Definition: Nemesis.h:87
bool _write_hdf5
Flag to output HDF5 format (when available) in Nemesis.
Definition: Nemesis.h:109
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int & _nemesis_num
Count of outputs per exodus file.
Definition: Nemesis.h:94
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
virtual void outputPostprocessors() override
Writes postprocessor values to global output parameters.
virtual void outputSetup()
Performs the necessary deletion and re-creating of NemesisII_IO object.
bool & _nemesis_mesh_changed
A flag indicating to the Nemesis object that the mesh has changed.
Definition: Nemesis.h:103
virtual void output() override
Overload the Output::output method, this is required for Nemesis output due to the method utilized fo...
static InputParameters validParams()
Based class for output objects.
bool _nemesis_initialized
Flag if the output has been initialized.
Definition: Nemesis.h:97
virtual void initialSetup() override
Sets up the libMesh::NemesisII_IO object used for outputting to the Nemesis format.
virtual std::string filename() override
Returns the current filename, this method handles the -s000 suffix common to NemesisII files...
const InputParameters & parameters() const
Get the parameters of the object.
bool supportsMaterialPropertyOutput() const override
A virtual function that stores whether output type supports material output.
Definition: Nemesis.h:54
Nemesis(const InputParameters &parameters)
Class constructor.
Class for output data to the Nemesis format.
Definition: Nemesis.h:24
unsigned int & _file_num
Current output filename; utilized by filename() to create the proper suffix.
Definition: Nemesis.h:90