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

Transient executioners usually loop through a number of timesteps... More...

#include <Transient.h>

Inheritance diagram for Transient:
[legend]

Public Member Functions

 Transient (const InputParameters &parameters)
 Constructor. More...
 
virtual void init () override
 Initialize the executioner. More...
 
virtual void execute () override
 Pure virtual execute function MUST be overridden by children classes. More...
 
virtual void takeStep (Real input_dt=-1.0)
 Do whatever is necessary to advance one step. More...
 
virtual Real computeConstrainedDT ()
 
virtual void estimateTimeError ()
 
virtual Real getDT ()
 
virtual bool keepGoing ()
 Transient loop will continue as long as this keeps returning true. More...
 
virtual bool lastSolveConverged () override
 Whether or not the last solve converged. More...
 
virtual void preExecute () override
 Override this for actions that should take place before execution. More...
 
virtual void postExecute () override
 Override this for actions that should take place after execution. More...
 
virtual void computeDT ()
 
virtual void preStep ()
 
virtual void postStep ()
 
virtual void incrementStepOrReject ()
 This is where the solve step is actually incremented. More...
 
virtual void endStep (Real input_time=-1.0)
 
virtual void setTargetTime (Real target_time)
 Can be used to set the next "target time" which is a time to nail perfectly. More...
 
virtual Real getTime ()
 Get the current time. More...
 
virtual void setTime (Real t)
 Set the current time. More...
 
virtual void setTimeOld (Real t)
 Set the old time. More...
 
Real getSolutionChangeNorm ()
 Get the Relative L2 norm of the change in the solution. More...
 
TimeSteppergetTimeStepper ()
 Pointer to the TimeStepper. More...
 
void setTimeStepper (std::shared_ptr< TimeStepper > ts)
 Set the timestepper to use. More...
 
virtual std::string getTimeStepperName () override
 Get the timestepper. More...
 
Moose::TimeIntegratorType getTimeScheme ()
 Get the time scheme used. More...
 
std::set< Real > & syncTimes ()
 Get the set of sync times. More...
 
Real & dtMax ()
 Get the maximum dt. More...
 
Real & dtMin ()
 Get the minimal dt. More...
 
Real getStartTime ()
 Return the start time. More...
 
Real & endTime ()
 Get the end time. More...
 
Real & timestepTol ()
 Get the timestep tolerance. More...
 
bool & verbose ()
 Get the verbose output flag. More...
 
bool atSyncPoint ()
 Is the current step at a sync point (sync times, time interval, target time, etc)? More...
 
Real unconstrainedDT ()
 Get the unconstrained dt. More...
 
void parentOutputPositionChanged () override
 Can be used by subsclasses to call parentOutputPositionChanged() on the underlying FEProblemBase. More...
 
Real numPicardIts ()
 Get the number of Picard iterations performed. More...
 
virtual Real relativeSolutionDifferenceNorm ()
 The relative L2 norm of the difference between solution and old solution vector. More...
 
virtual void preSolve ()
 Override this for actions that should take place before execution. More...
 
virtual void postSolve ()
 Override this for actions that should take place after execution. More...
 
virtual Problemproblem ()
 Deprecated: Return a reference to this Executioner's Problem instance. More...
 
FEProblemBasefeProblem ()
 Return a reference to this Executioner's FEProblemBase instance. More...
 
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
 
template<class T >
const T & getUserObject (const std::string &name)
 Get an user object with a given parameter name. More...
 
template<class T >
const T & getUserObjectByName (const std::string &name)
 Get an user object with a given name. More...
 
const UserObjectgetUserObjectBase (const std::string &name)
 Get an user object with a given parameter name. More...
 
const UserObjectgetUserObjectBaseByName (const std::string &name)
 Get an user object with a given name. More...
 
bool hasPostprocessor (const std::string &name) const
 Determine if the Postprocessor exists. More...
 
bool hasPostprocessorByName (const PostprocessorName &name)
 Determine if the Postprocessor exists. More...
 
const PostprocessorValuegetPostprocessorValue (const std::string &name)
 Retrieve the value of a Postprocessor or one of it's old or older values. More...
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &name)
 
const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name)
 Retrieve the value of the Postprocessor. More...
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name)
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name)
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name)
 Return the default postprocessor value. More...
 

Public Attributes

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

Protected Member Functions

virtual void solveStep (Real input_dt=-1.0)
 This should execute the solve for one timestep. More...
 
void setupTimeIntegrator ()
 
virtual void addAttributeReporter (const std::string &name, Real &attribute, const std::string execute_on="")
 Adds a postprocessor to report a Real class attribute. 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

FEProblemBase_problem
 Here for backward compatibility. More...
 
Moose::TimeIntegratorType _time_scheme
 
std::shared_ptr< TimeStepper_time_stepper
 
int & _t_step
 Current timestep. More...
 
Real & _time
 Current time. More...
 
Real & _time_old
 Previous time. More...
 
Real & _dt
 Current delta t... or timestep size. More...
 
Real & _dt_old
 
Real & _unconstrained_dt
 
bool & _at_sync_point
 
bool & _first
 Is it our first time through the execution loop? More...
 
bool & _multiapps_converged
 Whether or not the multiapps failed during the last timestem. More...
 
bool & _last_solve_converged
 Whether or not the last solve converged. More...
 
bool _xfem_repeat_step
 Whether step should be repeated due to xfem modifying the mesh. More...
 
unsigned int _xfem_update_count
 
unsigned int _max_xfem_update
 
Real _end_time
 
Real _dtmin
 
Real _dtmax
 
unsigned int _num_steps
 
int _n_startup_steps
 
unsigned int _steps_taken
 
bool _trans_ss_check
 Steady state detection variables: More...
 
Real _ss_check_tol
 
Real _ss_tmin
 
Real & _sln_diff_norm
 
Real & _old_time_solution_norm
 
std::set< Real > & _sync_times
 
bool _abort
 
bool & _time_interval
 if to use time interval output More...
 
Real _next_interval_output_time
 
Real _time_interval_output_interval
 
Real _start_time
 
Real _timestep_tolerance
 
Real & _target_time
 
bool _use_multiapp_dt
 
int & _picard_it
 Picard Related. More...
 
Real _picard_max_its
 
bool & _picard_converged
 
Real & _picard_initial_norm
 
Real & _picard_timestep_begin_norm
 
Real & _picard_timestep_end_norm
 
Real _picard_rel_tol
 
Real _picard_abs_tol
 
bool _verbose
 should detailed diagnostic output be printed More...
 
Real _solution_change_norm
 
NumericVector< Number > & _sln_diff
 The difference of current and old solutions. More...
 
Real _relax_factor
 Relaxation factor for Picard Iteration. More...
 
Real _prev_time
 The _time when this app solved last. More...
 
std::vector< std::string > _relaxed_vars
 The transferred variables that are going to be relaxed. More...
 
std::set< dof_id_type > _relaxed_dofs
 The DoFs associates with all of the relaxed variables. More...
 
FEProblemBase_fe_problem
 
Real _initial_residual_norm
 Initial Residual Variables. More...
 
Real _old_initial_residual_norm
 
std::string _restart_file_base
 
std::vector< std::string > _splitting
 
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

Transient executioners usually loop through a number of timesteps...

calling solve() for each timestep.

Definition at line 36 of file Transient.h.

Constructor & Destructor Documentation

Transient::Transient ( const InputParameters parameters)

Constructor.

Parameters
parametersThe parameters object holding data for the class to use.
Returns
Whether or not the solve was successful.

Definition at line 143 of file Transient.C.

