![]() |
deal.II version GIT relicensing-7155-g69b6eb7651 2026-11-23 20:20:01+00:00
|
#include <deal.II/sundials/ida.h>
Additional parameters that can be passed to the IDA class. Parameters are available independently of the SUNDIALS version. Options requiring a newer version are ignored when it is unavailable.
Public Types | |
| enum | InitialConditionCorrection { none = 0 , use_y_diff = 1 , use_y_dot = 2 } |
| 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(\dot
y(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).
| Enumerator | |
|---|---|
| none | Do not try to make initial conditions consistent. |
| use_y_diff | Compute the algebraic components of \(y\) and differential components of \(\dot y\), given the differential components of \(y\). This option requires that the user specifies differential and algebraic components in the function IDA::differential_components(). |
| use_y_dot | Compute all components of \(y\), given \(\dot y\). |
|
inline |
Initialization parameters for IDA. Parameters requiring a newer SUNDIALS version are ignored when that version is unavailable.
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 |
| maximum_step_size | Largest allowed integration step |
| maximum_number_of_steps | Maximum internal steps between outputs |
| maximum_error_test_failures | Maximum local error test failures |
| maximum_convergence_failures | Maximum nonlinear convergence failures |
| nonlinear_convergence_coefficient | Nonlinear convergence test coefficient |
| linear_tolerance_factor | Linear solver tolerance scale |
| increment_factor | Difference-quotient increment factor |
| linear_solution_scaling | Whether to scale linear solutions |
| delta_cj_lsetup | Jacobian setup threshold for Cj changes (SUNDIALS 6.2+) |
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 |
| maximum_number_of_steps_ic | Maximum IC correction steps |
| maximum_number_of_jacobians_ic | Maximum IC Jacobian evaluations |
| maximum_number_of_backtracks_ic | Maximum IC line-search backtracks |
| line_search_enabled_ic | Whether to use the IC line search |
| step_tolerance_ic | Minimum Newton correction for IC convergence |
| nonlinear_convergence_coefficient_ic | IC convergence coefficient |
| eta_min | Minimum adaptive step reduction factor (SUNDIALS 6.2+) |
| eta_max | Maximum adaptive step growth factor (SUNDIALS 6.2+) |
| eta_low | Low-order step reduction factor (SUNDIALS 6.2+) |
| eta_min_err_fail | Minimum factor after error failure (SUNDIALS 6.2+) |
| eta_conv_fail | Factor after convergence failure (SUNDIALS 6.2+) |
| eta_min_fixed | Minimum fixed-step growth factor (SUNDIALS 6.2+) |
| eta_max_fixed | Maximum fixed-step growth factor (SUNDIALS 6.2+) |
| maximum_constraint_failures | Constraint failures per step (SUNDIALS 7.6+) |
|
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::maximum_step_size = 0.0 |
| long int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_number_of_steps = 500 |
Maximum internal steps per IDASolve call (SUNDIALS default: 500). The counter is reset whenever an output step is accepted. If your simulation needs to take small time steps, but you only need output at very large time steps, you may want to increase this value.
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_error_test_failures = 10 |
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_convergence_failures = 10 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::nonlinear_convergence_coefficient = 0.33 |
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_number_of_steps_ic = 5 |
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_number_of_jacobians_ic = 4 |
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_number_of_backtracks_ic = 100 |
| bool SUNDIALS::IDA< VectorType >::AdditionalData::line_search_enabled_ic = true |
| double SUNDIALS::IDA< VectorType >::AdditionalData::step_tolerance_ic |
IC step tolerance (SUNDIALS default: unit roundoff^(2/3)).
| double SUNDIALS::IDA< VectorType >::AdditionalData::nonlinear_convergence_coefficient_ic = 0.0033 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::linear_tolerance_factor = 0.05 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::increment_factor = 1.0 |
| bool SUNDIALS::IDA< VectorType >::AdditionalData::linear_solution_scaling = true |
| double SUNDIALS::IDA< VectorType >::AdditionalData::delta_cj_lsetup = 0.25 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_min = 0.5 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_max = 2.0 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_low = 0.9 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_min_err_fail = 0.25 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_conv_fail = 0.25 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_min_fixed = 1.0 |
| double SUNDIALS::IDA< VectorType >::AdditionalData::eta_max_fixed = 2.0 |
| unsigned int SUNDIALS::IDA< VectorType >::AdditionalData::maximum_constraint_failures = 10 |
| 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 |