www.mooseframework.org
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AB2PredictorCorrector Class Reference

A TimeStepper based on the AB2 method. More...

#include <AB2PredictorCorrector.h>

Inheritance diagram for AB2PredictorCorrector:
[legend]

Public Member Functions

 AB2PredictorCorrector (const InputParameters &parameters)
 
virtual void step () override
 Take a time step. More...
 
virtual void preExecute () override
 
virtual void preSolve () override
 
virtual bool converged () override
 If the time step converged. More...
 
virtual void init ()
 Initialize the time stepper. More...
 
virtual void postSolve ()
 
virtual void postExecute ()
 
virtual void preStep ()
 
virtual void postStep ()
 
void computeStep ()
 Called before a new step is started. More...
 
virtual bool constrainStep (Real &dt)
 Called after computeStep() is called. More...
 
virtual void acceptStep ()
 This gets called when time step is accepted. More...
 
virtual void rejectStep ()
 This gets called when time step is rejected. More...
 
Real getCurrentDT ()
 Get the current_dt. More...
 
virtual void forceTimeStep (Real dt)
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp ()
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled ()
 Return the enabled status of the object. More...
 
template<typename... Args>
void mooseError (Args &&...args) const
 
template<typename... Args>
void mooseWarning (Args &&...args) const
 
template<typename... Args>
void mooseDeprecated (Args &&...args) const
 
template<typename... Args>
void mooseInfo (Args &&...args) const
 
void addSyncTime (Real sync_time)
 Add a sync time. More...
 
void addSyncTime (const std::set< Real > &times)
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

virtual Real computeDT () override
 Called to compute _current_dt for a normal step. More...
 
virtual Real computeInitialDT () override
 Called to compute _current_dt for the first timestep. More...
 
virtual Real estimateTimeError (NumericVector< Number > &sol)
 
virtual Real computeFailedDT ()
 Called to compute _current_dt after a solve has failed. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 

Protected Attributes

NumericVector< Number > & _u1
 
NumericVector< Number > & _aux1
 
NumericVector< Number > & _pred1
 
Real & _dt_full
 dt of the big step More...
 
Real & _error
 global relative time discretization error estimate More...
 
Real _e_tol
 error tolerance More...
 
Real _e_max
 maximal error More...
 
Real _max_increase
 maximum increase ratio More...
 
int _steps_between_increase
 steps to take before increasing dt More...
 
int & _dt_steps_taken
 steps taken at current dt More...
 
int _start_adapting
 
Real & _my_dt_old
 
Real & _infnorm
 infinity norm of the solution vector More...
 
Real _scaling_parameter
 scaling_parameter for time step selection, default is 0.8 More...
 
std::ofstream myfile
 
FEProblemBase_fe_problem
 
Transient_executioner
 Reference to transient executioner. More...
 
Real & _time
 Values from executioner. More...
 
Real & _time_old
 
int & _t_step
 
Real & _dt
 
Real & _dt_min
 
Real & _dt_max
 
Real & _end_time
 
std::set< Real > & _sync_times
 
Real & _timestep_tolerance
 
bool & _verbose
 should detailed diagnostic output be printed More...
 
bool _converged
 Whether or not the previous solve converged. More...
 
bool _reset_dt
 If true then the next dt will be computed by computeInitialDT() More...
 
bool _has_reset_dt
 True if dt has been reset. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 

Detailed Description

A TimeStepper based on the AB2 method.

Increases the timestep if the difference between the actual and AB2-predicted solutions is small enough.

Definition at line 41 of file AB2PredictorCorrector.h.

Constructor & Destructor Documentation

AB2PredictorCorrector::AB2PredictorCorrector ( const InputParameters parameters)

Definition at line 49 of file AB2PredictorCorrector.C.

