Reference documentation for deal.II version 9.4.1
|
#include <deal.II/sundials/ida.h>
Public Types | |
enum | InitialConditionCorrection { none = 0 , use_y_diff = 1 , use_y_dot = 2 } |
Public Member Functions | |
AdditionalData (const double initial_time=0.0, const double final_time=1.0, const double initial_step_size=1e-2, const double output_period=1e-1, const double minimum_step_size=1e-6, const unsigned int maximum_order=5, const unsigned int maximum_non_linear_iterations=10, const double ls_norm_factor=0, const double absolute_tolerance=1e-6, const double relative_tolerance=1e-5, const bool ignore_algebraic_terms_for_errors=true, const InitialConditionCorrection &ic_type=use_y_diff, const InitialConditionCorrection &reset_type=use_y_diff, const unsigned int maximum_non_linear_iterations_ic=5) | |
void | add_parameters (ParameterHandler &prm) |
Public Attributes | |
double | initial_time |
double | final_time |
double | initial_step_size |
double | minimum_step_size |
double | absolute_tolerance |
double | relative_tolerance |
unsigned int | maximum_order |
double | output_period |
bool | ignore_algebraic_terms_for_errors |
InitialConditionCorrection | ic_type |
InitialConditionCorrection | reset_type |
unsigned | maximum_non_linear_iterations_ic |
unsigned int | maximum_non_linear_iterations |
double | ls_norm_factor |
Additional parameters that can be passed to the IDA class.
enum SUNDIALS::IDA::AdditionalData::InitialConditionCorrection |
IDA is a Differential Algebraic solver. As such, it requires initial conditions also for the first order derivatives. If you do not provide consistent initial conditions, (i.e., conditions for which F(y_dot(0), y(0), 0) = 0), you can ask SUNDIALS to compute initial conditions for you by specifying InitialConditionCorrection for the initial conditions both at the initial_time
(ic_type
) and after a reset has occurred (reset_type
).
|
inline |
Initialization parameters for IDA.
Global parameters:
initial_time | Initial time |
final_time | Final time |
initial_step_size | Initial step size |
output_period | Time interval between each output |
Running parameters:
minimum_step_size | Minimum step size |
maximum_order | Maximum BDF order |
maximum_non_linear_iterations | Maximum number of nonlinear iterations |
ls_norm_factor | Converting factor from the integrator tolerance to the linear solver tolerance iterations |
Error parameters:
absolute_tolerance | Absolute error tolerance |
relative_tolerance | Relative error tolerance |
ignore_algebraic_terms_for_errors | Ignore algebraic terms for error computations |
Initial condition correction parameters:
ic_type | Initial condition correction type |
reset_type | Initial condition correction type after restart |
maximum_non_linear_iterations_ic | Initial condition Newton max iterations |
|
inline |
Add all AdditionalData() parameters to the given ParameterHandler object. When the parameters are parsed from a file, the internal parameters are automatically updated.
The following parameters are declared:
These are one-to-one with the options you can pass at construction time.
The options you pass at construction time are set as default values in the ParameterHandler object prm
. You can later modify them by parsing a parameter file using prm
. The values of the parameter will be updated whenever the content of prm
is updated.
Make sure that this class lives longer than prm
. Undefined behavior will occur if you destroy this class, and then parse a parameter file using prm
.
double SUNDIALS::IDA< VectorType >::AdditionalData::initial_time |
double SUNDIALS::IDA< VectorType >::AdditionalData::final_time |
double SUNDIALS::IDA< VectorType >::AdditionalData::initial_step_size |
double SUNDIALS::IDA< VectorType >::AdditionalData::minimum_step_size |
double SUNDIALS::IDA< VectorType >::AdditionalData::absolute_tolerance |
double SUNDIALS::IDA< VectorType >::AdditionalData::relative_tolerance |
unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_order |
double SUNDIALS::IDA< VectorType >::AdditionalData::output_period |
bool SUNDIALS::IDA< VectorType >::AdditionalData::ignore_algebraic_terms_for_errors |
InitialConditionCorrection SUNDIALS::IDA< VectorType >::AdditionalData::ic_type |
Type of correction for initial conditions.
If you do not provide consistent initial conditions, (i.e., conditions for which \(F(y_dot(0), y(0), 0) = 0\)), you can ask SUNDIALS to compute initial conditions for you by using the ic_type
parameter at construction time.
Notice that you could in principle use this capabilities to solve for steady state problems by setting y_dot to zero, and asking to compute \(y(0)\) that satisfies \(F(0, y(0), 0) = 0\), however the nonlinear solver used inside IDA may not be robust enough for complex problems with several millions unknowns.
InitialConditionCorrection SUNDIALS::IDA< VectorType >::AdditionalData::reset_type |
Type of correction for initial conditions to be used after a solver restart.
If you do not have consistent initial conditions after a restart, (i.e., conditions for which F(y_dot(t_restart), y(t_restart), t_restart) = 0), you can ask SUNDIALS to compute the new initial conditions for you by using the reset_type
parameter at construction time.
unsigned SUNDIALS::IDA< VectorType >::AdditionalData::maximum_non_linear_iterations_ic |
unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_non_linear_iterations |
double SUNDIALS::IDA< VectorType >::AdditionalData::ls_norm_factor |