144  : Executioner(parameters),
146  _time_scheme(getParam<MooseEnum>("scheme").getEnum<Moose::TimeIntegratorType>()),
148  _time(_problem.time()),
150  _dt(_problem.dt()),
152  _unconstrained_dt(declareRecoverableData<Real>("unconstrained_dt", -1)),
153  _at_sync_point(declareRecoverableData<bool>("at_sync_point", false)),
154  _first(declareRecoverableData<bool>("first", true)),
155  _multiapps_converged(declareRecoverableData<bool>("multiapps_converged", true)),
156  _last_solve_converged(declareRecoverableData<bool>("last_solve_converged", true)),
157  _xfem_repeat_step(false),
159  _max_xfem_update(getParam<unsigned int>("max_xfem_update")),
160  _end_time(getParam<Real>("end_time")),
161  _dtmin(getParam<Real>("dtmin")),
162  _dtmax(getParam<Real>("dtmax")),
163  _num_steps(getParam<unsigned int>("num_steps")),
164  _n_startup_steps(getParam<int>("n_startup_steps")),
165  _steps_taken(0),
166  _trans_ss_check(getParam<bool>("trans_ss_check")),
167  _ss_check_tol(getParam<Real>("ss_check_tol")),
168  _ss_tmin(getParam<Real>("ss_tmin")),
169  _sln_diff_norm(declareRecoverableData<Real>("sln_diff_norm", 0.0)),
170  _old_time_solution_norm(declareRecoverableData<Real>("old_time_solution_norm", 0.0)),
172  _abort(getParam<bool>("abort_on_solve_fail")),
173  _time_interval(declareRecoverableData<bool>("time_interval", false)),
174  _start_time(getParam<Real>("start_time")),
175  _timestep_tolerance(getParam<Real>("timestep_tolerance")),
176  _target_time(declareRecoverableData<Real>("target_time", -1)),
177  _use_multiapp_dt(getParam<bool>("use_multiapp_dt")),
178  _picard_it(declareRecoverableData<int>("picard_it", 0)),
179  _picard_max_its(getParam<unsigned int>("picard_max_its")),
180  _picard_converged(declareRecoverableData<bool>("picard_converged", false)),
181  _picard_initial_norm(declareRecoverableData<Real>("picard_initial_norm", 0.0)),
182  _picard_timestep_begin_norm(declareRecoverableData<Real>("picard_timestep_begin_norm", 0.0)),
183  _picard_timestep_end_norm(declareRecoverableData<Real>("picard_timestep_end_norm", 0.0)),
184  _picard_rel_tol(getParam<Real>("picard_rel_tol")),
185  _picard_abs_tol(getParam<Real>("picard_abs_tol")),
186  _verbose(getParam<bool>("verbose")),
187  _sln_diff(_problem.getNonlinearSystemBase().addVector("sln_diff", false, PARALLEL)),
188  _relax_factor(getParam<Real>("relaxation_factor")),
189  _relaxed_vars(getParam<std::vector<std::string>>("relaxed_variables"))
190 {
192  _t_step = 0;
193  _dt = 0;
195 
196  // Either a start_time has been forced on us, or we want to tell the App about what our start time
197  // is (in case anyone else is interested.
198  if (_app.hasStartTime())
200  else if (parameters.isParamSetByUser("start_time"))
202 
204  _problem.transient(true);
205 
206  if (!_restart_file_base.empty())
208 
210 
211  if (_app.halfTransient()) // Cut timesteps and end_time in half...
212  {
213  _end_time /= 2.0;
214  _num_steps /= 2.0;
215 
216  if (_num_steps == 0) // Always do one step in the first half
217  _num_steps = 1;
218  }
219 
220  // Set up relaxation
221  if (_relax_factor != 1.0)
222  {
223  if (_relax_factor >= 2.0 || _relax_factor <= 0.0)
224  mooseError("The Picard iteration relaxation factor should be between 0.0 and 2.0");
226 
227  // Store a copy of the previous solution here
228  _nl_system.addVector("relax_previous", false, PARALLEL);
229  }
230  // This lets us know if we are at Picard iteration > 0, works for both master- AND sub-app.
231  // Initialize such that _prev_time != _time for the first Picard iteration
232  _prev_time = _time - 1.0;
233 }
Moose::TimeIntegratorType _time_scheme
Definition: Transient.h:222
bool hasStartTime()
Definition: MooseApp.h:190
virtual Real & timeOld() const
Real _dtmax
Definition: Transient.h:254
Real & _unconstrained_dt
Definition: Transient.h:235
Executioner(const InputParameters &parameters)
Constructor.
Definition: Executioner.C:76
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
Real _picard_abs_tol
Definition: Transient.h:293
bool & _picard_converged
Definition: Transient.h:288
NonlinearSystemBase & getNonlinearSystemBase()
Real _prev_time
The _time when this app solved last.
Definition: Transient.h:311
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
Real _picard_max_its
Definition: Transient.h:287
Real & _picard_initial_norm
Definition: Transient.h:289
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
int _n_startup_steps
Definition: Transient.h:256
virtual Real & time() const
void setDecomposition(const std::vector< std::string > &decomposition)
If called with a single string, it is used as the name of a the top-level decomposition split...
bool halfTransient()
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:339
bool & _multiapps_converged
Whether or not the multiapps failed during the last timestem.
Definition: Transient.h:242
unsigned int _steps_taken
Definition: Transient.h:257
Real & _picard_timestep_end_norm
Definition: Transient.h:291
Real _relax_factor
Relaxation factor for Picard Iteration.
Definition: Transient.h:306
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:248
unsigned int _xfem_update_count
Definition: Transient.h:249
std::string _restart_file_base
Definition: Executioner.h:133
Real _dtmin
Definition: Transient.h:253
Real & _time_old
Previous time.
Definition: Transient.h:230
bool & _time_interval
if to use time interval output
Definition: Transient.h:273
std::set< Real > & _sync_times
Definition: Transient.h:268
unsigned int _num_steps
Definition: Transient.h:255
void setStartTime(const Real time)
Set the starting time for the simulation.
Definition: MooseApp.C:827
Real getStartTime()
Definition: MooseApp.h:195
std::vector< std::string > _relaxed_vars
The transferred variables that are going to be relaxed.
Definition: Transient.h:314
virtual int & timeStep() const
int & _picard_it
Picard Related.
Definition: Transient.h:286
bool _use_multiapp_dt
Definition: Transient.h:280
bool _verbose
should detailed diagnostic output be printed
Definition: Transient.h:296
Real & _target_time
Definition: Transient.h:279
virtual Real & dt() const
bool & _first
Is it our first time through the execution loop?
Definition: Transient.h:239
void setupTimeIntegrator()
Definition: Transient.C:775
Real _start_time
Definition: Transient.h:277
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:122
Real & _sln_diff_norm
Definition: Transient.h:265
Real _timestep_tolerance
Definition: Transient.h:278
std::vector< std::string > _splitting
Definition: Executioner.h:136
bool _trans_ss_check
Steady state detection variables:
Definition: Transient.h:262
bool _abort
Definition: Transient.h:270
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:232
unsigned int _max_xfem_update
Definition: Transient.h:250
Real & _dt_old
Definition: Transient.h:233
NumericVector< Number > & _sln_diff
The difference of current and old solutions.
Definition: Transient.h:301
Real & _picard_timestep_begin_norm
Definition: Transient.h:290
bool & _at_sync_point
Definition: Transient.h:236
Real & _time
Current time.
Definition: Transient.h:228
Real _ss_tmin
Definition: Transient.h:264
Real _picard_rel_tol
Definition: Transient.h:292
virtual Real & dtOld() const
void setRestartFile(const std::string &file_name)
Communicate to the Resurector the name of the restart filer.
Nonlinear system to be solved.
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
Real & _old_time_solution_norm
Definition: Transient.h:266
virtual void transient(bool trans)
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Real _end_time
Definition: Transient.h:252
virtual NonlinearSystem & getNonlinearSystem()
Real _next_interval_output_time
Definition: Transient.h:274
int & _t_step
Current timestep.
Definition: Transient.h:226
std::set< Real > & getSyncTimes()
Return the sync times for all objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:840
Real _ss_check_tol
Definition: Transient.h:263
bool & _last_solve_converged
Whether or not the last solve converged.
Definition: Transient.h:245
FEProblemBase & _fe_problem
Definition: Executioner.h:126

Member Function Documentation

void Executioner::addAttributeReporter ( const std::string &  name,
Real &  attribute,
const std::string  execute_on = "" 
)
protectedvirtualinherited

Adds a postprocessor to report a Real class attribute.

Parameters
nameThe name of the postprocessor to create
attributeThe Real class attribute to report
execute_onWhen to execute the postprocessor that is created

Definition at line 180 of file Executioner.C.

Referenced by InversePowerMethod::InversePowerMethod(), NonlinearEigen::NonlinearEigen(), and Executioner::parentOutputPositionChanged().

183 {
185  "_fe_problem_base",
186  "Failed to retrieve FEProblemBase when adding a attribute reporter in Executioner");
187  InputParameters params = _app.getFactory().getValidParams("ExecutionerAttributeReporter");
188  params.set<Real *>("value") = &attribute;
189  if (!execute_on.empty())
190  params.set<MultiMooseEnum>("execute_on") = execute_on;
191  problem->addPostprocessor("ExecutionerAttributeReporter", name, params);
192 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:26
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...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Factory & getFactory()
Retrieve the Factory associated with this App.
Definition: MooseApp.h:253
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
virtual Problem & problem()
Deprecated: Return a reference to this Executioner&#39;s Problem instance.
Definition: Executioner.C:155
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
virtual void addPostprocessor(std::string pp_name, const std::string &name, InputParameters parameters)
bool Transient::atSyncPoint ( )
inline

Is the current step at a sync point (sync times, time interval, target time, etc)?

Returns
Bool indicataing whether we are at a sync point

Definition at line 190 of file Transient.h.