50  : TimeStepper(parameters),
51  _u1(_fe_problem.getNonlinearSystemBase().addVector("u1", true, GHOSTED)),
52  _aux1(_fe_problem.getAuxiliarySystem().addVector("aux1", true, GHOSTED)),
53  _pred1(_fe_problem.getNonlinearSystemBase().addVector("pred1", true, GHOSTED)),
54  _dt_full(declareRestartableData<Real>("dt_full", 0)),
55  _error(declareRestartableData<Real>("error", 0)),
56  _e_tol(getParam<Real>("e_tol")),
57  _e_max(getParam<Real>("e_max")),
58  _max_increase(getParam<Real>("max_increase")),
59  _steps_between_increase(getParam<int>("steps_between_increase")),
60  _dt_steps_taken(declareRestartableData<int>("dt_steps_taken", 0)),
61  _start_adapting(getParam<int>("start_adapting")),
62  _my_dt_old(declareRestartableData<Real>("my_dt_old", 0)),
63  _infnorm(declareRestartableData<Real>("infnorm", 0)),
64  _scaling_parameter(getParam<Real>("scaling_parameter"))
65 {
66  Real predscale = 1.;
67  InputParameters params = _app.getFactory().getValidParams("AdamsPredictor");
68  params.set<Real>("scale") = predscale;
69  _fe_problem.addPredictor("AdamsPredictor", "adamspredictor", params);
70 }
Real & _error
global relative time discretization error estimate
virtual void addPredictor(const std::string &type, const std::string &name, InputParameters parameters)
int _steps_between_increase
steps to take before increasing dt
NonlinearSystemBase & getNonlinearSystemBase()
virtual NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const ParallelType type)
Adds a solution length vector to the system.
Definition: SystemBase.C:490
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:26
Real _e_tol
error tolerance
NumericVector< Number > & _aux1
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
NumericVector< Number > & _pred1
Real & _dt_full
dt of the big step
Factory & getFactory()
Retrieve the Factory associated with this App.
Definition: MooseApp.h:253
FEProblemBase & _fe_problem
Definition: TimeStepper.h:124
NumericVector< Number > & addVector(const std::string &vector_name, const bool project, const ParallelType type) override
Adds a solution length vector to the system.
TimeStepper(const InputParameters &parameters)
Definition: TimeStepper.C:33
Real _e_max
maximal error
Real _max_increase
maximum increase ratio
Real _scaling_parameter
scaling_parameter for time step selection, default is 0.8
AuxiliarySystem & getAuxiliarySystem()
NumericVector< Number > & _u1
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
Real & _infnorm
infinity norm of the solution vector
int & _dt_steps_taken
steps taken at current dt

Member Function Documentation

void TimeStepper::acceptStep ( )
virtualinherited

This gets called when time step is accepted.

Reimplemented in IterationAdaptiveDT.

Definition at line 165 of file TimeStepper.C.

Referenced by IterationAdaptiveDT::acceptStep(), and TimeStepper::postStep().

166 {
167  // If there are sync times at or before the current time, delete them
168  while (!_sync_times.empty() && _time + _timestep_tolerance >= *_sync_times.begin())
169  {
170  _sync_times.erase(_sync_times.begin());
171  }
172 }
Real & _timestep_tolerance
Definition: TimeStepper.h:138
std::set< Real > & _sync_times
Definition: TimeStepper.h:136
Real & _time
Values from executioner.
Definition: TimeStepper.h:129
void TimeStepper::addSyncTime ( Real  sync_time)
inherited

Add a sync time.

Referenced by TimeStepper::getCurrentDT().

void TimeStepper::addSyncTime ( const std::set< Real > &  times)
inherited
Real AB2PredictorCorrector::computeDT ( )
overrideprotectedvirtual

Called to compute _current_dt for a normal step.

Note that this does not return. The TimeStepper's job here is to fill in _current_dt.

Implements TimeStepper.

Definition at line 138 of file AB2PredictorCorrector.C.

139 {
140  if (_t_step <= _start_adapting)
141  return _dt;
142 
143  _my_dt_old = _dt;
144 
145  _dt_steps_taken += 1;
147  {
148 
149  Real new_dt = _dt_full * _scaling_parameter * std::pow(_infnorm * _e_tol / _error, 1.0 / 3.0);
150 
151  if (new_dt / _dt_full > _max_increase)
152  new_dt = _dt_full * _max_increase;
153  _dt_steps_taken = 0;
154  return new_dt;
155  }
156 
157  return _dt;
158 }
Real & _error
global relative time discretization error estimate
int _steps_between_increase
steps to take before increasing dt
Real _e_tol
error tolerance
Real & _dt_full
dt of the big step
Real _max_increase
maximum increase ratio
Real _scaling_parameter
scaling_parameter for time step selection, default is 0.8
Real & _infnorm
infinity norm of the solution vector
int & _t_step
Definition: TimeStepper.h:131
int & _dt_steps_taken
steps taken at current dt
Real & _dt
Definition: TimeStepper.h:132
Real TimeStepper::computeFailedDT ( )
protectedvirtualinherited

