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