ASPECT
|
Static Public Member Functions | |
static void | declare_parameters (ParameterHandler &prm) |
Static Public Member Functions inherited from aspect::Plugins::InterfaceBase | |
static void | declare_parameters (ParameterHandler &prm) |
Static Public Member Functions inherited from aspect::SimulatorAccess< dim > | |
static void | get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point) |
Private Attributes | |
double | cut_back_factor |
bool | nonlinear_solver_just_failed |
unsigned int | maximum_number_of_repeats |
unsigned int | current_number_of_repeats |
A class that implements a time stepping plugin to repeat a time step if the nonlinear solver failed to converge in the specified number of iterations. The timestep size will be reduced by the given amount specified by the user and hopefully results in the nonlinear solver converging. If necessary, the timestep size will be repeatedly reduced.
This class is automatically enabled if the user specifies that he/she wants to do this.
Definition at line 46 of file repeat_on_nonlinear_fail.h.
aspect::TimeStepping::RepeatOnNonlinearFail< dim >::RepeatOnNonlinearFail | ( | ) |
Constructor.
|
overridevirtual |
Execute the logic of the plugin.
This is called after every time step to determine a) What to do (advance, repeat, etc.), see the Reaction enum. b) What timestep size to use.
Implements aspect::TimeStepping::Interface< dim >.
void aspect::TimeStepping::RepeatOnNonlinearFail< dim >::nonlinear_solver_has_failed | ( | ) | const |
This function notifies the plugin that the nonlinear solver failed.
|
overridevirtual |
The main execute() function.
Reimplemented from aspect::TimeStepping::Interface< dim >.
|
static |
|
overridevirtual |
Read the parameters this class declares from the parameter file. The default implementation of this function does not read any parameters. Consequently, derived classes do not have to overload this function if they do not take any runtime parameters. On the other hand, most plugins do have run-time parameters, and they may then overload this function.
Reimplemented from aspect::Plugins::InterfaceBase.
|
private |
Parameter to determine how much smaller the time step should be repeated as.
Definition at line 84 of file repeat_on_nonlinear_fail.h.
|
mutableprivate |
Enabled by nonlinear_solver_has_failed() to signal that this plugin needs to act in the current timestep;
Definition at line 90 of file repeat_on_nonlinear_fail.h.
|
private |
How many times should we try cutting the timestep size before giving up?
Definition at line 95 of file repeat_on_nonlinear_fail.h.
|
private |
How many times have we been repeating already in this timestep?
Definition at line 100 of file repeat_on_nonlinear_fail.h.