Called to compute _current_dt after a solve has failed.

Note that this does not return. The TimeStepper's job here is to fill in _current_dt.

Reimplemented in IterationAdaptiveDT, and TimeSequenceStepperBase.

Definition at line 188 of file TimeStepper.C.

Referenced by TimeStepper::computeStep(), and TimeStepper::getCurrentDT().

189 {
190  if (_dt <= _dt_min)
191  mooseError("Solve failed and timestep already at or below dtmin, cannot continue!");
192 
193  // cut the time step in a half
194  if (0.5 * _dt >= _dt_min)
195  return 0.5 * _dt;
196  else // (0.5 * _current_dt < _dt_min)
197  return _dt_min;
198 }
Real & _dt_min
Definition: TimeStepper.h:133
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Real & _dt
Definition: TimeStepper.h:132
Real AB2PredictorCorrector::computeInitialDT ( )
overrideprotectedvirtual

Called to compute _current_dt for the first timestep.

Note that this does not return. The TimeStepper's job here is to fill in _current_dt.

Implements TimeStepper.

Definition at line 161 of file AB2PredictorCorrector.C.

162 {
163  return getParam<Real>("dt");
164 }
void TimeStepper::computeStep ( )
inherited

Called before a new step is started.

This is when the actual computation of the current DT will be done. Because of that this MUST be called only once per step!

After calling this function use getCurrentDT() to get the DT that was computed.

Definition at line 73 of file TimeStepper.C.

Referenced by TimeStepper::postStep().

74 {
75  if (_t_step < 2 || (_reset_dt && !_has_reset_dt))
76  {
77  _has_reset_dt = true;
78 
79  if (converged())
81  else
83  }
84  else
85  {
86  if (converged())
88  else
90  }
91 }
virtual Real computeInitialDT()=0
Called to compute _current_dt for the first timestep.
virtual Real computeFailedDT()
Called to compute _current_dt after a solve has failed.
Definition: TimeStepper.C:188
Real & _current_dt
Size of the current time step as computed by the Stepper. Note that the actual dt that was taken migh...
Definition: TimeStepper.h:154
virtual Real computeDT()=0
Called to compute _current_dt for a normal step.
bool _has_reset_dt
True if dt has been reset.
Definition: TimeStepper.h:150
virtual bool converged()
If the time step converged.
Definition: TimeStepper.C:182
int & _t_step
Definition: TimeStepper.h:131
bool _reset_dt
If true then the next dt will be computed by computeInitialDT()
Definition: TimeStepper.h:147
bool TimeStepper::constrainStep ( Real &  dt)
virtualinherited

Called after computeStep() is called.

Returns
true if any type of sync point was hit, false otherwise

Reimplemented in IterationAdaptiveDT.

Definition at line 94 of file TimeStepper.C.

Referenced by IterationAdaptiveDT::constrainStep(), and TimeStepper::postStep().