Referenced by IterationAdaptiveDT::acceptStep().

190 { return _at_sync_point; }
bool & _at_sync_point
Definition: Transient.h:236
Real Transient::computeConstrainedDT ( )
virtual
Returns
The fully constrained dt for this timestep

Definition at line 613 of file Transient.C.

Referenced by solveStep().

614 {
615  // // If start up steps are needed
616  // if (_t_step == 1 && _n_startup_steps > 1)
617  // _dt = _input_dt/(double)(_n_startup_steps);
618  // else if (_t_step == 1+_n_startup_steps && _n_startup_steps > 1)
619  // _dt = _input_dt;
620 
621  Real dt_cur = _dt;
622  std::ostringstream diag;
623 
624  // After startup steps, compute new dt
626  dt_cur = getDT();
627 
628  else
629  {
630  diag << "Timestep < n_startup_steps, using old dt: " << std::setw(9) << std::setprecision(6)
631  << std::setfill('0') << std::showpoint << std::left << _dt << " tstep: " << _t_step
632  << " n_startup_steps: " << _n_startup_steps << std::endl;
633  }
634  _unconstrained_dt = dt_cur;
635 
636  if (_verbose)
637  _console << diag.str();
638 
639  diag.str("");
640  diag.clear();
641 
642  // Allow the time stepper to limit the time step
643  _at_sync_point = _time_stepper->constrainStep(dt_cur);
644 
645  // Don't let time go beyond next time interval output if specified
647  {
649  _at_sync_point = true;
650 
651  diag << "Limiting dt for time interval output at time: " << std::setw(9) << std::setprecision(6)
652  << std::setfill('0') << std::showpoint << std::left << _next_interval_output_time
653  << " dt: " << std::setw(9) << std::setprecision(6) << std::setfill('0') << std::showpoint
654  << std::left << dt_cur << std::endl;
655  }
656 
657  // Adjust to a target time if set
658  if (_target_time > 0 && _time + dt_cur + _timestep_tolerance >= _target_time)
659  {
660  dt_cur = _target_time - _time;
661  _at_sync_point = true;
662 
663  diag << "Limiting dt for target time: " << std::setw(9) << std::setprecision(6)
664  << std::setfill('0') << std::showpoint << std::left << _next_interval_output_time
665  << " dt: " << std::setw(9) << std::setprecision(6) << std::setfill('0') << std::showpoint
666  << std::left << dt_cur << std::endl;
667  }
668 
669  // Constrain by what the multi apps are doing
670  Real multi_app_dt = _problem.computeMultiAppsDT(EXEC_TIMESTEP_BEGIN);
671  if (_use_multiapp_dt || multi_app_dt < dt_cur)
672  {
673  dt_cur = multi_app_dt;
674  _at_sync_point = false;
675  diag << "Limiting dt for MultiApps: " << std::setw(9) << std::setprecision(6)
676  << std::setfill('0') << std::showpoint << std::left << dt_cur << std::endl;
677  }
679  if (multi_app_dt < dt_cur)
680  {
681  dt_cur = multi_app_dt;
682  _at_sync_point = false;
683  diag << "Limiting dt for MultiApps: " << std::setw(9) << std::setprecision(6)
684  << std::setfill('0') << std::showpoint << std::left << dt_cur << std::endl;
685  }
686 
687  if (_verbose)
688  _console << diag.str();
689 
690  return dt_cur;
691 }
virtual Real getDT()
Definition: Transient.C:694
Real & _unconstrained_dt
Definition: Transient.h:235
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
int _n_startup_steps
Definition: Transient.h:256
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Real computeMultiAppsDT(ExecFlagType type)
Find the smallest timestep over all MultiApps.
bool & _time_interval
if to use time interval output
Definition: Transient.h:273
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
bool _use_multiapp_dt
Definition: Transient.h:280
bool _verbose
should detailed diagnostic output be printed
Definition: Transient.h:296
Real & _target_time
Definition: Transient.h:279
Real _timestep_tolerance
Definition: Transient.h:278
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:232
bool & _at_sync_point
Definition: Transient.h:236
Real & _time
Current time.
Definition: Transient.h:228
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Real _next_interval_output_time
Definition: Transient.h:274
int & _t_step
Current timestep.
Definition: Transient.h:226
void Transient::computeDT ( )
virtual

Definition at line 347 of file Transient.C.

Referenced by TransientMultiApp::computeDT(), execute(), init(), and TransientMultiApp::solveStep().

