www.mooseframework.org
Transient.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 "Transient.h"
11 
12 // MOOSE includes
13 #include "Factory.h"
14 #include "SubProblem.h"
15 #include "TimeStepper.h"
16 #include "MooseApp.h"
17 #include "Conversion.h"
18 #include "FEProblem.h"
19 #include "NonlinearSystem.h"
20 #include "Control.h"
21 #include "TimePeriod.h"
22 #include "MooseMesh.h"
24 #include "TimeIntegrator.h"
25 #include "Console.h"
26 
27 #include "libmesh/implicit_system.h"
28 #include "libmesh/nonlinear_implicit_system.h"
29 #include "libmesh/transient_system.h"
30 #include "libmesh/numeric_vector.h"
31 
32 // C++ Includes
33 #include <iomanip>
34 #include <iostream>
35 #include <fstream>
36 #include <sstream>
37 #include <iomanip>
38 
39 registerMooseObject("MooseApp", Transient);
40 
41 template <>
44 {
46  params.addClassDescription("Executioner for time varying simulations.");
47 
48  std::vector<Real> sync_times(1);
49  sync_times[0] = -std::numeric_limits<Real>::max();
50 
56  MooseEnum schemes("implicit-euler explicit-euler crank-nicolson bdf2 explicit-midpoint dirk "
57  "explicit-tvd-rk-2 newmark-beta",
58  "implicit-euler");
59 
60  params.addParam<Real>("start_time", 0.0, "The start time of the simulation");
61  params.addParam<Real>("end_time", 1.0e30, "The end time of the simulation");
62  params.addParam<Real>("dt", 1., "The timestep size between solves");
63  params.addParam<Real>("dtmin", 2.0e-14, "The minimum timestep size in an adaptive run");
64  params.addParam<Real>("dtmax", 1.0e30, "The maximum timestep size in an adaptive run");
65  params.addParam<bool>(
66  "reset_dt", false, "Use when restarting a calculation to force a change in dt.");
67  params.addParam<unsigned int>("num_steps",
68  std::numeric_limits<unsigned int>::max(),
69  "The number of timesteps in a transient run");
70  params.addParam<int>("n_startup_steps", 0, "The number of timesteps during startup");
71 
72  params.addDeprecatedParam<bool>("trans_ss_check",
73  false,
74  "Whether or not to check for steady state conditions",
75  "Use steady_state_detection instead");
76  params.addDeprecatedParam<Real>("ss_check_tol",
77  1.0e-08,
78  "Whenever the relative residual changes by less "
79  "than this the solution will be considered to be "
80  "at steady state.",
81  "Use steady_state_tolerance instead");
82  params.addDeprecatedParam<Real>(
83  "ss_tmin",
84  0.0,
85  "Minimum amount of time to run before checking for steady state conditions.",
86  "Use steady_state_start_time instead");
87 
88  params.addParam<bool>(
89  "steady_state_detection", false, "Whether or not to check for steady state conditions");
90  params.addParam<Real>("steady_state_tolerance",
91  1.0e-08,
92  "Whenever the relative residual changes by less "
93  "than this the solution will be considered to be "
94  "at steady state.");
95  params.addParam<Real>(
96  "steady_state_start_time",
97  0.0,
98  "Minimum amount of time to run before checking for steady state conditions.");
99 
100  params.addParam<std::vector<std::string>>("time_periods", "The names of periods");
101  params.addParam<std::vector<Real>>("time_period_starts", "The start times of time periods");
102  params.addParam<std::vector<Real>>("time_period_ends", "The end times of time periods");
103  params.addParam<bool>(
104  "abort_on_solve_fail", false, "abort if solve not converged rather than cut timestep");
105  params.addParam<MooseEnum>("scheme", schemes, "Time integration scheme used.");
106  params.addParam<Real>("timestep_tolerance",
107  2.0e-14,
108  "the tolerance setting for final timestep size and sync times");
109 
110  params.addParam<bool>("use_multiapp_dt",
111  false,
112  "If true then the dt for the simulation will be "
113  "chosen by the MultiApps. If false (the "
114  "default) then the minimum over the master dt "
115  "and the MultiApps is used");
116 
117  params.addParamNamesToGroup(
118  "steady_state_detection steady_state_tolerance steady_state_start_time",
119  "Steady State Detection");
120 
121  params.addParamNamesToGroup("start_time dtmin dtmax n_startup_steps trans_ss_check ss_check_tol "
122  "ss_tmin abort_on_solve_fail timestep_tolerance use_multiapp_dt",
123  "Advanced");
124 
125  params.addParamNamesToGroup("time_periods time_period_starts time_period_ends", "Time Periods");
126 
127  params.addParam<bool>("verbose", false, "Print detailed diagnostics on timestep calculation");
128  return params;
129 }
130 
132  : Executioner(parameters),
133  _problem(_fe_problem),
134  _nl(_fe_problem.getNonlinearSystemBase()),
135  _time_scheme(getParam<MooseEnum>("scheme").getEnum<Moose::TimeIntegratorType>()),
136  _t_step(_problem.timeStep()),
137  _time(_problem.time()),
138  _time_old(_problem.timeOld()),
139  _dt(_problem.dt()),
140  _dt_old(_problem.dtOld()),
141  _unconstrained_dt(declareRecoverableData<Real>("unconstrained_dt", -1)),
142  _at_sync_point(declareRecoverableData<bool>("at_sync_point", false)),
143  _last_solve_converged(declareRecoverableData<bool>("last_solve_converged", true)),
144  _xfem_repeat_step(false),
145  _end_time(getParam<Real>("end_time")),
146  _dtmin(getParam<Real>("dtmin")),
147  _dtmax(getParam<Real>("dtmax")),
148  _num_steps(getParam<unsigned int>("num_steps")),
149  _n_startup_steps(getParam<int>("n_startup_steps")),
150  _steady_state_detection(getParam<bool>("steady_state_detection")),
151  _steady_state_tolerance(getParam<Real>("steady_state_tolerance")),
152  _steady_state_start_time(getParam<Real>("steady_state_start_time")),
153  _sln_diff_norm(declareRecoverableData<Real>("sln_diff_norm", 0.0)),
154  _old_time_solution_norm(declareRecoverableData<Real>("old_time_solution_norm", 0.0)),
155  _sync_times(_app.getOutputWarehouse().getSyncTimes()),
156  _abort(getParam<bool>("abort_on_solve_fail")),
157  _time_interval(declareRecoverableData<bool>("time_interval", false)),
158  _start_time(getParam<Real>("start_time")),
159  _timestep_tolerance(getParam<Real>("timestep_tolerance")),
160  _target_time(declareRecoverableData<Real>("target_time", -1)),
161  _use_multiapp_dt(getParam<bool>("use_multiapp_dt")),
162  _verbose(getParam<bool>("verbose")),
163  _sln_diff(_nl.addVector("sln_diff", false, PARALLEL)),
164  _final_timer(registerTimedSection("final", 1))
165 {
167 
168  // Handle deprecated parameters
169  if (!parameters.isParamSetByAddParam("trans_ss_check"))
170  _steady_state_detection = getParam<bool>("trans_ss_check");
171 
172  if (!parameters.isParamSetByAddParam("ss_check_tol"))
173  _steady_state_tolerance = getParam<Real>("ss_check_tol");
174 
175  if (!parameters.isParamSetByAddParam("ss_tmin"))
176  _steady_state_start_time = getParam<Real>("ss_tmin");
177 
178  _t_step = 0;
179  _dt = 0;
181 
182  // Either a start_time has been forced on us, or we want to tell the App about what our start time
183  // is (in case anyone else is interested.
184  if (_app.hasStartTime())
186  else if (parameters.isParamSetByUser("start_time") && !_app.isRecovering())
188 
190  _problem.transient(true);
191 
193 
194  if (_app.halfTransient()) // Cut timesteps and end_time in half...
195  {
196  _end_time /= 2.0;
197  _num_steps /= 2.0;
198 
199  if (_num_steps == 0) // Always do one step in the first half
200  _num_steps = 1;
201  }
202 }
203 
204 void
206 {
207  if (!_time_stepper.get())
208  {
209  InputParameters pars = _app.getFactory().getValidParams("ConstantDT");
210  pars.set<SubProblem *>("_subproblem") = &_problem;
211  pars.set<Transient *>("_executioner") = this;
212 
219  if (!_pars.isParamSetByAddParam("end_time") && !_pars.isParamSetByAddParam("num_steps") &&
221  pars.set<Real>("dt") = (getParam<Real>("end_time") - getParam<Real>("start_time")) /
222  static_cast<Real>(getParam<unsigned int>("num_steps"));
223  else
224  pars.set<Real>("dt") = getParam<Real>("dt");
225 
226  pars.set<bool>("reset_dt") = getParam<bool>("reset_dt");
227  _time_stepper = _app.getFactory().create<TimeStepper>("ConstantDT", "TimeStepper", pars);
228  }
229 
232 
241  if (_app.isRestarting())
242  {
243  if (_app.hasStartTime())
245  else
246  _time_old = _time;
247  }
248 
249  _time_stepper->init();
250 
251  if (_app.isRecovering()) // Recover case
252  {
253  if (_t_step == 0)
254  mooseError("Internal error in Transient executioner: _t_step is equal to 0 while recovering "
255  "in init().");
256 
257  _dt_old = _dt;
258  }
259 }
260 
261 void
263 {
264  _time_stepper->preExecute();
265 
266  if (!_app.isRecovering())
267  {
268  _t_step = 0;
269  _dt = 0;
271  if (!_app.isRestarting())
273 
275 
276  computeDT();
277  _dt = getDT();
278  if (_dt == 0)
279  mooseError("Time stepper computed zero time step size on initial which is not allowed.\n"
280  "1. If you are using an existing time stepper, double check the values in your "
281  "input file or report an error.\n"
282  "2. If you are developing a new time stepper, make sure that initial time step "
283  "size in your code is computed correctly.");
285  }
286 }
287 
288 void
290 {
291  _time_stepper->preStep();
292 }
293 
294 void
296 {
297  _time_stepper->postStep();
298 }
299 
300 void
302 {
303  preExecute();
304 
305  // Start time loop...
306  while (keepGoing())
307  {
309  preStep();
310  computeDT();
311  takeStep();
312  endStep();
313  postStep();
314  }
315 
316  if (lastSolveConverged())
317  {
318  _t_step++;
320  {
323  }
324  }
325 
326  if (!_app.halfTransient())
327  {
328  TIME_SECTION(_final_timer);
333  }
334 
335  // This method is to finalize anything else we want to do on the problem side.
337 
338  // This method can be overridden for user defined activities in the Executioner.
339  postExecute();
340 }
341 
342 void
344 {
345  _time_stepper->computeStep(); // This is actually when DT gets computed
346 }
347 
348 void
350 {
351  if (lastSolveConverged())
352  {
353  if (!_xfem_repeat_step)
354  {
355 #ifdef LIBMESH_ENABLE_AMR
356  if (_t_step != 0)
358 #endif
359 
360  _time_old = _time;
361  _t_step++;
362 
364 
365  if (_t_step == 1)
366  return;
367 
368  /*
369  * Call the multi-app executioners endStep and
370  * postStep methods when doing Picard. We do not perform these calls for
371  * loose coupling because Transient::endStep and Transient::postStep get
372  * called from TransientMultiApp::solveStep in that case.
373  */
375  {
378  }
379 
380  /*
381  * Ensure that we increment the sub-application time steps so that
382  * when dt selection is made in the master application, we are using
383  * the correct time step information
384  */
387  }
388  }
389  else
390  {
393  _time_stepper->rejectStep();
394  _time = _time_old;
395  }
396 }
397 
398 void
399 Transient::takeStep(Real input_dt)
400 {
401  _dt_old = _dt;
402 
403  if (input_dt == -1.0)
405  else
406  _dt = input_dt;
407 
408  _time_stepper->preSolve();
409 
410  // Increment time
411  _time = _time_old + _dt;
412 
414 
416 
417  _time_stepper->step();
419 
420  _last_solve_converged = _time_stepper->converged();
421 
423  {
424  if (lastSolveConverged())
425  _time_stepper->acceptStep();
426  else
427  _time_stepper->rejectStep();
428  }
429 
430  _time = _time_old;
431 
432  _time_stepper->postSolve();
433 
436 
437  return;
438 }
439 
440 void
441 Transient::endStep(Real input_time)
442 {
443  if (input_time == -1.0)
444  _time = _time_old + _dt;
445  else
446  _time = input_time;
447 
448  if (lastSolveConverged())
449  {
450  if (_xfem_repeat_step)
451  _time = _time_old;
452  else
453  {
455 
456  // Compute the Error Indicators and Markers
459 
460  // Perform the output of the current time step
462 
463  // output
466  }
467  }
468 }
469 
470 Real
472 {
473  // // If start up steps are needed
474  // if (_t_step == 1 && _n_startup_steps > 1)
475  // _dt = _input_dt/(double)(_n_startup_steps);
476  // else if (_t_step == 1+_n_startup_steps && _n_startup_steps > 1)
477  // _dt = _input_dt;
478 
479  Real dt_cur = _dt;
480  std::ostringstream diag;
481 
482  // After startup steps, compute new dt
484  dt_cur = getDT();
485 
486  else
487  {
488  diag << "Timestep < n_startup_steps, using old dt: " << std::setw(9) << std::setprecision(6)
489  << std::setfill('0') << std::showpoint << std::left << _dt << " tstep: " << _t_step
490  << " n_startup_steps: " << _n_startup_steps << std::endl;
491  }
492  _unconstrained_dt = dt_cur;
493 
494  if (_verbose)
495  _console << diag.str();
496 
497  diag.str("");
498  diag.clear();
499 
500  // Allow the time stepper to limit the time step
501  _at_sync_point = _time_stepper->constrainStep(dt_cur);
502 
503  // Don't let time go beyond next time interval output if specified
505  {
507  _at_sync_point = true;
508 
509  diag << "Limiting dt for time interval output at time: " << std::setw(9) << std::setprecision(6)
510  << std::setfill('0') << std::showpoint << std::left << _next_interval_output_time
511  << " dt: " << std::setw(9) << std::setprecision(6) << std::setfill('0') << std::showpoint
512  << std::left << dt_cur << std::endl;
513  }
514 
515  // Adjust to a target time if set
516  if (_target_time > 0 && _time + dt_cur + _timestep_tolerance >= _target_time)
517  {
518  dt_cur = _target_time - _time;
519  _at_sync_point = true;
520 
521  diag << "Limiting dt for target time: " << std::setw(9) << std::setprecision(6)
522  << std::setfill('0') << std::showpoint << std::left << _next_interval_output_time
523  << " dt: " << std::setw(9) << std::setprecision(6) << std::setfill('0') << std::showpoint
524  << std::left << dt_cur << std::endl;
525  }
526 
527  // Constrain by what the multi apps are doing
528  Real multi_app_dt = _problem.computeMultiAppsDT(EXEC_TIMESTEP_BEGIN);
529  if (_use_multiapp_dt || multi_app_dt < dt_cur)
530  {
531  dt_cur = multi_app_dt;
532  _at_sync_point = false;
533  diag << "Limiting dt for MultiApps: " << std::setw(9) << std::setprecision(6)
534  << std::setfill('0') << std::showpoint << std::left << dt_cur << std::endl;
535  }
537  if (multi_app_dt < dt_cur)
538  {
539  dt_cur = multi_app_dt;
540  _at_sync_point = false;
541  diag << "Limiting dt for MultiApps: " << std::setw(9) << std::setprecision(6)
542  << std::setfill('0') << std::showpoint << std::left << dt_cur << std::endl;
543  }
544 
545  if (_verbose)
546  _console << diag.str();
547 
548  return dt_cur;
549 }
550 
551 Real
553 {
554  return _time_stepper->getCurrentDT();
555 }
556 
557 bool
559 {
560  bool keep_going = !_problem.isSolveTerminationRequested();
561 
562  // Check for stop condition based upon steady-state check flag:
563  if (lastSolveConverged())
564  {
565  if (!_xfem_repeat_step)
566  {
568  {
569  // Check solution difference relative norm against steady-state tolerance
571  {
572  _console << "Steady-State Solution Achieved at time: " << _time << std::endl;
573  // Output last solve if not output previously by forcing it
574  keep_going = false;
575  }
576  else // Keep going
577  {
578  // Update solution norm for next time step
580  // Print steady-state relative error norm
581  _console << "Steady-State Relative Differential Norm: " << _sln_diff_norm << std::endl;
582  }
583  }
584 
585  // Check for stop condition based upon number of simulation steps and/or solution end time:
586  if (static_cast<unsigned int>(_t_step) >= _num_steps)
587  keep_going = false;
588 
589  if ((_time >= _end_time) || (fabs(_time - _end_time) <= _timestep_tolerance))
590  keep_going = false;
591  }
592  }
593  else if (_abort)
594  {
595  _console << "Aborting as solve did not converge and input selected to abort" << std::endl;
596  keep_going = false;
597  }
598 
599  return keep_going;
600 }
601 
602 void
604 {
605 }
606 
607 bool
609 {
610  return _last_solve_converged;
611 }
612 
613 void
615 {
616  _time_stepper->postExecute();
617 }
618 
619 void
620 Transient::setTargetTime(Real target_time)
621 {
622  _target_time = target_time;
623 }
624 
625 Real
627 {
628  return _solution_change_norm;
629 }
630 
631 void
633 {
635  mooseError("You cannot specify time_scheme in the Executioner and independently add a "
636  "TimeIntegrator to the system at the same time");
637 
639  {
640  // backwards compatibility
641  std::string ti_str;
642  using namespace Moose;
643 
644  switch (_time_scheme)
645  {
646  case TI_IMPLICIT_EULER:
647  ti_str = "ImplicitEuler";
648  break;
649  case TI_EXPLICIT_EULER:
650  ti_str = "ExplicitEuler";
651  break;
652  case TI_CRANK_NICOLSON:
653  ti_str = "CrankNicolson";
654  break;
655  case TI_BDF2:
656  ti_str = "BDF2";
657  break;
659  ti_str = "ExplicitMidpoint";
660  break;
661  case TI_LSTABLE_DIRK2:
662  ti_str = "LStableDirk2";
663  break;
665  ti_str = "ExplicitTVDRK2";
666  break;
667  case TI_NEWMARK_BETA:
668  ti_str = "NewmarkBeta";
669  break;
670  default:
671  mooseError("Unknown scheme: ", _time_scheme);
672  break;
673  }
674 
675  InputParameters params = _app.getFactory().getValidParams(ti_str);
676  _problem.addTimeIntegrator(ti_str, ti_str, params);
677  }
678 }
679 
680 std::string
682 {
683  if (_time_stepper)
684  {
685  TimeStepper & ts = *_time_stepper;
686  return demangle(typeid(ts).name());
687  }
688  else
689  return std::string();
690 }
691 
692 Real
694 {
695  const NumericVector<Number> & current_solution = *_nl.currentSolution();
696  const NumericVector<Number> & old_solution = _nl.solutionOld();
697 
698  _sln_diff = current_solution;
699  _sln_diff -= old_solution;
700 
701  return (_sln_diff.l2_norm() / current_solution.l2_norm());
702 }
void finalizeMultiApps()
Moose::TimeIntegratorType _time_scheme
Definition: Transient.h:206
virtual Real getDT()
Definition: Transient.C:552
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:30
Real & _unconstrained_dt
Definition: Transient.h:219
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
virtual bool isSolveTerminationRequested()
Check of termination has been requested.
Definition: Problem.h:46
PerfID _final_timer
Definition: Transient.h:267
virtual void setTargetTime(Real target_time)
Can be used to set the next "target time" which is a time to nail perfectly.
Definition: Transient.C:620
virtual void postExecute()
Method called at the end of the simulation.
virtual void postStep()
Callback to the TimeIntegrator called at the very end of time step.
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:67
virtual NumericVector< Number > & solutionOld()=0
virtual void computeDT()
Definition: Transient.C:343
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:201
FEProblemSolve _feproblem_solve
Definition: Executioner.h:129
void finishMultiAppStep(ExecFlagType type)
Finish the MultiApp time step (endStep, postStep) associated with the ExecFlagType.
virtual void computeMarkers()
int _n_startup_steps
Definition: Transient.h:232
virtual void init() override
Initialize the executioner.
Definition: Transient.C:205
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
TimeIntegrator * getTimeIntegrator()
Definition: SystemBase.h:729
Base class for time stepping.
Definition: TimeStepper.h:26
virtual void execute() override
Pure virtual execute function MUST be overridden by children classes.
Definition: Transient.C:301
virtual void endStep(Real input_time=-1.0)
Definition: Transient.C:441
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
bool halfTransient()
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:390
virtual void postExecute() override
Override this for actions that should take place after execution.
Definition: Transient.C:614
bool haveXFEM()
Find out whether the current analysis is using XFEM.
const ExecFlagType EXEC_TIMESTEP_END
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
virtual void setInnerSolve(SolveObject &solve)
Set the inner solve object wrapped by this object.
Definition: SolveObject.h:35
Real getStartTime() const
Definition: MooseApp.h:217
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:865
virtual void init()
Called only before the very first timestep (t_step = 0) Never called again (not even during recover/r...
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:226
bool _steady_state_detection
Steady state detection variables:
Definition: Transient.h:237
Real computeMultiAppsDT(ExecFlagType type)
Find the smallest timestep over all MultiApps.
Factory & getFactory()
Retrieve the Factory associated with this App.
Definition: MooseApp.h:286
virtual void timestepSetup()
InputParameters validParams< Transient >()
Definition: Transient.C:43
Real & _time_old
Previous time.
Definition: Transient.h:214
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
bool & _time_interval
if to use time interval output
Definition: Transient.h:248
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:207
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
bool isParamSetByAddParam(const std::string &name) const
Returns whether or not the parameter was set due to addParam.
virtual void takeStep(Real input_dt=-1.0)
Do whatever is necessary to advance one step.
Definition: Transient.C:399
Transient(const InputParameters &parameters)
Constructor.
Definition: Transient.C:131
unsigned int _num_steps
Definition: Transient.h:231
virtual Real computeConstrainedDT()
Definition: Transient.C:471
virtual bool lastSolveConverged() const override
Whether or not the last solve converged.
Definition: Transient.C:608
NonlinearSystemBase & _nl
Reference to nonlinear system base for faster access.
Definition: Transient.h:204
void setStartTime(const Real time)
Set the starting time for the simulation.
Definition: MooseApp.C:1042
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_PRE_MULTIAPP_SETUP
bool XFEMRepeatStep() const
This function checks the _xfem_repeat_step flag set by solve.
Definition: PicardSolve.h:60
bool hasTimeIntegrator() const
Returns whether or not this Problem has a TimeIntegrator.
virtual void computeIndicators()
bool _use_multiapp_dt
Definition: Transient.h:255
virtual void addTimeIntegrator(const std::string &type, const std::string &name, InputParameters parameters)
bool hasPicardIteration()
Whether or not this has Picard iterations.
Definition: PicardSolve.h:66
bool _verbose
should detailed diagnostic output be printed
Definition: Transient.h:258
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
InputParameters validParams< Executioner >()
Definition: Executioner.C:25
Executioners are objects that do the actual work of solving your problem.
Definition: Executioner.h:32
Real & _target_time
Definition: Transient.h:254
Real _steady_state_tolerance
Definition: Transient.h:238
void setupTimeIntegrator()
Definition: Transient.C:632
Real _start_time
Definition: Transient.h:252
virtual void incrementStepOrReject()
This is where the solve step is actually incremented.
Definition: Transient.C:349
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:174
virtual void estimateTimeError()
Definition: Transient.C:603
PicardSolve _picard_solve
Definition: Executioner.h:130
Real & _sln_diff_norm
Definition: Transient.h:240
Real _timestep_tolerance
Definition: Transient.h:253
bool _abort
Definition: Transient.h:245
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:216
Real & _dt_old
Definition: Transient.h:217
virtual void preExecute() override
Override this for actions that should take place before execution.
Definition: Transient.C:262
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
Real _time_interval_output_interval
Definition: Transient.h:250
NumericVector< Number > & _sln_diff
The difference of current and old solutions.
Definition: Transient.h:263
bool & _at_sync_point
Definition: Transient.h:220
Real & _time
Current time.
Definition: Transient.h:212
Real _solution_change_norm
Definition: Transient.h:260
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:59
Real _steady_state_start_time
Definition: Transient.h:239
void restoreMultiApps(ExecFlagType type, bool force=false)
Restore the MultiApps associated with the ExecFlagType.
bool hasStartTime() const
Definition: MooseApp.h:212
virtual void onTimestepBegin() override
virtual Real relativeSolutionDifferenceNorm()
The relative L2 norm of the difference between solution and old solution vector.
Definition: Transient.C:693
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:177
Real & _old_time_solution_norm
Definition: Transient.h:241
void incrementMultiAppTStep(ExecFlagType type)
Advance the MultiApps t_step (incrementStepOrReject) associated with the ExecFlagType.
virtual void transient(bool trans)
TimeIntegratorType
Time integrators.
Definition: MooseTypes.h:648
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:59
virtual void preStep()
Definition: Transient.C:289
virtual bool keepGoing()
Transient loop will continue as long as this keeps returning true.
Definition: Transient.C:558
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...
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 initialSetup()
Definition: Moose.h:112
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Real _end_time
Definition: Transient.h:228
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
virtual void postStep()
Definition: Transient.C:295
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:859
Real _next_interval_output_time
Definition: Transient.h:249
const ExecFlagType EXEC_FINAL
registerMooseObject("MooseApp", Transient)
int & _t_step
Current timestep.
Definition: Transient.h:210
virtual void outputStep(ExecFlagType type)
Output the current step.
virtual std::string getTimeStepperName() override
Get the timestepper.
Definition: Transient.C:681
Real getSolutionChangeNorm()
Get the Relative L2 norm of the change in the solution.
Definition: Transient.C:626
virtual bool adaptMesh()
bool & _last_solve_converged
Whether or not the last solve converged.
Definition: Transient.h:223
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...
const ExecFlagType EXEC_INITIAL