95 {
96  bool at_sync_point = false;
97 
98  std::ostringstream diag;
99 
100  // Don't let the time step size exceed maximum time step size
101  if (dt > _dt_max)
102  {
103  dt = _dt_max;
104  diag << "Limiting dt to dtmax: " << std::setw(9) << std::setprecision(6) << std::setfill('0')
105  << std::showpoint << std::left << _dt_max << std::endl;
106  }
107 
108  // Don't allow time step size to be smaller than minimum time step size
109  if (dt < _dt_min)
110  {
111  dt = _dt_min;
112  diag << "Increasing dt to dtmin: " << std::setw(9) << std::setprecision(6) << std::setfill('0')
113  << std::showpoint << std::left << _dt_min << std::endl;
114  }
115 
116  // Don't let time go beyond simulation end time (unless we're doing a half transient)
117  if (_time + dt > _end_time && !_app.halfTransient())
118  {
119  dt = _end_time - _time;
120  diag << "Limiting dt for end_time: " << std::setw(9) << std::setprecision(6)
121  << std::setfill('0') << std::showpoint << std::left << _end_time << " dt: " << std::setw(9)
122  << std::setprecision(6) << std::setfill('0') << std::showpoint << std::left << dt
123  << std::endl;
124  }
125 
126  // Adjust to a sync time if supplied
127  if (!_sync_times.empty() && _time + dt + _timestep_tolerance >= (*_sync_times.begin()))
128  {
129  dt = *_sync_times.begin() - _time;
130  diag << "Limiting dt for sync_time: " << std::setw(9) << std::setprecision(6)
131  << std::setfill('0') << std::showpoint << std::left << *_sync_times.begin()
132  << " dt: " << std::setw(9) << std::setprecision(6) << std::setfill('0') << std::showpoint
133  << std::left << dt << std::endl;
134 
135  if (dt <= 0.0)
136  {
137  _console << diag.str();
138  mooseError("Adjusting to sync_time resulted in a non-positive time step. dt: ",
139  dt,
140  " sync_time: ",
141  *_sync_times.begin(),
142  " time: ",
143  _time);
144  }
145 
146  at_sync_point = true;
147  }
148 
149  if (_verbose)
150  {
151  _console << diag.str();
152  }
153 
154  return at_sync_point;
155 }
Real & _timestep_tolerance
Definition: TimeStepper.h:138
bool halfTransient()
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:339
std::set< Real > & _sync_times
Definition: TimeStepper.h:136
Real & _end_time
Definition: TimeStepper.h:135
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
Real & _dt_min
Definition: TimeStepper.h:133
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Real & _dt_max
Definition: TimeStepper.h:134
bool & _verbose
should detailed diagnostic output be printed
Definition: TimeStepper.h:141
Real & _time
Values from executioner.
Definition: TimeStepper.h:129
bool AB2PredictorCorrector::converged ( )
overridevirtual

If the time step converged.

Returns
true if converged, otherwise false

Reimplemented from TimeStepper.

Definition at line 118 of file AB2PredictorCorrector.C.

119 {
120  if (!_converged)
121  {
122  _dt_steps_taken = 0;
123  return false;
124  }
125  if (_error < _e_max)
126  {
127  return true;
128  }
129  else
130  {
131  _console << "Marking last solve not converged " << _error << " " << _e_max << std::endl;
132  _dt_steps_taken = 0;
133  return false;
134  }
135 }
Real & _error
global relative time discretization error estimate
Real _e_max
maximal error
bool _converged
Whether or not the previous solve converged.
Definition: TimeStepper.h:144
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
int & _dt_steps_taken
steps taken at current dt
template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 224 of file Restartable.h.

225 {
226  return declareRestartableDataWithContext<T>(data_name, NULL);
227 }
template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data

Definition at line 231 of file Restartable.h.

232 {
233  return declareRestartableDataWithContext<T>(data_name, init_value, NULL);
234 }
template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions

Definition at line 238 of file Restartable.h.

