www.mooseframework.org
Output.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef OUTPUT_H
16 #define OUTPUT_H
17 
18 // MOOSE includes
19 #include "MooseObject.h"
20 #include "Restartable.h"
21 #include "MeshChangedInterface.h"
22 #include "SetupInterface.h"
23 #include "AdvancedOutputUtils.h"
24 
25 // Forward declarations
26 class Output;
27 
28 // libMesh forward declarations
29 namespace libMesh
30 {
31 class EquationSystems;
32 }
33 
34 template <>
36 
45 class Output : public MooseObject,
46  public Restartable,
47  public MeshChangedInterface,
48  public SetupInterface
49 {
50 public:
59  Output(const InputParameters & parameters);
60 
68  virtual Real time();
69 
76  virtual Real timeOld();
77 
81  virtual Real dt();
82 
86  virtual Real dtOld();
87 
91  virtual int timeStep();
92 
96  const unsigned int & interval() const;
97 
101  const MultiMooseEnum & executeOn() const;
102 
106  bool isAdvanced();
107 
113  virtual const OutputOnWarehouse & advancedExecuteOn() const;
114 
119  static MultiMooseEnum getExecuteOptions(std::string default_type = "");
120 
125  void allowOutput(bool state) { _allow_output = state; }
126 
130  static void addDeprecatedInputParameters(InputParameters & params);
131 
138  virtual void outputStep(const ExecFlagType & type);
139 
140 protected:
144  virtual void output(const ExecFlagType & type) = 0;
145 
150  virtual void solveSetup();
151 
156  virtual bool shouldOutput(const ExecFlagType & type);
157 
162  virtual bool onInterval();
163 
168  virtual void initialSetup();
169 
172 
175 
178 
180  EquationSystems * _es_ptr;
181 
183  bool _sequence;
184 
187 
189  Real & _time;
190 
192  Real & _time_old;
193 
195  int & _t_step;
196 
198  Real & _dt;
199 
201  Real & _dt_old;
202 
204  unsigned int _num;
205 
207  const unsigned int _interval;
208 
210  std::set<Real> _sync_times;
211 
214 
216  Real _end_time;
217 
219  Real _t_tol;
220 
223 
226 
229 
232 
234  // This is here rather than in AdvancedOutput to allow generic
235  // access to this data from the Console object for displaying
236  // the output settings.
238 
239  friend class OutputWarehouse;
240 };
241 
242 #endif /* OUTPUT_H */
bool _sequence
Flag for forcing call to outputSetup() with every call to output() (restartable)
Definition: Output.h:183
Real & _time_old
The old time.
Definition: Output.h:192
A class for creating restricted objects.
Definition: Restartable.h:31
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:237
MultiMooseEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:186
Real & _dt_old
Old time step delta.
Definition: Output.h:201
Real _start_time
Start outputting time.
Definition: Output.h:213
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
unsigned int _num
The number of outputs written.
Definition: Output.h:204
int & _t_step
The current time step.
Definition: Output.h:195
bool _transient
Transient flag (true = transient)
Definition: Output.h:174
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Based class for output objects.
Definition: Output.h:45
bool _initialized
True if init() has been called.
Definition: Output.h:225
const unsigned int _interval
The output time step interval.
Definition: Output.h:207
Interface for notifications that the mesh has changed.
EquationSystems * _es_ptr
Reference the the libMesh::EquationSystems object that contains the data.
Definition: Output.h:180
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:171
bool _allow_output
Flag for disabling output.
Definition: Output.h:228
A helper warehouse class for storing the "execute_on" settings for the various output types...
void allowOutput(bool state)
Method for controlling the allow output state.
Definition: Output.h:125
bool _sync_only
Flag for only executing at sync times.
Definition: Output.h:222
InputParameters validParams< Output >()
Definition: Output.C:34
Class for storing and utilizing output objects.
bool _use_displaced
Flag for using displaced mesh.
Definition: Output.h:177
bool _is_advanced
Flag for advanced output testing.
Definition: Output.h:231
std::set< Real > _sync_times
Sync times for this outputter.
Definition: Output.h:210
MatType type
Real _t_tol
Time checking tolerance.
Definition: Output.h:219
Real _end_time
End outputting time.
Definition: Output.h:216
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Real & _time
The current time for output purposes.
Definition: Output.h:189
Real & _dt
Time step delta.
Definition: Output.h:198