www.mooseframework.org
Exodus.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "Exodus.h"
11 
12 // Moose includes
13 #include "DisplacedProblem.h"
14 #include "ExodusFormatter.h"
15 #include "FEProblem.h"
16 #include "FileMesh.h"
17 #include "MooseApp.h"
18 #include "MooseVariableScalar.h"
19 #include "LockFile.h"
20 
21 #include "libmesh/exodusII_io.h"
22 #include "libmesh/libmesh_config.h" // LIBMESH_HAVE_HDF5
23 
24 registerMooseObject("MooseApp", Exodus);
25 
28 {
29  // Get the base class parameters
31  params +=
32  AdvancedOutput::enableOutputTypes("nodal elemental scalar postprocessor reporter input");
33 
34  // Enable sequential file output (do not set default, the use_displace criteria relies on
35  // isParamValid, see Constructor)
36  params.addParam<bool>("sequence",
37  "Enable/disable sequential file output (enabled by default "
38  "when 'use_displace = true', otherwise defaults to false");
39 
40  // Select problem dimension for mesh output
41  params.addDeprecatedParam<bool>("use_problem_dimension",
42  "Use the problem dimension to the mesh output. "
43  "Set to false when outputting lower dimensional "
44  "meshes embedded in a higher dimensional space.",
45  "Use 'output_dimension = problem_dimension' instead.");
46 
47  MooseEnum output_dimension("default 1 2 3 problem_dimension", "default");
48 
49  params.addParam<MooseEnum>(
50  "output_dimension", output_dimension, "The dimension of the output file");
51 
52  params.addParamNamesToGroup("output_dimension", "Advanced");
53 
54  // Set the default padding to 3
55  params.set<unsigned int>("padding") = 3;
56 
57  // Add description for the Exodus class
58  params.addClassDescription("Object for output data in the Exodus II format");
59 
60  // Flag for overwriting at each timestep
61  params.addParam<bool>("overwrite",
62  false,
63  "When true the latest timestep will overwrite the "
64  "existing file, so only a single timestep exists.");
65 
66  // Set outputting of the input to be on by default
67  params.set<ExecFlagEnum>("execute_input_on") = EXEC_INITIAL;
68 
69  // Flag for outputting discontinuous data to Exodus
70  params.addParam<bool>(
71  "discontinuous", false, "Enables discontinuous output format for Exodus files.");
72 
73  // Flag for outputting added side elements (for side-discontinuous data) to Exodus
74  params.addParam<bool>(
75  "side_discontinuous", false, "Enables adding side-discontinuous output in Exodus files.");
76 
77  // Flag for outputting Exodus data in HDF5 format (when libMesh is
78  // configured with HDF5 support). libMesh wants to do so by default
79  // (for backwards compatibility with libMesh HDF5 users), but we
80  // want to avoid this by default (for backwards compatibility with
81  // most Moose users and to avoid generating regression test gold
82  // files that non-HDF5 Moose builds can't read)
83  params.addParam<bool>("write_hdf5", false, "Enables HDF5 output format for Exodus files.");
84 
85  // Need a layer of geometric ghosting for mesh serialization
86  params.addRelationshipManager("ElementPointNeighborLayers",
88 
89  // Return the InputParameters
90  return params;
91 }
92 
93 Exodus::Exodus(const InputParameters & parameters)
94  : OversampleOutput(parameters),
95  _exodus_initialized(false),
96  _exodus_mesh_changed(declareRestartableData<bool>("exodus_mesh_changed", true)),
97  _sequence(isParamValid("sequence") ? getParam<bool>("sequence")
98  : _use_displaced ? true
99  : false),
100  _exodus_num(declareRestartableData<unsigned int>("exodus_num", 0)),
101  _recovering(_app.isRecovering()),
102  _overwrite(getParam<bool>("overwrite")),
103  _output_dimension(getParam<MooseEnum>("output_dimension").getEnum<OutputDimension>()),
104  _discontinuous(getParam<bool>("discontinuous")),
105  _side_discontinuous(getParam<bool>("side_discontinuous")),
106  _write_hdf5(getParam<bool>("write_hdf5"))
107 {
108  if (isParamValid("use_problem_dimension"))
109  {
110  auto use_problem_dimension = getParam<bool>("use_problem_dimension");
111 
112  if (use_problem_dimension)
114  else
116  }
117  // If user sets 'discontinuous = true' and 'elemental_as_nodal = false', issue an error that these
118  // are incompatible states
119  if (_discontinuous && parameters.isParamSetByUser("elemental_as_nodal") && !_elemental_as_nodal)
120  mooseError(name(),
121  ": Invalid parameters. 'elemental_as_nodal' set to false while 'discontinuous' set "
122  "to true.");
123  // At this point, if we have discontinuous ouput, we know the user hasn't explicitly set
124  // 'elemental_as_nodal = false', so we can safely default it to true
125  if (_discontinuous)
126  _elemental_as_nodal = true;
127 }
128 
129 void
130 Exodus::setOutputDimension(unsigned int /*dim*/)
131 {
133  "This method is no longer needed. We can determine output dimension programmatically");
134 }
135 
136 void
138 {
139  // Call base class setup method
141 
142  // The libMesh::ExodusII_IO will fail when it is closed if the object is created but
143  // nothing is written to the file. This checks that at least something will be written.
144  if (!hasOutput())
145  mooseError("The current settings result in nothing being output to the Exodus file.");
146 
147  // Test that some sort of variable output exists (case when all variables are disabled but input
148  // output is still enabled
150  !hasScalarOutput())
151  mooseError("The current settings results in only the input file and no variables being output "
152  "to the Exodus file, this is not supported.");
153 
154  // Check if the mesh is contiguously numbered, because exodus output will renumber to force that
155  const auto & mesh = _problem_ptr->mesh().getMesh();
156  if ((mesh.n_nodes() != mesh.max_node_id()) || (mesh.n_elem() != mesh.max_elem_id()))
158  else
160 }
161 
162 void
164 {
165  // Maintain Oversample::meshChanged() functionality
167 
168  // Indicate to the Exodus object that the mesh has changed
169  _exodus_mesh_changed = true;
170 }
171 
172 void
173 Exodus::sequence(bool state)
174 {
175  _sequence = state;
176 }
177 
178 void
180 {
181  if (_exodus_io_ptr)
182  {
183  // Do nothing if the ExodusII_IO objects exists, but has not been initialized
184  if (!_exodus_initialized)
185  return;
186 
187  // Do nothing if the output is using oversampling. In this case the mesh that is being output
188  // has not been changed, so there is no need to create a new ExodusII_IO object
190  return;
191 
192  // Do nothing if the mesh has not changed and sequential output is not desired
194  return;
195  }
196 
197  auto serialize = [this](auto & moose_mesh)
198  {
199  auto & lm_mesh = moose_mesh.getMesh();
200  // Exodus is serial output so that we have to gather everything to "zero".
201  lm_mesh.gather_to_zero();
202  // This makes the face information out-of-date on process 0 for distributed meshes, e.g.
203  // elements will have neighbors that they didn't previously have
204  if ((this->processor_id() == 0) && !lm_mesh.is_replicated())
205  moose_mesh.markFiniteVolumeInfoDirty();
206  };
207  serialize(_problem_ptr->mesh());
208 
209  // We need to do the same thing for displaced mesh to make them consistent.
210  // In general, it is a good idea to make the reference mesh and the displaced mesh
211  // consistent since some operations or calculations are already based on this assumption.
212  // For example,
213  // FlagElementsThread::onElement(const Elem * elem)
214  // if (_displaced_problem)
215  // _displaced_problem->mesh().elemPtr(elem->id())->set_refinement_flag((Elem::RefinementState)marker_value);
216  // Here we assume that the displaced mesh and the reference mesh are identical except
217  // coordinations.
219  serialize(_problem_ptr->getDisplacedProblem()->mesh());
220 
221  // Create the ExodusII_IO object
222  _exodus_io_ptr = std::make_unique<ExodusII_IO>(_es_ptr->get_mesh());
223  _exodus_initialized = false;
224 
225  if (_write_hdf5)
226  {
227 #ifndef LIBMESH_HAVE_HDF5
228  mooseError("Moose input requested HDF Exodus output, but libMesh was built without HDF5.");
229 #endif
230 
231  // This is redundant unless the libMesh default changes
232  _exodus_io_ptr->set_hdf5_writing(true);
233  }
234  else
235  {
236  _exodus_io_ptr->set_hdf5_writing(false);
237  }
238 
240  _exodus_io_ptr->write_added_sides(true);
241 
242  // Increment file number and set appending status, append if all the following conditions are met:
243  // (1) If the application is recovering (not restarting)
244  // (2) The mesh has NOT changed
245  // (3) An existing Exodus file exists for appending (_exodus_num > 0)
246  // (4) Sequential output is NOT desired
248  {
249  // Set the recovering flag to false so that this special case is not triggered again
250  _recovering = false;
251 
252  // Set the append flag to true b/c on recover the file is being appended
253  _exodus_io_ptr->append(true);
254  }
255  else
256  {
257  // Disable file appending and reset exodus file number count
258  _exodus_io_ptr->append(false);
259 
260  // Customize file output
262  }
263 
265 }
266 
267 void
269 {
271  _file_num++;
272 
273  _exodus_num = 1;
274 }
275 
276 void
278  const MooseMesh & mesh,
279  OutputDimension output_dimension)
280 {
281  switch (output_dimension)
282  {
284  // If the mesh_dimension is 1, we need to write out as 3D.
285  //
286  // This works around an issue in Paraview where 1D meshes cannot
287  // not be visualized correctly. Otherwise, write out based on the effectiveSpatialDimension.
288  if (mesh.getMesh().mesh_dimension() == 1)
289  exodus_io.write_as_dimension(3);
290  else
291  exodus_io.write_as_dimension(static_cast<int>(mesh.effectiveSpatialDimension()));
292  break;
293 
297  exodus_io.write_as_dimension(static_cast<int>(output_dimension));
298  break;
299 
301  exodus_io.use_mesh_dimension_instead_of_spatial_dimension(true);
302  break;
303 
304  default:
305  ::mooseError("Unknown output_dimension in Exodus writer");
306  }
307 }
308 
309 void
311 {
312  // Set the output variable to the nodal variables
313  std::vector<std::string> nodal(getNodalVariableOutput().begin(), getNodalVariableOutput().end());
314  _exodus_io_ptr->set_output_variables(nodal);
315 
316  // Write the data via libMesh::ExodusII_IO
317  if (_discontinuous)
318  _exodus_io_ptr->write_timestep_discontinuous(
320  else
321  _exodus_io_ptr->write_timestep(
323 
324  if (!_overwrite)
325  _exodus_num++;
326 
327  // This satisfies the initialization of the ExodusII_IO object
329  _exodus_initialized = true;
330 }
331 
332 void
334 {
335  // Make sure the the file is ready for writing of elemental data
338 
339  // Write the elemental data
340  std::vector<std::string> elemental(getElementalVariableOutput().begin(),
342  _exodus_io_ptr->set_output_variables(elemental);
343  _exodus_io_ptr->write_element_data(*_es_ptr);
344 }
345 
346 void
348 {
349  // List of desired postprocessor outputs
350  const std::set<std::string> & pps = getPostprocessorOutput();
351 
352  // Append the postprocessor data to the global name value parameters; scalar outputs
353  // also append these member variables
354  for (const auto & name : pps)
355  {
356  _global_names.push_back(name);
358  }
359 }
360 
361 void
363 {
364  for (const auto & combined_name : getReporterOutput())
365  {
366  ReporterName r_name(combined_name);
367  if (_reporter_data.hasReporterValue<Real>(r_name) &&
369  {
370  const Real & value = _reporter_data.getReporterValue<Real>(r_name);
371  _global_names.push_back(r_name.getValueName());
372  _global_values.push_back(value);
373  }
374  }
375 }
376 
377 void
379 {
380  // List of desired scalar outputs
381  const std::set<std::string> & out = getScalarOutput();
382 
383  // Append the scalar to the global output lists
384  for (const auto & out_name : out)
385  {
386  // Make sure scalar values are in sync with the solution vector
387  // and are visible on this processor. See TableOutput.C for
388  // TableOutput::outputScalarVariables() explanatory comments
389 
390  MooseVariableScalar & scalar_var = _problem_ptr->getScalarVariable(0, out_name);
391  scalar_var.reinit();
392  VariableValue value(scalar_var.sln());
393 
394  const std::vector<dof_id_type> & dof_indices = scalar_var.dofIndices();
395  const unsigned int n = dof_indices.size();
396  value.resize(n);
397 
398  const DofMap & dof_map = scalar_var.sys().dofMap();
399  for (unsigned int i = 0; i != n; ++i)
400  {
401  const processor_id_type pid = dof_map.dof_owner(dof_indices[i]);
402  this->comm().broadcast(value[i], pid);
403  }
404 
405  // If the scalar has a single component, output the name directly
406  if (n == 1)
407  {
408  _global_names.push_back(out_name);
409  _global_values.push_back(value[0]);
410  }
411 
412  // If the scalar as many components add indices to the end of the name
413  else
414  {
415  for (unsigned int i = 0; i < n; ++i)
416  {
417  std::ostringstream os;
418  os << out_name << "_" << i;
419  _global_names.push_back(os.str());
420  _global_values.push_back(value[i]);
421  }
422  }
423  }
424 }
425 
426 void
428 {
429  // Format the input file
430  ExodusFormatter syntax_formatter;
431  syntax_formatter.printInputFile(_app.actionWarehouse());
432  syntax_formatter.format();
433 
434  // Store the information
435  _input_record = syntax_formatter.getInputFileRecord();
436 }
437 
438 void
440 {
441  // Prepare the ExodusII_IO object
442  outputSetup();
443  LockFile lf(filename(), processor_id() == 0);
444 
445  // Adjust the position of the output
446  if (_app.hasOutputPosition())
447  _exodus_io_ptr->set_coordinate_offset(_app.getOutputPosition());
448 
449  // Clear the global variables (postprocessors and scalars)
450  _global_names.clear();
451  _global_values.clear();
452 
453  // Call the individual output methods
455 
456  // Write the global variables (populated by the output methods)
457  if (!_global_values.empty())
458  {
459  if (!_exodus_initialized)
461  _exodus_io_ptr->write_global_data(_global_values, _global_names);
462  }
463 
464  // Write the input file record if it exists and the output file is initialized
465  if (!_input_record.empty() && _exodus_initialized)
466  {
467  _exodus_io_ptr->write_information_records(_input_record);
468  _input_record.clear();
469  }
470 
471  // Reset the mesh changed flag
472  _exodus_mesh_changed = false;
473 
474  // It is possible to have an empty file created with the following scenario. By default the
475  // 'execute_on_input' flag is setup to run on INITIAL. If the 'execute_on' is set to FINAL
476  // but the simulation stops early (e.g., --test-checkpoint-half-transient) the Exodus file is
477  // created but there is no data in it, because of the initial call to write the input data seems
478  // to create the file but doesn't actually write the data into the solution/mesh is also supplied
479  // to the IO object. Then if --recover is used this empty file fails to open for appending.
480  //
481  // The code below will delete any empty files that exist. Another solution is to set the
482  // 'execute_on_input' flag to NONE.
483  std::string current = filename();
484  if (processor_id() == 0 && MooseUtils::checkFileReadable(current, false, false) &&
485  (MooseUtils::fileSize(current) == 0))
486  {
487  int err = std::remove(current.c_str());
488  if (err != 0)
489  mooseError("MOOSE failed to remove the empty file ", current);
490  }
491 }
492 
493 std::string
495 {
496  // Append the .e extension on the base file name
497  std::ostringstream output;
498  output << _file_base + ".e";
499 
500  // Add the -s00x extension to the file
501  if (_file_num > 1)
502  output << "-s" << std::setw(_padding) << std::setprecision(0) << std::setfill('0') << std::right
503  << _file_num;
504 
505  return output.str();
506 }
507 
508 void
510 {
511  // Write a timestep with no variables
512  _exodus_io_ptr->set_output_variables(std::vector<std::string>());
513  _exodus_io_ptr->write_timestep(
515 
516  if (!_overwrite)
517  _exodus_num++;
518 
520  _exodus_initialized = true;
521 }
522 
523 void
525 {
526  _exodus_io_ptr.reset();
527 }
528 
529 void
531 {
532  // We know exodus_io renumbered on the first write_timestep()
534  {
535  // Objects that depend on element/node ids are no longer valid
538  }
539 }
virtual void meshChanged() override
Called on this object when the mesh changes.
OStreamProxy err
Based class for providing re-positioning and oversampling support to output objects.
const std::set< std::string > & getPostprocessorOutput()
The list of postprocessor names that are set for output.
virtual void outputReporters() override
Writes the Reporter values to the ExodusII output.
Definition: Exodus.C:362
bool hasPostprocessorOutput()
Returns true if there exists postprocessors for output.
virtual bool hasOutput()
Returns true if any of the other has methods return true.
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
std::vector< std::string > _input_record
Storage for input file record; this is written to the file only after it has been initialized...
Definition: Exodus.h:192
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
void mooseDeprecated(Args &&... args) const
virtual void sequence(bool state)
Set the sequence state When the sequence state is set to true then the outputSetup() method is called...
Definition: Exodus.C:173
bool hasOutputPosition() const
Whether or not an output position has been set.
Definition: MooseApp.h:271
void reinit(bool reinit_for_derivative_reordering=false)
Fill out the VariableValue arrays from the system solution vector.
virtual void meshChanged() override
Set flag indicating that the mesh has changed.
Definition: Exodus.C:163
virtual void output() override
Overload the OutputBase::output method, this is required for ExodusII output due to the method utiliz...
Definition: Exodus.C:439
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
MeshBase & mesh
bool _write_hdf5
Flag to output HDF5 format (when available) in Exodus.
Definition: Exodus.h:207
bool _elemental_as_nodal
Flags to control nodal output.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Parallel::Communicator & comm() const
virtual std::string filename() override
Returns the current filename, this method handles the -s000 suffix common to ExodusII files...
Definition: Exodus.C:494
std::string _file_base
The base filename from the input paramaters.
Definition: FileOutput.h:89
bool _overwrite
Flag for overwriting timesteps.
Definition: Exodus.h:195
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
Definition: InfixIterator.h:33
void clear()
Reset Exodus output.
Definition: Exodus.C:524
bool _side_discontinuous
Flag to output added disjoint fictitious sides for side_discontinuous variables.
Definition: Exodus.h:204
void addRelationshipManager(const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
Tells MOOSE about a RelationshipManager that this object needs.
virtual void outputNodalVariables() override
Outputs nodal, nonlinear variables.
Definition: Exodus.C:310
OutputDimension
Definition: Exodus.h:29
OutputDimension _output_dimension
Enum for the output dimension.
Definition: Exodus.h:198
bool _discontinuous
Flag to output discontinuous format in Exodus.
Definition: Exodus.h:201
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:56
bool _exodus_initialized
Flag for indicating the status of the ExodusII file that is being written.
Definition: Exodus.h:165
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
static InputParameters validParams()
Definition: Exodus.C:27
unsigned int _padding
Number of digits to pad the extensions.
Definition: FileOutput.h:83
const std::set< std::string > & getReporterOutput()
The list of Reporter names that are set for output.
uint8_t processor_id_type
virtual DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1131
bool _mesh_contiguous_numbering
whether the mesh is contiguously numbered (exodus output will force that)
Definition: Exodus.h:210
void setOutputDimension(unsigned int dim)
Force the output dimension programatically.
Definition: Exodus.C:130
bool hasNodalVariableOutput()
Returns true if there exists nodal nonlinear variables for output.
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.
Definition: MooseMesh.C:3198
EquationSystems * _es_ptr
Reference the the libMesh::EquationSystems object that contains the data.
Definition: Output.h:188
const T & getReporterValue(const ReporterName &reporter_name, const MooseObject &consumer, const ReporterMode &mode, const std::size_t time_index=0) const
Method for returning read only references to Reporter values.
Definition: ReporterData.h:379
bool _oversample
Flag indicating that oversampling is enabled.
bool hasPostprocessorByName(const PostprocessorName &name) const
Determine if the Postprocessor data exists.
bool _recovering
Flag indicating MOOSE is recovering via –recover command-line option.
Definition: Exodus.h:189
virtual void initialSetup() override
Call init() method on setup.
bool & _exodus_mesh_changed
A flag indicating to the Exodus object that the mesh has changed.
Definition: Exodus.h:168
Class for output data to the ExodusII format.
Definition: Exodus.h:24
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:253
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:179
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
virtual void meshChanged() override
Update data after a mesh change.
std::vector< std::string > & getInputFileRecord()
virtual const std::vector< dof_id_type > & dofIndices() const
Get local DoF indices.
std::vector< std::string > _global_names
Storage for names of the above scalar values.
Definition: Exodus.h:151
std::size_t fileSize(const std::string &filename)
Check the file size.
Definition: MooseUtils.C:1187
Exodus(const InputParameters &parameters)
Class constructor.
Definition: Exodus.C:93
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
bool hasScalarOutput()
Returns true if there exists scalar variables for output.
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
Definition: MooseApp.h:206
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:69
std::vector< Real > _global_values
Storage for scalar values (postprocessors and scalar AuxVariables)
Definition: Exodus.h:148
const std::string & getObjectName() const
Return the object name that produces the Reporter value.
Definition: ReporterName.C:34
unsigned int & _exodus_num
Count of outputs per exodus file.
Definition: Exodus.h:174
static InputParameters enableOutputTypes(const std::string &names=std::string())
A method for enabling individual output type control.
bool hasElementalVariableOutput()
Returns true if there exists elemental nonlinear variables for output.
bool _sequence
Sequence flag, if true each timestep is written to a new file.
Definition: Exodus.h:171
static void setOutputDimensionInExodusWriter(ExodusII_IO &exodus_io, const MooseMesh &mesh, OutputDimension output_dim=OutputDimension::DEFAULT)
Helper method to change the output dimension in the passed in Exodus writer depending on the dimensio...
Definition: Exodus.C:277
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
Point getOutputPosition() const
Get the output position.
Definition: MooseApp.h:277
const ReporterData & _reporter_data
Storage for Reporter values.
virtual void outputElementalVariables() override
Outputs elemental, nonlinear variables.
Definition: Exodus.C:333
OutputTools< Real >::VariableValue VariableValue
Definition: MooseTypes.h:302
void outputEmptyTimestep()
A helper function for &#39;initializing&#39; the ExodusII output file, see the comments for the _initialized ...
Definition: Exodus.C:509
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
virtual void outputSetup()
Performs the necessary deletion and re-creating of ExodusII_IO object.
Definition: Exodus.C:179
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
OStreamProxy out
virtual void outputInput() override
Writes the input file to the ExodusII output.
Definition: Exodus.C:427
Class for scalar variables (they are different).
virtual MooseMesh & mesh() override
MooseMesh * _mesh_ptr
A convenience pointer to the current mesh (reference or displaced depending on "use_displaced") ...
Definition: Output.h:191
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const std::set< std::string > & getElementalVariableOutput()
The list of elemental nonlinear variables names that are set for output.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
const InputParameters & parameters() const
Get the parameters of the object.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
virtual void outputScalarVariables() override
Writes scalar AuxVariables to global output parameters.
Definition: Exodus.C:378
bool hasReporterValue(const ReporterName &reporter_name) const
Return True if a Reporter value with the given type and name have been created.
Definition: ReporterData.h:436
unsigned int & _file_num
A file number counter, initialized to 0 (this must be controlled by the child class, see Exodus)
Definition: FileOutput.h:80
const std::set< std::string > & getNodalVariableOutput()
The list of nodal nonlinear variables names that are set for output.
Gets an exclusive lock on a file.
Definition: LockFile.h:22
virtual void customizeFileOutput()
Customizes file output settings.
Definition: Exodus.C:268
const std::string & getValueName() const
Return the data name for the Reporter value.
Definition: ReporterName.C:40
void printInputFile(ActionWarehouse &wh)
processor_id_type processor_id() const
SystemBase & sys()
Get the system this variable is part of.
std::unique_ptr< ExodusII_IO > _exodus_io_ptr
Pointer to the libMesh::ExodusII_IO object that performs the actual data output.
Definition: Exodus.h:145
Real getGlobalTimeOffset() const
Each App has it&#39;s own local time.
Definition: MooseApp.h:307
bool _change_position
Flag for re-positioning.
static InputParameters validParams()
const VariableValue & sln() const
virtual void outputPostprocessors() override
Writes postprocessor values to global output parameters.
Definition: Exodus.C:347
virtual Real getOutputTime()
Get the time that will be used for stream/file outputting.
Definition: PetscOutput.C:265
void ErrorVector unsigned int
The Reporter system is comprised of objects that can contain any number of data values.
Definition: ReporterName.h:30
registerMooseObject("MooseApp", Exodus)
void handleExodusIOMeshRenumbering()
Handle the call to mesh renumbering in libmesh&#39;s ExodusIO on non-contiguously numbered meshes...
Definition: Exodus.C:530
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
virtual void initialSetup() override
Performs basic error checking and initial setup of ExodusII_IO output object.
Definition: Exodus.C:137
const ExecFlagType EXEC_INITIAL
Definition: Moose.C:28