239 {
241  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
242 
243  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
244  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
245 
247 
248  return data_ptr->get();
249 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
const T &  init_value,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data
contextContext pointer that will be passed to the load and store functions

Definition at line 253 of file Restartable.h.

256 {
258  mooseError("No valid SubProblem found for ", _restartable_system_name, "/", _restartable_name);
259 
260  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
261  RestartableData<T> * data_ptr = new RestartableData<T>(full_name, context);
262 
263  data_ptr->set() = init_value;
264 
266 
267  return data_ptr->get();
268 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Concrete definition of a parameter value for a specified type.
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
virtual bool MooseObject::enabled ( )
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 77 of file MooseObject.h.

Referenced by EigenKernel::enabled().

77 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:117
Real AB2PredictorCorrector::estimateTimeError ( NumericVector< Number > &  sol)
protectedvirtual

Definition at line 167 of file AB2PredictorCorrector.C.

Referenced by step().

168 {
171  auto scheme = Moose::stringToEnum<Moose::TimeIntegratorType>(ti->name());
172  Real dt_old = _my_dt_old;
173  if (dt_old == 0)
174  dt_old = _dt;
175 
176  switch (scheme)
177  {
179  {
180  _pred1 *= -1;
181  _pred1 += solution;
182  Real calc = _dt * _dt * .5;
183  _pred1 *= calc;
184  return _pred1.l2_norm();
185  }
187  {
188  _pred1 -= solution;
189  _pred1 *= (_dt) / (3.0 * (_dt + dt_old));
190  return _pred1.l2_norm();
191  }
192  case Moose::TI_BDF2:
193  {
194  _pred1 *= -1.0;
195  _pred1 += solution;
196  Real topcalc = 2.0 * (_dt + dt_old) * (_dt + dt_old);
197  Real bottomcalc = 6.0 * _dt * _dt + 12.0 * _dt * dt_old + 5.0 * dt_old * dt_old;
198  _pred1 *= topcalc / bottomcalc;
199 
200  return _pred1.l2_norm();
201  }
202  default:
203  break;
204  }
205  return -1;
206 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
TimeIntegrator * getTimeIntegrator()
NonlinearSystemBase & getNonlinearSystemBase()
NumericVector< Number > & _pred1
FEProblemBase & _fe_problem
Definition: TimeStepper.h:124
Base class for time integrators.
virtual NumericVector< Number > & solutionPredictor()
Definition: Predictor.h:50
Real & _dt
Definition: TimeStepper.h:132
void TimeStepper::forceTimeStep ( Real  dt)
virtualinherited

Definition at line 201 of file TimeStepper.C.

Referenced by TimeStepper::getCurrentDT().

202 {
203  _current_dt = dt;
204 }
Real & _current_dt
Size of the current time step as computed by the Stepper. Note that the actual dt that was taken migh...
Definition: TimeStepper.h:154
Real TimeStepper::getCurrentDT ( )
inlineinherited

Get the current_dt.

Definition at line 89 of file TimeStepper.h.

Referenced by ConstantDT::computeDT(), LogConstantDT::computeDT(), SolutionTimeAdaptiveDT::computeDT(), DT2::computeDT(), and DT2::step().

89 { return _current_dt; }
Real & _current_dt
Size of the current time step as computed by the Stepper. Note that the actual dt that was taken migh...
Definition: TimeStepper.h:154
MooseApp& MooseObject::getMooseApp ( )
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 72 of file MooseObject.h.

Referenced by RestartableDataIO::createBackup(), RestartableDataIO::deserializeRestartableData(), Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

72 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 122 of file MooseObject.h.

Referenced by FEProblemBase::addMaterial(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), EigenKernel::EigenKernel(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), RenameBlock::modify(), MooseObject::parameters(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

123 {
124  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
125 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
void TimeStepper::init ( )
virtualinherited

Initialize the time stepper.

Called at the very beginning of Executioner::execute()

Reimplemented in IterationAdaptiveDT, CSVTimeSequenceStepper, TimeSequenceStepperBase, TimeSequenceStepper, and FunctionDT.

Definition at line 60 of file TimeStepper.C.

61 {
62 }
bool MooseObject::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 67 of file MooseObject.h.

Referenced by BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), MultiAppNearestNodeTransfer::getLocalNodes(), MultiAppNearestNodeTransfer::getNearestNode(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), MooseParsedVectorFunction::initialSetup(), Console::initialSetup(), Receiver::initialSetup(), SolutionFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), AdvancedOutput::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), BreakBoundaryOnSubdomain::modify(), MeshExtruder::modify(), MeshSideSet::modify(), AssignElementSubdomainID::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), SubdomainBoundingBox::modify(), EigenExecutionerBase::normalizeSolution(), Output::Output(), Exodus::outputSetup(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), Piecewise::setData(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

67 { return _pars.isParamValid(name); }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited
template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 80 of file MooseObject.h.

Referenced by FEProblemBase::addInitialCondition(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AnnularMesh::AnnularMesh(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), EigenExecutionerBase::chebyshev(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), SubProblem::checkMatProps(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), FEProblemBase::computeResidual(), Material::computeSubdomainProperties(), PenetrationAux::computeValue(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DGKernel::DGKernel(), SolutionUserObject::discontinuousPointValue(), SolutionUserObject::discontinuousPointValueGradient(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), NodalValueSampler::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), FindValueOnLine::execute(), MultiAppInterpolationTransfer::execute(), TimeExtremeValue::execute(), LeastSquaresFit::execute(), FEProblemBase::executeControls(), FileOutput::FileOutput(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), GeneratedMesh::GeneratedMesh(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), GeneratedMesh::getMaxInDimension(), AnnularMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), GeneratedMesh::getMinInDimension(), AnnularMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObjectBase(), NumVars::getValue(), PerformanceData::getValue(), Residual::getValue(), FindValueOnLine::getValueAtPoint(), DisplacedProblem::getVariable(), FEProblemBase::getVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), KernelBase::KernelBase(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< T >::LineMaterialSamplerBase(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), AssignElementSubdomainID::modify(), AddAllSideSetsByNormals::modify(), ElementDeleterBase::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), NodalBC::NodalBC(), NodalConstraint::NodalConstraint(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), VTKOutput::output(), XDA::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), Console::outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMultilinear::PiecewiseMultilinear(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postStep(), LStableDirk3::postStep(), ImplicitMidpoint::postStep(), ExplicitTVDRK2::postStep(), AStableDirk4::postStep(), LStableDirk4::postStep(), ExplicitRK2::postStep(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), Piecewise::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromPoints::SideSetsFromPoints(), SolutionUserObject::SolutionUserObject(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), Console::systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), and VolumeHistogram::VolumeHistogram().