348 {
349  _time_stepper->computeStep(); // This is actually when DT gets computed
350 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
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
Real& Transient::dtMax ( )
inline

Get the maximum dt.

Returns
The maximum dt

Definition at line 154 of file Transient.h.

154 { return _dtmax; }
Real _dtmax
Definition: Transient.h:254
Real& Transient::dtMin ( )
inline

Get the minimal dt.

Returns
The minimal dt

Definition at line 160 of file Transient.h.

160 { return _dtmin; }
Real _dtmin
Definition: Transient.h:253
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
void Transient::endStep ( Real  input_time = -1.0)
virtual

Definition at line 586 of file Transient.C.

Referenced by TransientMultiApp::advanceStep(), execute(), and TransientMultiApp::solveStep().

587 {
588  if (input_time == -1.0)
589  _time = _time_old + _dt;
590  else
591  _time = input_time;
592 
593  _picard_converged = false;
594 
596 
598  {
599  // Compute the Error Indicators and Markers
602 
603  // Perform the output of the current time step
605 
606  // output
609  }
610 }
virtual bool lastSolveConverged() override
Whether or not the last solve converged.
Definition: Transient.C:745
bool & _picard_converged
Definition: Transient.h:288
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
virtual void computeMarkers()
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:248
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Real & _time_old
Previous time.
Definition: Transient.h:230
bool & _time_interval
if to use time interval output
Definition: Transient.h:273
virtual void computeIndicators()
Real _timestep_tolerance
Definition: Transient.h:278
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:232
Real _time_interval_output_interval
Definition: Transient.h:275
Real & _time
Current time.
Definition: Transient.h:228
Real _next_interval_output_time
Definition: Transient.h:274
virtual void outputStep(ExecFlagType type)
Output the current step.
bool & _last_solve_converged
Whether or not the last solve converged.
Definition: Transient.h:245
Real& Transient::endTime ( )
inline

Get the end time.

Returns
The end time

Definition at line 172 of file Transient.h.

Referenced by TimeSequenceStepperBase::setupSequence().

172 { return _end_time; }
Real _end_time
Definition: Transient.h:252
void Transient::estimateTimeError ( )
virtual

Definition at line 740 of file Transient.C.

741 {
742 }
void Transient::execute ( )
overridevirtual

Pure virtual execute function MUST be overridden by children classes.

This is where the Executioner actually does it's work.

Implements Executioner.

Definition at line 298 of file Transient.C.

299 {
300 
301  preExecute();
302 
303  // NOTE: if you remove this line, you will see a subset of tests failing. Those tests might have a
304  // wrong answer and might need to be regolded.
305  // The reason is that we actually move the solution back in time before we actually start solving
306  // (which I think is wrong). So this call here
307  // is to maintain backward compatibility and so that MOOSE is giving the same answer. However, we
308  // might remove this call and regold the test
309  // in the future eventually.
310  if (!_app.isRecovering())
312 
313  // Start time loop...
314  while (true)
315  {
316  if (_first != true)
318 
319  _first = false;
320 
321  if (!keepGoing())
322  break;
323 
324  preStep();
325  computeDT();
326  takeStep();
327  endStep();
328  postStep();
329 
330  _steps_taken++;
331  }
332 
333  if (!_app.halfTransient())
334  {
337  }
338 
339  // This method is to finalize anything else we want to do on the problem side.
341 
342  // This method can be overridden for user defined activities in the Executioner.
343  postExecute();
344 }
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:607
virtual void postExecute()
Method called at the end of the simulation.
virtual void computeDT()
Definition: Transient.C:347
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
virtual void endStep(Real input_time=-1.0)
Definition: Transient.C:586
bool halfTransient()
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:339
virtual void postExecute() override
Override this for actions that should take place after execution.
Definition: Transient.C:757
unsigned int _steps_taken
Definition: Transient.h:257
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
virtual void takeStep(Real input_dt=-1.0)
Do whatever is necessary to advance one step.
Definition: Transient.C:392
bool & _first
Is it our first time through the execution loop?
Definition: Transient.h:239
virtual void incrementStepOrReject()
This is where the solve step is actually incremented.
Definition: Transient.C:353
virtual void preExecute() override
Override this for actions that should take place before execution.
Definition: Transient.C:751
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
Object is evaluated at the end of the simulations (output only)
Definition: MooseTypes.h:104
virtual void preStep()
Definition: Transient.C:286
virtual bool keepGoing()
Transient loop will continue as long as this keeps returning true.
Definition: Transient.C:700
virtual void postStep()
Definition: Transient.C:292
virtual void outputStep(ExecFlagType type)
Output the current step.
FEProblemBase & Executioner::feProblem ( )
inherited

Return a reference to this Executioner's FEProblemBase instance.

Definition at line 162 of file Executioner.C.

163 {
164  return _fe_problem;
165 }
FEProblemBase & _fe_problem
Definition: Executioner.h:126
const PostprocessorValue & PostprocessorInterface::getDefaultPostprocessorValue ( const std::string &  name)
inherited

Return the default postprocessor value.

Parameters
nameThe name of the postprocessor parameter
Returns
A const reference to the default value

Definition at line 92 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

93 {
95 }
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
Real Transient::getDT ( )
virtual
Returns
The the computed dt to use for this timestep.

Definition at line 694 of file Transient.C.

Referenced by computeConstrainedDT(), TransientMultiApp::computeDT(), init(), and TransientMultiApp::solveStep().

695 {
696  return _time_stepper->getCurrentDT();
697 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
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
const PostprocessorValue & PostprocessorInterface::getPostprocessorValue ( const std::string &  name)
inherited

Retrieve the value of a Postprocessor or one of it's old or older values.

Parameters
nameThe name of the Postprocessor parameter (see below)
Returns
A reference to the desired value

The name required by this method is the name that is hard-coded into your source code. For example, if you have a Kernel that requires a Postprocessor you may have an input file with "pp = my_pp", this function requires the "pp" name as input (see .../moose_test/functions/PostprocessorFunction.C)

see getPostprocessorValueByName getPostprocessorValueOldByName getPostprocessorValueOlderByName

Definition at line 29 of file PostprocessorInterface.C.

Referenced by GeneralUserObject::getPostprocessorValue(), and AuxKernel::getPostprocessorValue().

30 {
31  // Return the default if the Postprocessor does not exist and a default does, otherwise
32  // continue as usual
35  else
36  return _pi_feproblem.getPostprocessorValue(_ppi_params.get<PostprocessorName>(name));
37 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
PostprocessorValue & getPostprocessorValue(const PostprocessorName &name)
Get a reference to the value associated with the postprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueByName ( const PostprocessorName &  name)
inherited

Retrieve the value of the Postprocessor.

Parameters
namePostprocessor name (see below)
Returns
A reference to the desired value

The name required by this method is the name defined in the input file. For example, if you have a Kernel that requires a Postprocessor you may have an input file with "pp = my_pp", this method requires the "my_pp" name as input (see .../moose_test/functions/PostprocessorFunction.C)

see getPostprocessorValue getPostprocessorValueOld getPostprocessorValueOlder

Definition at line 62 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel(), GeneralUserObject::getPostprocessorValueByName(), AuxKernel::getPostprocessorValueByName(), and EigenExecutionerBase::inversePowerIteration().

63 {
65 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
PostprocessorValue & getPostprocessorValue(const PostprocessorName &name)
Get a reference to the value associated with the postprocessor.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOld ( const std::string &  name)
inherited

Definition at line 40 of file PostprocessorInterface.C.

41 {
42  // Return the default if the Postprocessor does not exist and a default does, otherwise
43  // continue as usual
46  else
47  return _pi_feproblem.getPostprocessorValueOld(_ppi_params.get<PostprocessorName>(name));
48 }
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOldByName ( const PostprocessorName &  name)
inherited

Definition at line 68 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel().

69 {
71 }
PostprocessorValue & getPostprocessorValueOld(const std::string &name)
Get the reference to the old value of a post-processor.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlder ( const std::string &  name)
inherited

Definition at line 51 of file PostprocessorInterface.C.

52 {
53  // Return the default if the Postprocessor does not exist and a default does, otherwise
54  // continue as usual
57  else
58  return _pi_feproblem.getPostprocessorValueOlder(_ppi_params.get<PostprocessorName>(name));
59 }
bool hasPostprocessor(const std::string &name) const
Determine if the Postprocessor exists.
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
PostprocessorValue & getPostprocessorValueOlder(const std::string &name)
Get the reference to the older value of a post-processor.
bool hasDefaultPostprocessorValue(const std::string &name) const
Returns true if a default PostprocessorValue is defined.
const PostprocessorValue & getDefaultPostprocessorValue(const std::string &name, bool suppress_error=false) const
Get the default value for a postprocessor added with addPostprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
const PostprocessorValue & PostprocessorInterface::getPostprocessorValueOlderByName ( const PostprocessorName &  name)
inherited

Definition at line 74 of file PostprocessorInterface.C.

75 {
77 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
PostprocessorValue & getPostprocessorValueOlder(const std::string &name)
Get the reference to the older value of a post-processor.
Real Transient::getSolutionChangeNorm ( )

Get the Relative L2 norm of the change in the solution.

Definition at line 769 of file Transient.C.

Referenced by setTimeOld(), and TransientMultiApp::solveStep().

770 {
771  return _solution_change_norm;
772 }
Real _solution_change_norm
Definition: Transient.h:298
Real Transient::getStartTime ( )
inline

Return the start time.

Returns
The start time

Definition at line 166 of file Transient.h.

Referenced by TimeSequenceStepperBase::setupSequence().

166 { return _start_time; }
Real _start_time
Definition: Transient.h:277
virtual Real Transient::getTime ( )
inlinevirtual

Get the current time.

Definition at line 103 of file Transient.h.

Referenced by TransientMultiApp::solveStep().

103 { return _time; };
Real & _time
Current time.
Definition: Transient.h:228
Moose::TimeIntegratorType Transient::getTimeScheme ( )
inline

Get the time scheme used.

Returns
MooseEnum with the time scheme

Definition at line 142 of file Transient.h.

142 { return _time_scheme; }
Moose::TimeIntegratorType _time_scheme
Definition: Transient.h:222
TimeStepper* Transient::getTimeStepper ( )
inline

Pointer to the TimeStepper.

Returns
Pointer to the time stepper for this Executioner

Definition at line 124 of file Transient.h.

124 { return _time_stepper.get(); }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
std::string Transient::getTimeStepperName ( )
overridevirtual

Get the timestepper.

Reimplemented from Executioner.

Definition at line 821 of file Transient.C.

Referenced by setTimeStepper().

822 {
823  if (_time_stepper)
824  {
825  TimeStepper & ts = *_time_stepper;
826  return demangle(typeid(ts).name());
827  }
828  else
829  return std::string();
830 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
Base class for time stepping.
Definition: TimeStepper.h:31
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
template<class T >
const T & UserObjectInterface::getUserObject ( const std::string &  name)
inherited

Get an user object with a given parameter name.

Parameters
nameThe name of the parameter key of the user object to retrieve
Returns
The user object with name associated with the parameter 'name'

Definition at line 85 of file UserObjectInterface.h.

86 {
87  unsigned int tid = isDiscreteUserObject(getUserObjectBase(name)) ? _uoi_tid : 0;
88  return _uoi_feproblem.getUserObject<T>(_uoi_params.get<UserObjectName>(name), tid);
89 }
bool isDiscreteUserObject(const UserObject &uo) const
Check if the user object is a DiscreteElementUserObject.
const InputParameters & _uoi_params
Parameters of the object with this interface.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
THREAD_ID _uoi_tid
Thread ID.
const T & getUserObject(const std::string &name, unsigned int tid=0)
Get the user object by its name.
const UserObject & getUserObjectBase(const std::string &name)
Get an user object with a given parameter name.
const UserObject & UserObjectInterface::getUserObjectBase ( const std::string &  name)
inherited

Get an user object with a given parameter name.

Parameters
nameThe name of the parameter key of the user object to retrieve
Returns
The user object with name associated with the parameter 'name'

Definition at line 28 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObject(), InitialCondition::getUserObjectBase(), and AuxKernel::getUserObjectBase().

29 {
30  return _uoi_feproblem.getUserObjectBase(_uoi_params.get<UserObjectName>(name));
31 }
const InputParameters & _uoi_params
Parameters of the object with this interface.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const UserObject & getUserObjectBase(const std::string &name)
Get the user object by its name.
const UserObject & UserObjectInterface::getUserObjectBaseByName ( const std::string &  name)
inherited

Get an user object with a given name.

Parameters
nameThe name of the user object to retrieve
Returns
The user object with the name

Definition at line 34 of file UserObjectInterface.C.

Referenced by UserObjectInterface::getUserObjectByName().

35 {
36  return _uoi_feproblem.getUserObjectBase(name);
37 }
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const UserObject & getUserObjectBase(const std::string &name)
Get the user object by its name.
template<class T >
const T & UserObjectInterface::getUserObjectByName ( const std::string &  name)
inherited

Get an user object with a given name.

Parameters
nameThe name of the user object to retrieve
Returns
The user object with the name

Definition at line 93 of file UserObjectInterface.h.

94 {
95  unsigned int tid = isDiscreteUserObject(getUserObjectBaseByName(name)) ? _uoi_tid : 0;
96  return _uoi_feproblem.getUserObject<T>(name, tid);
97 }
bool isDiscreteUserObject(const UserObject &uo) const
Check if the user object is a DiscreteElementUserObject.
const UserObject & getUserObjectBaseByName(const std::string &name)
Get an user object with a given name.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
THREAD_ID _uoi_tid
Thread ID.
const T & getUserObject(const std::string &name, unsigned int tid=0)
Get the user object by its name.
bool PostprocessorInterface::hasPostprocessor ( const std::string &  name) const
inherited

Determine if the Postprocessor exists.

Parameters
nameThe name of the Postprocessor parameter
Returns
True if the Postprocessor exists
See also
hasPostprocessorByName getPostprocessorValue

Definition at line 80 of file PostprocessorInterface.C.

Referenced by EigenKernel::EigenKernel(), PostprocessorInterface::getPostprocessorValue(), PostprocessorInterface::getPostprocessorValueOld(), PostprocessorInterface::getPostprocessorValueOlder(), and TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction().

81 {
82  return _pi_feproblem.hasPostprocessor(_ppi_params.get<PostprocessorName>(name));
83 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
const InputParameters & _ppi_params
PostprocessorInterface Parameters.
bool PostprocessorInterface::hasPostprocessorByName ( const PostprocessorName &  name)
inherited

Determine if the Postprocessor exists.

Parameters
nameThe name of the Postprocessor
Returns
True if the Postprocessor exists
See also
hasPostprocessor getPostprocessorValueByName

Definition at line 86 of file PostprocessorInterface.C.

Referenced by VectorOfPostprocessors::VectorOfPostprocessors().

87 {
88  return _pi_feproblem.hasPostprocessor(name);
89 }
FEProblemBase & _pi_feproblem
Reference the the FEProblemBase class.
bool hasPostprocessor(const std::string &name)
Check existence of the postprocessor.
void Transient::incrementStepOrReject ( )
virtual

This is where the solve step is actually incremented.

Definition at line 353 of file Transient.C.

Referenced by TransientMultiApp::advanceStep(), execute(), and TransientMultiApp::solveStep().

354 {
355  if (lastSolveConverged())
356  {
357  if (_xfem_repeat_step)
358  {
359  _time = _time_old;
360  }
361  else
362  {
363 #ifdef LIBMESH_ENABLE_AMR
365 #endif
366 
367  _time_old = _time; // = _time_old + _dt;
368  _t_step++;
369 
371 
372  // Advance (and Output) MultiApps if we were doing Picard iterations
373  if (_picard_max_its > 1)
374  {
377  }
378  }
379  }
380  else
381  {
384  _time_stepper->rejectStep();
385  _time = _time_old;
386  }
387 
388  _first = false;
389 }
virtual bool lastSolveConverged() override
Whether or not the last solve converged.
Definition: Transient.C:745
Real _picard_max_its
Definition: Transient.h:287
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:248
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
Real & _time_old
Previous time.
Definition: Transient.h:230
virtual void advanceState()
Advance all of the state holding vectors / datastructures so that we can move to the next timestep...
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
virtual void adaptMesh()
bool & _first
Is it our first time through the execution loop?
Definition: Transient.h:239
Real & _time
Current time.
Definition: Transient.h:228
void restoreMultiApps(ExecFlagType type, bool force=false)
Restore the MultiApps associated with the ExecFlagType.
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
void advanceMultiApps(ExecFlagType type)
Advance the MultiApps associated with the ExecFlagType.
int & _t_step
Current timestep.
Definition: Transient.h:226
void Transient::init ( )
overridevirtual

Initialize the executioner.

We have a default "dt" set in the Transient parameters but it's possible for users to set other parameters explicitly that could provide a better calculated "dt". Rather than provide difficult to understand behavior using the default "dt" in this case, we'll calculate "dt" properly.

Reimplemented from Executioner.

Definition at line 236 of file Transient.C.

Referenced by TransientMultiApp::setupApp().

237 {
238  if (!_time_stepper.get())
239  {
240  InputParameters pars = _app.getFactory().getValidParams("ConstantDT");
241  pars.set<FEProblemBase *>("_fe_problem_base") = &_problem;
242  pars.set<Transient *>("_executioner") = this;
243 
251  if (!_pars.isParamSetByAddParam("end_time") && !_pars.isParamSetByAddParam("num_steps") &&
253  pars.set<Real>("dt") = (getParam<Real>("end_time") - getParam<Real>("start_time")) /
254  static_cast<Real>(getParam<unsigned int>("num_steps"));
255  else
256  pars.set<Real>("dt") = getParam<Real>("dt");
257 
258  pars.set<bool>("reset_dt") = getParam<bool>("reset_dt");
259  _time_stepper = _app.getFactory().create<TimeStepper>("ConstantDT", "TimeStepper", pars);
260  }
261 
263  _time_stepper->init();
264 
265  if (_app.isRestarting())
266  _time_old = _time;
267 
269 
270  // If this is the first step
271  if (_t_step == 0)
272  _t_step = 1;
273 
274  if (_t_step > 1) // Recover case
275  _dt_old = _dt;
276 
277  else
278  {
279  computeDT();
280  // _dt = computeConstrainedDT();
281  _dt = getDT();
282  }
283 }
virtual Real getDT()
Definition: Transient.C:694
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:46
Transient executioners usually loop through a number of timesteps...
Definition: Transient.h:36
Object is evaluated only once at the beginning of the simulation.
Definition: MooseTypes.h:94
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:26
virtual void computeDT()
Definition: Transient.C:347
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Base class for time stepping.
Definition: TimeStepper.h:31
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Factory & getFactory()
Retrieve the Factory associated with this App.
Definition: MooseApp.h:253
Real & _time_old
Previous time.
Definition: Transient.h:230
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
bool isParamSetByAddParam(const std::string &name) const
Returns whether or not the parameter was set due to addParam.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:232
Real & _dt_old
Definition: Transient.h:233
Real & _time
Current time.
Definition: Transient.h:228
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
virtual void initialSetup()
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:613
int & _t_step
Current timestep.
Definition: Transient.h:226
virtual void outputStep(ExecFlagType type)
Output the current step.
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
bool Transient::keepGoing ( )
virtual

Transient loop will continue as long as this keeps returning true.

Definition at line 700 of file Transient.C.

Referenced by execute().

701 {
702  bool keep_going = !_problem.isSolveTerminationRequested();
703 
704  // Check for stop condition based upon steady-state check flag:
706  {
707  // Check solution difference relative norm against steady-state tolerance
709  {
710  _console << "Steady-State Solution Achieved at time: " << _time << std::endl;
711  // Output last solve if not output previously by forcing it
712  keep_going = false;
713  }
714  else // Keep going
715  {
716  // Update solution norm for next time step
718  // Print steady-state relative error norm
719  _console << "Steady-State Relative Differential Norm: " << _sln_diff_norm << std::endl;
720  }
721  }
722 
723  // Check for stop condition based upon number of simulation steps and/or solution end time:
724  if (static_cast<unsigned int>(_t_step) > _num_steps)
725  keep_going = false;
726 
727  if ((_time > _end_time) || (fabs(_time - _end_time) <= _timestep_tolerance))
728  keep_going = false;
729 
730  if (!lastSolveConverged() && _abort)
731  {
732  _console << "Aborting as solve did not converge and input selected to abort" << std::endl;
733  keep_going = false;
734  }
735 
736  return keep_going;
737 }
virtual const NumericVector< Number > *& currentSolution() override
The solution vector that is currently being operated on.
virtual bool lastSolveConverged() override
Whether or not the last solve converged.
Definition: Transient.C:745
virtual bool isSolveTerminationRequested()
Check of termination has been requested.
Definition: Problem.h:51
NonlinearSystemBase & getNonlinearSystemBase()
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:248
unsigned int _num_steps
Definition: Transient.h:255
Real & _sln_diff_norm
Definition: Transient.h:265
Real _timestep_tolerance
Definition: Transient.h:278
bool _trans_ss_check
Steady state detection variables:
Definition: Transient.h:262
bool _abort
Definition: Transient.h:270
Real & _time
Current time.
Definition: Transient.h:228
Real _ss_tmin
Definition: Transient.h:264
Real & _old_time_solution_norm
Definition: Transient.h:266
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Real _end_time
Definition: Transient.h:252
int & _t_step
Current timestep.
Definition: Transient.h:226
Real _ss_check_tol
Definition: Transient.h:263
bool Transient::lastSolveConverged ( )
overridevirtual

Whether or not the last solve converged.

Reimplemented from Executioner.

Definition at line 745 of file Transient.C.

Referenced by endStep(), incrementStepOrReject(), keepGoing(), TransientMultiApp::solveStep(), solveStep(), and takeStep().

746 {
747  return _multiapps_converged && _time_stepper->converged();
748 }
bool & _multiapps_converged
Whether or not the multiapps failed during the last timestem.
Definition: Transient.h:242
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
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(), 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(), 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(), AB2PredictorCorrector::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(), 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
Real Transient::numPicardIts ( )
inline

Get the number of Picard iterations performed.

Returns
Number of Picard iterations performed

Definition at line 206 of file Transient.h.

Referenced by NumPicardIterations::getValue().

206 { return _picard_it + 1; }
int & _picard_it
Picard Related.
Definition: Transient.h:286
const InputParameters& MooseObject::parameters ( ) const
inlineinherited
void Transient::parentOutputPositionChanged ( )
inlineoverridevirtual

Can be used by subsclasses to call parentOutputPositionChanged() on the underlying FEProblemBase.

Reimplemented from Executioner.

Definition at line 198 of file Transient.h.

void parentOutputPositionChanged()
Calls parentOutputPositionChanged() on all sub apps.
FEProblemBase & _fe_problem
Definition: Executioner.h:126
void Transient::postExecute ( )
overridevirtual

Override this for actions that should take place after execution.

Reimplemented from Executioner.

Definition at line 757 of file Transient.C.

Referenced by execute().

758 {
759  _time_stepper->postExecute();
760 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
void Executioner::postSolve ( )
virtualinherited

Override this for actions that should take place after execution.

Definition at line 150 of file Executioner.C.

Referenced by Steady::execute(), solveStep(), InversePowerMethod::takeStep(), and NonlinearEigen::takeStep().

151 {
152 }
void Transient::postStep ( )
virtual

Definition at line 292 of file Transient.C.

Referenced by TransientMultiApp::advanceStep(), execute(), and TransientMultiApp::solveStep().

293 {
294  _time_stepper->postStep();
295 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
void Transient::preExecute ( )
overridevirtual

Override this for actions that should take place before execution.

Reimplemented from Executioner.

Definition at line 751 of file Transient.C.

Referenced by execute(), and TransientMultiApp::setupApp().

752 {
753  _time_stepper->preExecute();
754 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
void Executioner::preSolve ( )
virtualinherited

Override this for actions that should take place before execution.

Definition at line 145 of file Executioner.C.

Referenced by Steady::execute(), solveStep(), InversePowerMethod::takeStep(), and NonlinearEigen::takeStep().

146 {
147 }
void Transient::preStep ( )
virtual

Definition at line 286 of file Transient.C.

Referenced by execute(), and TransientMultiApp::solveStep().

287 {
288  _time_stepper->preStep();
289 }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
Problem & Executioner::problem ( )
virtualinherited

Deprecated: Return a reference to this Executioner's Problem instance.

Definition at line 155 of file Executioner.C.

Referenced by Executioner::addAttributeReporter().

156 {
157  mooseDoOnce(mooseWarning("This method is deprecated, use feProblem() instead"));
158  return _fe_problem;
159 }
void mooseWarning(Args &&...args) const
Definition: MooseObject.h:89
FEProblemBase & _fe_problem
Definition: Executioner.h:126
Real Transient::relativeSolutionDifferenceNorm ( )
virtual

The relative L2 norm of the difference between solution and old solution vector.

Definition at line 833 of file Transient.C.

Referenced by RelativeSolutionDifferenceNorm::getValue(), numPicardIts(), and solveStep().

834 {
835  const NumericVector<Number> & current_solution =
837  const NumericVector<Number> & old_solution = _problem.getNonlinearSystemBase().solutionOld();
838 
839  _sln_diff = current_solution;
840  _sln_diff -= old_solution;
841 
842  return (_sln_diff.l2_norm() / current_solution.l2_norm());
843 }
virtual const NumericVector< Number > *& currentSolution() override
The solution vector that is currently being operated on.
NonlinearSystemBase & getNonlinearSystemBase()
virtual NumericVector< Number > & solutionOld()=0
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
NumericVector< Number > & _sln_diff
The difference of current and old solutions.
Definition: Transient.h:301
void Transient::setTargetTime ( Real  target_time)
virtual

Can be used to set the next "target time" which is a time to nail perfectly.

Useful for driving MultiApps.

Definition at line 763 of file Transient.C.

Referenced by TransientMultiApp::solveStep().

764 {
765  _target_time = target_time;
766 }
Real & _target_time
Definition: Transient.h:279
virtual void Transient::setTime ( Real  t)
inlinevirtual

Set the current time.

Definition at line 108 of file Transient.h.

108 { _time = t; };
Real & _time
Current time.
Definition: Transient.h:228
virtual void Transient::setTimeOld ( Real  t)
inlinevirtual

Set the old time.

Definition at line 113 of file Transient.h.

113 { _time_old = t; };
Real & _time_old
Previous time.
Definition: Transient.h:230
void Transient::setTimeStepper ( std::shared_ptr< TimeStepper ts)
inline

Set the timestepper to use.

Parameters
tsThe TimeStepper to use

Definition at line 131 of file Transient.h.

131 { _time_stepper = ts; }
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
void Transient::setupTimeIntegrator ( )
protected

Definition at line 775 of file Transient.C.

Referenced by Transient().

776 {
778  mooseError("You cannot specify time_scheme in the Executioner and independently add a "
779  "TimeIntegrator to the system at the same time");
780 
782  {
783  // backwards compatibility
784  std::string ti_str;
785  using namespace Moose;
786 
787  switch (_time_scheme)
788  {
789  case TI_IMPLICIT_EULER:
790  ti_str = "ImplicitEuler";
791  break;
792  case TI_EXPLICIT_EULER:
793  ti_str = "ExplicitEuler";
794  break;
795  case TI_CRANK_NICOLSON:
796  ti_str = "CrankNicolson";
797  break;
798  case TI_BDF2:
799  ti_str = "BDF2";
800  break;
802  ti_str = "ExplicitMidpoint";
803  break;
804  case TI_LSTABLE_DIRK2:
805  ti_str = "LStableDirk2";
806  break;
808  ti_str = "ExplicitTVDRK2";
809  break;
810  default:
811  mooseError("Unknown scheme");
812  break;
813  }
814 
815  InputParameters params = _app.getFactory().getValidParams(ti_str);
816  _problem.addTimeIntegrator(ti_str, ti_str, params);
817  }
818 }
Moose::TimeIntegratorType _time_scheme
Definition: Transient.h:222
bool hasTimeIntegrator() const
Returns whether or not this Problem has a TimeIntegrator.
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:26
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Factory & getFactory()
Retrieve the Factory associated with this App.
Definition: MooseApp.h:253
virtual void addTimeIntegrator(const std::string &type, const std::string &name, InputParameters parameters)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:108
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
Definition: Moose.h:84
void Transient::solveStep ( Real  input_dt = -1.0)
protectedvirtual

This should execute the solve for one timestep.

Definition at line 421 of file Transient.C.

Referenced by numPicardIts(), and takeStep().

422 {
423  _dt_old = _dt;
424 
425  if (input_dt == -1.0)
427  else
428  _dt = input_dt;
429 
430  Real current_dt = _dt;
431 
433 
434  // Increment time
435  _time = _time_old + _dt;
436 
437  if (_picard_max_its > 1)
438  {
439  _console << "\nBeginning Picard Iteration " << _picard_it << "\n" << std::endl;
440 
441  if (_picard_it == 0) // First Picard iteration - need to save off the initial nonlinear residual
442  {
444  _console << "Initial Picard Norm: " << _picard_initial_norm << '\n';
445  }
446  }
447 
450 
452  return;
453 
454  preSolve();
455  _time_stepper->preSolve();
456 
458 
460 
461  if (_picard_max_its > 1)
462  {
464 
465  _console << "Picard Norm after TIMESTEP_BEGIN MultiApps: " << _picard_timestep_begin_norm
466  << '\n';
467  }
468 
469  // Perform output for timestep begin
471 
472  // Update warehouse active objects
474 
475  // Prepare to relax variables.
476  // _prev_time == _time is like _picard_it > 0, but it also works for the sub-app
477  if (_prev_time == _time && _relax_factor != 1.0)
478  {
480  NumericVector<Number> & solution = _nl_system.solution();
481  NumericVector<Number> & relax_previous = _nl_system.getVector("relax_previous");
482 
483  // Save off the current solution
484  relax_previous = solution;
485 
486  // Snag all of the local dof indices for all of these variables
487  System & libmesh_nl_system = _nl_system.system();
488  AllLocalDofIndicesThread aldit(libmesh_nl_system, _relaxed_vars);
489  ConstElemRange & elem_range = *_fe_problem.mesh().getActiveLocalElementRange();
490  Threads::parallel_reduce(elem_range, aldit);
491 
492  _relaxed_dofs = aldit._all_dof_indices;
493  }
494 
495  _time_stepper->step();
496 
497  // Relax the "relaxed_variables" if this is not the first Picard iteration of the timestep.
498  // _prev_time == _time is like _picard_it > 0, but it also works for the sub-app
499  if (_prev_time == _time && _relax_factor != 1.0)
500  {
502  NumericVector<Number> & solution = _nl_system.solution();
503  NumericVector<Number> & relax_previous = _nl_system.getVector("relax_previous");
504  for (const auto & dof : _relaxed_dofs)
505  solution.set(dof,
506  (relax_previous(dof) * (1.0 - _relax_factor)) + (solution(dof) * _relax_factor));
507  solution.close();
508  _nl_system.update();
509  }
510  // This keeps track of Picard iteration, even if this is the sub-app.
511  // It is used for relaxation logic
512  _prev_time = _time;
513 
514  // We know whether or not the nonlinear solver thinks it converged, but we need to see if the
515  // executioner concurs
516  if (lastSolveConverged())
517  {
518  _console << COLOR_GREEN << " Solve Converged!" << COLOR_DEFAULT << std::endl;
519 
521  {
522  _console << "XFEM modifying mesh, repeating step" << std::endl;
523  _xfem_repeat_step = true;
525  }
526  else
527  {
528  if (_problem.haveXFEM())
529  {
530  _xfem_repeat_step = false;
531  _xfem_update_count = 0;
532  _console << "XFEM not modifying mesh, continuing" << std::endl;
533  }
534 
535  if (_picard_max_its <= 1)
536  _time_stepper->acceptStep();
537 
540 
543 
546 
548  return;
549  }
550  }
551  else
552  {
553  _console << COLOR_RED << " Solve Did NOT Converge!" << COLOR_DEFAULT << std::endl;
554 
555  // Perform the output of the current, failed time step (this only occurs if desired)
557  }
558 
559  postSolve();
560  _time_stepper->postSolve();
561 
562  if (_picard_max_its > 1 && lastSolveConverged())
563  {
565 
566  _console << "Picard Norm after TIMESTEP_END MultiApps: " << _picard_timestep_end_norm << '\n';
567 
568  Real max_norm = std::max(_picard_timestep_begin_norm, _picard_timestep_end_norm);
569 
570  Real max_relative_drop = max_norm / _picard_initial_norm;
571 
572  if (max_norm < _picard_abs_tol || max_relative_drop < _picard_rel_tol)
573  {
574  _console << "Picard converged!" << std::endl;
575 
576  _picard_converged = true;
577  return;
578  }
579  }
580 
581  _dt = current_dt; // _dt might be smaller than this at this point for multistep methods
582  _time = _time_old;
583 }
ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems...
Definition: MooseMesh.C:724
virtual bool lastSolveConverged() override
Whether or not the last solve converged.
Definition: Transient.C:745
Real _picard_abs_tol
Definition: Transient.h:293
bool & _picard_converged
Definition: Transient.h:288
Real _prev_time
The _time when this app solved last.
Definition: Transient.h:311
Real _picard_max_its
Definition: Transient.h:287
Real & _picard_initial_norm
Definition: Transient.h:289
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
void updateActiveObjects()
Update the active objects in the warehouses.
virtual void onTimestepEnd() override
bool & _multiapps_converged
Whether or not the multiapps failed during the last timestem.
Definition: Transient.h:242
bool haveXFEM()
Find out whether the current analysis is using XFEM.
Real & _picard_timestep_end_norm
Definition: Transient.h:291
Real _relax_factor
Relaxation factor for Picard Iteration.
Definition: Transient.h:306
bool _xfem_repeat_step
Whether step should be repeated due to xfem modifying the mesh.
Definition: Transient.h:248
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
unsigned int _xfem_update_count
Definition: Transient.h:249
virtual void timestepSetup()
virtual void update()
Update the system (doing libMesh magic)
Definition: SystemBase.C:665
Real & _time_old
Previous time.
Definition: Transient.h:230
Grab all the local dof indices for the variables passed in, in the system passed in.
virtual NumericVector< Number > & solution() override
std::shared_ptr< TimeStepper > _time_stepper
Definition: Transient.h:223
void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
virtual Real computeConstrainedDT()
Definition: Transient.C:613
std::vector< std::string > _relaxed_vars
The transferred variables that are going to be relaxed.
Definition: Transient.h:314
int & _picard_it
Picard Related.
Definition: Transient.h:286
virtual bool updateMeshXFEM()
Update the mesh due to changing XFEM cuts.
std::set< dof_id_type > _relaxed_dofs
The DoFs associates with all of the relaxed variables.
Definition: Transient.h:317
Real & _sln_diff_norm
Definition: Transient.h:265
Real & _dt
Current delta t... or timestep size.
Definition: Transient.h:232
unsigned int _max_xfem_update
Definition: Transient.h:250
Real & _dt_old
Definition: Transient.h:233
Real & _picard_timestep_begin_norm
Definition: Transient.h:290
virtual void preSolve()
Override this for actions that should take place before execution.
Definition: Executioner.C:145
Forces execution on failed solve (output only)
Definition: MooseTypes.h:108
Real & _time
Current time.
Definition: Transient.h:228
Real _solution_change_norm
Definition: Transient.h:298
virtual System & system() override
Get the reference to the libMesh system.
Real _picard_rel_tol
Definition: Transient.h:292
virtual void onTimestepBegin() override
Nonlinear system to be solved.
virtual Real relativeSolutionDifferenceNorm()
The relative L2 norm of the difference between solution and old solution vector.
Definition: Transient.C:833
virtual Real computeResidualL2Norm()
Computes the residual using whatever is sitting in the current solution vector then returns the L2 no...
virtual MooseMesh & mesh() override
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
virtual void postSolve()
Override this for actions that should take place after execution.
Definition: Executioner.C:150
virtual NonlinearSystem & getNonlinearSystem()
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector.
Definition: SystemBase.C:598
virtual void outputStep(ExecFlagType type)
Output the current step.
void execTransfers(ExecFlagType type)
Execute the Transfers associated with the ExecFlagType.
FEProblemBase & _fe_problem
Definition: Executioner.h:126
std::set<Real>& Transient::syncTimes ( )
inline

Get the set of sync times.

Returns
The reference to the set of sync times

Definition at line 148 of file Transient.h.

148 { return _sync_times; }
std::set< Real > & _sync_times
Definition: Transient.h:268
void Transient::takeStep ( Real  input_dt = -1.0)
virtual

Do whatever is necessary to advance one step.

Definition at line 392 of file Transient.C.

Referenced by execute(), and TransientMultiApp::solveStep().

393 {
394  _picard_it = 0;
395 
398 
399  while (_picard_it < _picard_max_its && _picard_converged == false)
400  {
401  // For every iteration other than the first, we need to restore the state of the MultiApps
402  if (_picard_it > 0)
403  {
406  }
407 
408  solveStep(input_dt);
409 
410  // If the last solve didn't converge then we need to exit this step completely (even in the case
411  // of Picard)
412  // So we can retry...
413  if (!lastSolveConverged())
414  return;
415 
416  ++_picard_it;
417  }
418 }
virtual bool lastSolveConverged() override
Whether or not the last solve converged.
Definition: Transient.C:745
bool & _picard_converged
Definition: Transient.h:288
Real _picard_max_its
Definition: Transient.h:287
FEProblemBase & _problem
Here for backward compatibility.
Definition: Transient.h:220
Object is evaluated at the end of every time step.
Definition: MooseTypes.h:100
virtual void solveStep(Real input_dt=-1.0)
This should execute the solve for one timestep.
Definition: Transient.C:421
int & _picard_it
Picard Related.
Definition: Transient.h:286
void backupMultiApps(ExecFlagType type)
Backup the MultiApps associated with the ExecFlagType.
void restoreMultiApps(ExecFlagType type, bool force=false)
Restore the MultiApps associated with the ExecFlagType.
Object is evaluated at the beginning of every time step.
Definition: MooseTypes.h:102
Real& Transient::timestepTol ( )
inline

Get the timestep tolerance.

Returns
The timestep tolerance

Definition at line 178 of file Transient.h.

Referenced by TransientMultiApp::solveStep().

178 { return _timestep_tolerance; }
Real _timestep_tolerance
Definition: Transient.h:278
Real Transient::unconstrainedDT ( )
inline

Get the unconstrained dt.

Returns
Value of dt before constraints were applied

Definition at line 196 of file Transient.h.

Referenced by IterationAdaptiveDT::acceptStep().

196 { return _unconstrained_dt; }
Real & _unconstrained_dt
Definition: Transient.h:235
bool& Transient::verbose ( )
inline

Get the verbose output flag.

Returns
The verbose output flag

Definition at line 184 of file Transient.h.

184 { return _verbose; }
bool _verbose
should detailed diagnostic output be printed
Definition: Transient.h:296

Member Data Documentation

bool Transient::_abort
protected

Definition at line 270 of file Transient.h.

Referenced by keepGoing().

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 108 of file MooseObject.h.

Referenced by AB2PredictorCorrector::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(), execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MooseObject::getMooseApp(), InversePowerMethod::init(), NonlinearEigen::init(), 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(), setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient(), and Console::write().

bool& Transient::_at_sync_point
protected

Definition at line 236 of file Transient.h.

Referenced by atSyncPoint(), and computeConstrainedDT().

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(), computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualType(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::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(), 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(), solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), FEProblemBase::useFECache(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

Real& Transient::_dt
protected

Current delta t... or timestep size.

Definition at line 232 of file Transient.h.

Referenced by computeConstrainedDT(), endStep(), init(), solveStep(), and Transient().

Real& Transient::_dt_old
protected

Definition at line 233 of file Transient.h.

Referenced by init(), and solveStep().

Real Transient::_dtmax
protected

Definition at line 254 of file Transient.h.

Referenced by dtMax().

Real Transient::_dtmin
protected

Definition at line 253 of file Transient.h.

Referenced by dtMin().

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 Transient::_end_time
protected

Definition at line 252 of file Transient.h.

Referenced by endTime(), keepGoing(), and Transient().

FEProblemBase& Executioner::_fe_problem
protectedinherited
bool& Transient::_first
protected

Is it our first time through the execution loop?

Definition at line 239 of file Transient.h.

Referenced by execute(), and incrementStepOrReject().

Real Executioner::_initial_residual_norm
protectedinherited

Initial Residual Variables.

Definition at line 129 of file Executioner.h.

bool& Transient::_last_solve_converged
protected

Whether or not the last solve converged.

Definition at line 245 of file Transient.h.

Referenced by endStep().

unsigned int Transient::_max_xfem_update
protected

Definition at line 250 of file Transient.h.

Referenced by solveStep().

bool& Transient::_multiapps_converged
protected

Whether or not the multiapps failed during the last timestem.

Definition at line 242 of file Transient.h.

Referenced by lastSolveConverged(), and solveStep().

int Transient::_n_startup_steps
protected

Definition at line 256 of file Transient.h.

Referenced by computeConstrainedDT().

const std::string& MooseObject::_name
protectedinherited
Real Transient::_next_interval_output_time
protected

Definition at line 274 of file Transient.h.

Referenced by computeConstrainedDT(), endStep(), and Transient().

unsigned int Transient::_num_steps
protected

Definition at line 255 of file Transient.h.

Referenced by keepGoing(), and Transient().

Real Executioner::_old_initial_residual_norm
protectedinherited

Definition at line 130 of file Executioner.h.

Real& Transient::_old_time_solution_norm
protected

Definition at line 266 of file Transient.h.

Referenced by keepGoing().

const InputParameters& MooseObject::_pars
protectedinherited
Real Transient::_picard_abs_tol
protected

Definition at line 293 of file Transient.h.

Referenced by solveStep().

bool& Transient::_picard_converged
protected

Definition at line 288 of file Transient.h.

Referenced by endStep(), solveStep(), and takeStep().

Real& Transient::_picard_initial_norm
protected

Definition at line 289 of file Transient.h.

Referenced by solveStep().

int& Transient::_picard_it
protected

Picard Related.

Number of Picard iterations to perform

Definition at line 286 of file Transient.h.

Referenced by numPicardIts(), solveStep(), and takeStep().

Real Transient::_picard_max_its
protected

Definition at line 287 of file Transient.h.

Referenced by incrementStepOrReject(), solveStep(), and takeStep().

Real Transient::_picard_rel_tol
protected

Definition at line 292 of file Transient.h.

Referenced by solveStep().

Real& Transient::_picard_timestep_begin_norm
protected

Definition at line 290 of file Transient.h.

Referenced by solveStep().

Real& Transient::_picard_timestep_end_norm
protected

Definition at line 291 of file Transient.h.

Referenced by solveStep().

Real Transient::_prev_time
protected

The _time when this app solved last.

This allows a sub-app to know if this is the first Picard iteration or not.

Definition at line 311 of file Transient.h.

Referenced by solveStep(), and Transient().

FEProblemBase& Transient::_problem
protected
Real Transient::_relax_factor
protected

Relaxation factor for Picard Iteration.

Definition at line 306 of file Transient.h.

Referenced by solveStep(), and Transient().

std::set<dof_id_type> Transient::_relaxed_dofs
protected

The DoFs associates with all of the relaxed variables.

Definition at line 317 of file Transient.h.

Referenced by solveStep().

std::vector<std::string> Transient::_relaxed_vars
protected

The transferred variables that are going to be relaxed.

Definition at line 314 of file Transient.h.

Referenced by solveStep().

std::string Executioner::_restart_file_base
protectedinherited

Definition at line 133 of file Executioner.h.

Referenced by Steady::Steady(), and Transient().

NumericVector<Number>& Transient::_sln_diff
protected

The difference of current and old solutions.

Definition at line 301 of file Transient.h.

Referenced by relativeSolutionDifferenceNorm().

Real& Transient::_sln_diff_norm
protected

Definition at line 265 of file Transient.h.

Referenced by keepGoing(), and solveStep().

Real Transient::_solution_change_norm
protected

Definition at line 298 of file Transient.h.

Referenced by getSolutionChangeNorm(), and solveStep().

std::vector<std::string> Executioner::_splitting
protectedinherited

Definition at line 136 of file Executioner.h.

Referenced by Steady::Steady(), and Transient().

Real Transient::_ss_check_tol
protected

Definition at line 263 of file Transient.h.

Referenced by keepGoing().

Real Transient::_ss_tmin
protected

Definition at line 264 of file Transient.h.

Referenced by keepGoing().

Real Transient::_start_time
protected

Definition at line 277 of file Transient.h.

Referenced by getStartTime(), and Transient().

unsigned int Transient::_steps_taken
protected

Definition at line 257 of file Transient.h.

Referenced by execute().

std::set<Real>& Transient::_sync_times
protected

Definition at line 268 of file Transient.h.

Referenced by syncTimes().

int& Transient::_t_step
protected

Current timestep.

Definition at line 226 of file Transient.h.

Referenced by computeConstrainedDT(), incrementStepOrReject(), init(), keepGoing(), and Transient().

Real& Transient::_target_time
protected

Definition at line 279 of file Transient.h.

Referenced by computeConstrainedDT(), and setTargetTime().

Real& Transient::_time
protected
bool& Transient::_time_interval
protected

if to use time interval output

Definition at line 273 of file Transient.h.

Referenced by computeConstrainedDT(), and endStep().

Real Transient::_time_interval_output_interval
protected

Definition at line 275 of file Transient.h.

Referenced by endStep().

Real& Transient::_time_old
protected

Previous time.

Definition at line 230 of file Transient.h.

Referenced by endStep(), incrementStepOrReject(), init(), setTimeOld(), solveStep(), and Transient().

Moose::TimeIntegratorType Transient::_time_scheme
protected

Definition at line 222 of file Transient.h.

Referenced by getTimeScheme(), and setupTimeIntegrator().

std::shared_ptr<TimeStepper> Transient::_time_stepper
protected
Real Transient::_timestep_tolerance
protected

Definition at line 278 of file Transient.h.

Referenced by computeConstrainedDT(), endStep(), keepGoing(), and timestepTol().

bool Transient::_trans_ss_check
protected

Steady state detection variables:

Definition at line 262 of file Transient.h.

Referenced by keepGoing().

Real& Transient::_unconstrained_dt
protected

Definition at line 235 of file Transient.h.

Referenced by computeConstrainedDT(), and unconstrainedDT().

bool Transient::_use_multiapp_dt
protected

Definition at line 280 of file Transient.h.

Referenced by computeConstrainedDT().

bool Transient::_verbose
protected

should detailed diagnostic output be printed

Definition at line 296 of file Transient.h.

Referenced by computeConstrainedDT(), and verbose().

bool Transient::_xfem_repeat_step
protected

Whether step should be repeated due to xfem modifying the mesh.

Definition at line 248 of file Transient.h.

Referenced by endStep(), incrementStepOrReject(), keepGoing(), and solveStep().

unsigned int Transient::_xfem_update_count
protected

Definition at line 249 of file Transient.h.

Referenced by solveStep().


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