Reference documentation for deal.II version 9.6.0
|
#include <deal.II/sundials/kinsol.h>
Public Types | |
enum | SolutionStrategy { newton = KIN_NONE , linesearch = KIN_LINESEARCH , fixed_point = KIN_FP , picard = KIN_PICARD } |
enum | OrthogonalizationStrategy { modified_gram_schmidt = 0 , inverse_compact = 1 , classical_gram_schmidt = 2 , delayed_classical_gram_schmidt = 3 } |
Public Member Functions | |
AdditionalData (const SolutionStrategy &strategy=linesearch, const unsigned int maximum_non_linear_iterations=200, const double function_tolerance=0.0, const double step_tolerance=0.0, const bool no_init_setup=false, const unsigned int maximum_setup_calls=0, const double maximum_newton_step=0.0, const double dq_relative_error=0.0, const unsigned int maximum_beta_failures=0, const unsigned int anderson_subspace_size=0, const OrthogonalizationStrategy anderson_qr_orthogonalization=modified_gram_schmidt) | |
void | add_parameters (ParameterHandler &prm) |
Public Attributes | |
SolutionStrategy | strategy |
unsigned int | maximum_non_linear_iterations |
double | function_tolerance |
double | step_tolerance |
bool | no_init_setup |
unsigned int | maximum_setup_calls |
double | maximum_newton_step |
double | dq_relative_error |
unsigned int | maximum_beta_failures |
unsigned int | anderson_subspace_size |
OrthogonalizationStrategy | anderson_qr_orthogonalization |
Additional parameters that can be passed to the KINSOL class.
enum SUNDIALS::KINSOL::AdditionalData::SolutionStrategy |
enum SUNDIALS::KINSOL::AdditionalData::OrthogonalizationStrategy |
Orthogonalization strategy used for fixed-point iteration with Anderson acceleration. While modified_gram_schmidt
is a good default choice, it suffers from excessive communication for a growing number of acceleration vectors. Instead, the user may use one of the other strategies. For a detailed documentation consult the SUNDIALS manual.
Enumerator | |
---|---|
modified_gram_schmidt | The default, stable strategy. Requires an increasing number of communication steps with increasing Anderson subspace size. |
inverse_compact | Use a compact WY representation in the orthogonalization process of the inverse iteration with the Householder transformation. This strategy requires two communication steps and a very small linear system solve. |
classical_gram_schmidt | Classical Gram Schmidt, that can work on multi-vectors in parallel and thus always requires three communication steps. However, it is less stable in terms of roundoff error propagation, requiring additional re-orthogonalization steps more frequently. |
delayed_classical_gram_schmidt | Classical Gram Schmidt with delayed re-orthogonalization, which reduces the number of communication steps from three to two compared to |
SUNDIALS::KINSOL< VectorType >::AdditionalData::AdditionalData | ( | const SolutionStrategy & | strategy = linesearch, |
const unsigned int | maximum_non_linear_iterations = 200, | ||
const double | function_tolerance = 0.0, | ||
const double | step_tolerance = 0.0, | ||
const bool | no_init_setup = false, | ||
const unsigned int | maximum_setup_calls = 0, | ||
const double | maximum_newton_step = 0.0, | ||
const double | dq_relative_error = 0.0, | ||
const unsigned int | maximum_beta_failures = 0, | ||
const unsigned int | anderson_subspace_size = 0, | ||
const OrthogonalizationStrategy | anderson_qr_orthogonalization = modified_gram_schmidt ) |
Initialization parameters for KINSOL.
Global parameters:
strategy | Solution strategy |
maximum_non_linear_iterations | Maximum number of nonlinear iterations |
function_tolerance | Function norm stopping tolerance |
step_tolerance | Scaled step stopping tolerance |
Newton parameters:
no_init_setup | No initial matrix setup |
maximum_setup_calls | Maximum iterations without matrix setup |
maximum_newton_step | Maximum allowable scaled length of the Newton step |
dq_relative_error | Relative error for different quotient computation |
Line search parameters:
maximum_beta_failures | Maximum number of beta-condition failures |
Fixed point and Picard parameters:
anderson_subspace_size | Anderson acceleration subspace size |
anderson_qr_orthogonalization | Orthogonalization strategy for QR factorization when using Anderson acceleration |
void SUNDIALS::KINSOL< VectorType >::AdditionalData::add_parameters | ( | ParameterHandler & | prm | ) |
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
.
SolutionStrategy SUNDIALS::KINSOL< VectorType >::AdditionalData::strategy |
The solution strategy to use. If you choose SolutionStrategy::newton, SolutionStrategy::linesearch, or SolutionStrategy::picard you have to provide the function residual(). If you choose SolutionStrategy::fixed_point, you have to provide the function iteration_function().
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_non_linear_iterations |
double SUNDIALS::KINSOL< VectorType >::AdditionalData::function_tolerance |
double SUNDIALS::KINSOL< VectorType >::AdditionalData::step_tolerance |
bool SUNDIALS::KINSOL< VectorType >::AdditionalData::no_init_setup |
Whether an initial call to the preconditioner or Jacobian setup function should be made or not.
A call to this function is useful when solving a sequence of problems, in which the final preconditioner or Jacobian value from one problem is to be used initially for the next problem.
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_setup_calls |
The maximum number of nonlinear iterations that can be performed between calls to the setup_jacobian() function.
If set to zero, default values provided by KINSOL will be used, and in practice this often means that KINSOL will re-use a Jacobian matrix computed in one iteration for later iterations.
double SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_newton_step |
double SUNDIALS::KINSOL< VectorType >::AdditionalData::dq_relative_error |
The relative error in computing \(F(u)\), which is used in the difference quotient approximation to the Jacobian matrix when the user does not supply a solve_with_jacobian() function.
If set to zero, default values provided by KINSOL will be used.
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_beta_failures |
The maximum number of beta-condition failures in the linesearch algorithm. Only used if strategy==SolutionStrategy::linesearch.
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::anderson_subspace_size |
OrthogonalizationStrategy SUNDIALS::KINSOL< VectorType >::AdditionalData::anderson_qr_orthogonalization |