81  {
82  std::ostringstream oss;
83  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
84  std::string msg = oss.str();
85  callMooseErrorRaw(msg, &_app);
86  }
void mooseStreamAll(std::ostringstream &ss)
Definition: MooseError.C:78
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:45
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

Definition at line 101 of file MooseObject.h.

102  {
103  moose::internal::mooseInfoStream(_console, std::forward<Args>(args)...);
104  }
void mooseInfoStream(S &oss, Args &&...args)
Definition: MooseError.h:145
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited
const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 47 of file MooseObject.h.

Referenced by FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), Output::advancedExecuteOn(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), AStableDirk4::AStableDirk4(), Function::average(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), DGKernel::DGKernel(), estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), GeneralUserObject::GeneralUserObject(), MultiApp::getBoundingBox(), Control::getControllableParameterHelper(), Control::getControllableValue(), AuxKernel::getDependObjects(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), OutputWarehouse::getOutput(), Transient::getTimeStepperName(), InitialCondition::getUserObject(), AuxKernel::getUserObject(), InitialCondition::getUserObjectByName(), AuxKernel::getUserObjectByName(), AdvancedOutput::hasOutputHelper(), FEProblemBase::init(), CSVReader::initialize(), MultiAppProjectionTransfer::initialSetup(), InitialCondition::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), Function::integral(), IntegratedBC::IntegratedBC(), InterfaceKernel::InterfaceKernel(), KernelBase::KernelBase(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MaterialDerivativeTestKernelBase< T >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), ElementDeleterBase::modify(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::parameters(), Executioner::parentOutputPositionChanged(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), OutputWarehouse::setFileNumbers(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), Function::timeDerivative(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), VariableResidual::VariableResidual(), and AdvancedOutput::wantOutput().

47 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:114
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
virtual void TimeStepper::postExecute ( )
inlinevirtualinherited

Definition at line 45 of file TimeStepper.h.

45 {}
virtual void TimeStepper::postSolve ( )
inlinevirtualinherited

Definition at line 44 of file TimeStepper.h.

44 {}
virtual void TimeStepper::postStep ( )
inlinevirtualinherited

Reimplemented in FunctionDT.

Definition at line 47 of file TimeStepper.h.

47 {}
void AB2PredictorCorrector::preExecute ( )
overridevirtual

Reimplemented from TimeStepper.

Definition at line 73 of file AB2PredictorCorrector.C.

74 {
76 }
virtual void preExecute()
Definition: TimeStepper.C:65
void AB2PredictorCorrector::preSolve ( )
overridevirtual

Reimplemented from TimeStepper.

Definition at line 79 of file AB2PredictorCorrector.C.

80 {
81  // save dt
82  _dt_full = _dt;
83 }
Real & _dt_full
dt of the big step
Real & _dt
Definition: TimeStepper.h:132
virtual void TimeStepper::preStep ( )
inlinevirtualinherited

Definition at line 46 of file TimeStepper.h.

46 {}
void TimeStepper::rejectStep ( )
virtualinherited

This gets called when time step is rejected.

Reimplemented in DT2, IterationAdaptiveDT, SolutionTimeAdaptiveDT, and FunctionDT.

Definition at line 175 of file TimeStepper.C.

Referenced by TimeStepper::postStep(), FunctionDT::rejectStep(), SolutionTimeAdaptiveDT::rejectStep(), and IterationAdaptiveDT::rejectStep().

176 {
177  _converged = false;
179 }
FEProblemBase & _fe_problem
Definition: TimeStepper.h:124
virtual void restoreSolutions()
bool _converged
Whether or not the previous solve converged.
Definition: TimeStepper.h:144
void AB2PredictorCorrector::step ( )
overridevirtual

Take a time step.

Reimplemented from TimeStepper.

Definition at line 86 of file AB2PredictorCorrector.C.

87 {
90 
93  if (_converged)
94  {
95  _u1 = *nl.currentSolution();
96  _u1.close();
97 
98  _aux1 = *aux.currentSolution();
99  _aux1.close();
100  if (_t_step >= _start_adapting)
101  {
102  // Calculate error if past the first solve
104 
105  _infnorm = _u1.linfty_norm();
106  _e_max = 1.1 * _e_tol * _infnorm;
107  _console << "Time Error Estimate: " << _error << std::endl;
108  }
109  else
110  {
111  // First time step is problematic, sure we converged but what does that mean? We don't know.
112  // Nor can we calculate the error on the first time step.
113  }
114  }
115 }
virtual const NumericVector< Number > *& currentSolution() override
The solution vector that is currently being operated on.
Real & _error
global relative time discretization error estimate
NonlinearSystemBase & getNonlinearSystemBase()
Real _e_tol
error tolerance
NumericVector< Number > & _aux1
virtual const NumericVector< Number > *& currentSolution() override
The solution vector that is currently being operated on.
NonlinearSystemBase * nl
Nonlinear system to be solved.
FEProblemBase & _fe_problem
Definition: TimeStepper.h:124
virtual bool converged() override
virtual Real estimateTimeError(NumericVector< Number > &sol)
Real _e_max
maximal error
AuxiliarySystem & getAuxiliarySystem()
bool _converged
Whether or not the previous solve converged.
Definition: TimeStepper.h:144
NumericVector< Number > & _u1
Real & _infnorm
infinity norm of the solution vector
int & _t_step
Definition: TimeStepper.h:131
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual void solve() override
A system that holds auxiliary variables.

Member Data Documentation

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

Referenced by AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterial(), FEProblemBase::addMultiApp(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), FileMesh::buildMesh(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobian(), FEProblemBase::computeResidualType(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), InversePowerMethod::execute(), NonlinearEigen::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MooseObject::getMooseApp(), InversePowerMethod::init(), NonlinearEigen::init(), Transient::init(), Steady::init(), MooseMesh::init(), NumPicardIterations::initialize(), TimePeriod::initialSetup(), Console::initialSetup(), MultiApp::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutput(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), MooseMesh::MooseMesh(), NonlinearEigen::NonlinearEigen(), Tecplot::output(), Exodus::output(), Nemesis::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), Console::outputSystemInformation(), MultiApp::parentOutputPositionChanged(), PerformanceData::PerformanceData(), PetscOutput::petscLinearOutput(), PetscOutput::petscNonlinearOutput(), SubProblem::registerRecoverableData(), SubProblem::registerRestartableData(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and Console::write().

NumericVector<Number>& AB2PredictorCorrector::_aux1
protected

Definition at line 58 of file AB2PredictorCorrector.h.

Referenced by step().

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 37 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), CreateProblemAction::act(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), FEProblemBase::advanceMultiApps(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualType(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), step(), NonlinearEigen::takeStep(), FEProblemBase::useFECache(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

bool TimeStepper::_converged
protectedinherited

Whether or not the previous solve converged.

Definition at line 144 of file TimeStepper.h.

Referenced by DT2::converged(), converged(), TimeStepper::converged(), TimeStepper::rejectStep(), DT2::step(), step(), and TimeStepper::step().

Real& TimeStepper::_dt
protectedinherited
Real& AB2PredictorCorrector::_dt_full
protected

dt of the big step

Definition at line 62 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and preSolve().

Real& TimeStepper::_dt_max
protectedinherited

Definition at line 134 of file TimeStepper.h.

Referenced by SolutionTimeAdaptiveDT::computeDT(), and TimeStepper::constrainStep().

Real& TimeStepper::_dt_min
protectedinherited
int& AB2PredictorCorrector::_dt_steps_taken
protected

steps taken at current dt

Definition at line 75 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and converged().

Real AB2PredictorCorrector::_e_max
protected

maximal error

Definition at line 69 of file AB2PredictorCorrector.h.

Referenced by converged(), and step().

Real AB2PredictorCorrector::_e_tol
protected

error tolerance

Definition at line 67 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and step().

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.

Definition at line 117 of file MooseObject.h.

Referenced by MooseObject::enabled().

Real& TimeStepper::_end_time
protectedinherited

Definition at line 135 of file TimeStepper.h.

Referenced by TimeStepper::constrainStep().

Real& AB2PredictorCorrector::_error
protected

global relative time discretization error estimate

Definition at line 65 of file AB2PredictorCorrector.h.

Referenced by computeDT(), converged(), and step().

Transient& TimeStepper::_executioner
protectedinherited

Reference to transient executioner.

Definition at line 126 of file TimeStepper.h.

Referenced by IterationAdaptiveDT::acceptStep(), and TimeSequenceStepperBase::setupSequence().

FEProblemBase& TimeStepper::_fe_problem
protectedinherited
bool TimeStepper::_has_reset_dt
protectedinherited

True if dt has been reset.

Definition at line 150 of file TimeStepper.h.

Referenced by TimeStepper::computeStep().

Real& AB2PredictorCorrector::_infnorm
protected

infinity norm of the solution vector

Definition at line 79 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and step().

Real AB2PredictorCorrector::_max_increase
protected

maximum increase ratio

Definition at line 71 of file AB2PredictorCorrector.h.

Referenced by computeDT().

Real& AB2PredictorCorrector::_my_dt_old
protected

Definition at line 77 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and estimateTimeError().

const std::string& MooseObject::_name
protectedinherited
const InputParameters& MooseObject::_pars
protectedinherited
NumericVector<Number>& AB2PredictorCorrector::_pred1
protected

Definition at line 59 of file AB2PredictorCorrector.h.

Referenced by estimateTimeError().

bool TimeStepper::_reset_dt
protectedinherited

If true then the next dt will be computed by computeInitialDT()

Definition at line 147 of file TimeStepper.h.

Referenced by TimeStepper::computeStep().

Real AB2PredictorCorrector::_scaling_parameter
protected

scaling_parameter for time step selection, default is 0.8

Definition at line 81 of file AB2PredictorCorrector.h.

Referenced by computeDT().

int AB2PredictorCorrector::_start_adapting
protected

Definition at line 76 of file AB2PredictorCorrector.h.

Referenced by computeDT(), and step().

int AB2PredictorCorrector::_steps_between_increase
protected

steps to take before increasing dt

Definition at line 73 of file AB2PredictorCorrector.h.

Referenced by computeDT().

std::set<Real>& TimeStepper::_sync_times
protectedinherited
int& TimeStepper::_t_step
protectedinherited
Real& TimeStepper::_time
protectedinherited
Real& TimeStepper::_time_old
protectedinherited
Real& TimeStepper::_timestep_tolerance
protectedinherited
NumericVector<Number>& AB2PredictorCorrector::_u1
protected

Definition at line 57 of file AB2PredictorCorrector.h.

Referenced by step().

bool& TimeStepper::_verbose
protectedinherited
std::ofstream AB2PredictorCorrector::myfile
protected

Definition at line 82 of file AB2PredictorCorrector.h.


The documentation for this class was generated from the following files: