Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Types | Public Member Functions | Public Attributes | List of all members
SUNDIALS::KINSOL< VectorType >::AdditionalData Class Reference

#include <deal.II/sundials/kinsol.h>

Public Types

enum  SolutionStrategy { newton = KIN_NONE, linesearch = KIN_LINESEARCH, fixed_point = KIN_FP, picard = KIN_PICARD }
 

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)
 
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
 

Detailed Description

template<typename VectorType = Vector<double>>
class SUNDIALS::KINSOL< VectorType >::AdditionalData

Additional parameters that can be passed to the KINSOL class.

Definition at line 204 of file kinsol.h.

Member Enumeration Documentation

◆ SolutionStrategy

template<typename VectorType = Vector<double>>
enum SUNDIALS::KINSOL::AdditionalData::SolutionStrategy

KINSOL solution strategy. KINSOL includes a Newton-Krylov solver (both local and global) as well as Picard and fixed point solvers.

Enumerator
newton 

Standard Newton iteration.

linesearch 

Newton iteration with linesearch.

fixed_point 

Fixed point iteration.

picard 

Picard iteration.

Definition at line 211 of file kinsol.h.

Constructor & Destructor Documentation

◆ AdditionalData()

template<typename VectorType = Vector<double>>
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 
)
inline

Initialization parameters for KINSOL.

Global parameters:

Parameters
strategySolution strategy
maximum_non_linear_iterationsMaximum number of nonlinear iterations
function_toleranceFunction norm stopping tolerance
step_toleranceScaled step stopping tolerance

Newton parameters:

Parameters
no_init_setupNo initial matrix setup
maximum_setup_callsMaximum iterations without matrix setup
maximum_newton_stepMaximum allowable scaled length of the Newton step
dq_relative_errorRelative error for different quotient computation

Linesearch parameters:

Parameters
maximum_beta_failuresMaximum number of beta-condition failures

Fixed point and Picard parameters:

Parameters
anderson_subspace_sizeAnderson acceleration subspace size

Definition at line 259 of file kinsol.h.

Member Function Documentation

◆ add_parameters()

template<typename VectorType = Vector<double>>
void SUNDIALS::KINSOL< VectorType >::AdditionalData::add_parameters ( ParameterHandler prm)
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:

set Function norm stopping tolerance = 0
set Maximum number of nonlinear iterations = 200
set Scaled step stopping tolerance = 0
subsection Fixed point and Picard parameters
set Anderson acceleration subspace size = 5
subsection Linesearch parameters
set Maximum number of beta-condition failures = 0
subsection Newton parameters
set Maximum allowable scaled length of the Newton step = 0
set Maximum iterations without matrix setup = 0
set No initial matrix setup = false
set Relative error for different quotient computation = 0

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 behaviour will occur if you destroy this class, and then parse a parameter file using prm.

Definition at line 322 of file kinsol.h.

Member Data Documentation

◆ strategy

template<typename VectorType = Vector<double>>
SolutionStrategy SUNDIALS::KINSOL< VectorType >::AdditionalData::strategy

The solution strategy to use. If you choose SolutionStrategy::newton or SolutionStrategy::linesearch, you have to provide also the function residual(). If you choose SolutionStrategy::picard or SolutionStrategy::fixed_point, you have to provide also the function iteration_function().

Definition at line 377 of file kinsol.h.

◆ maximum_non_linear_iterations

template<typename VectorType = Vector<double>>
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_non_linear_iterations

Maximum number of nonlinear iterations allowed.

Definition at line 382 of file kinsol.h.

◆ function_tolerance

template<typename VectorType = Vector<double>>
double SUNDIALS::KINSOL< VectorType >::AdditionalData::function_tolerance

A scalar used as a stopping tolerance on the scaled maximum norm of the system function \(F(u)\) or \(G(u)\).

If set to zero, default values provided by KINSOL will be used.

Definition at line 390 of file kinsol.h.

◆ step_tolerance

template<typename VectorType = Vector<double>>
double SUNDIALS::KINSOL< VectorType >::AdditionalData::step_tolerance

A scalar used as a stopping tolerance on the minimum scaled step length.

If set to zero, default values provided by KINSOL will be used.

Definition at line 398 of file kinsol.h.

◆ no_init_setup

template<typename VectorType = Vector<double>>
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.

Definition at line 408 of file kinsol.h.

◆ maximum_setup_calls

template<typename VectorType = Vector<double>>
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.

Definition at line 416 of file kinsol.h.

◆ maximum_newton_step

template<typename VectorType = Vector<double>>
double SUNDIALS::KINSOL< VectorType >::AdditionalData::maximum_newton_step

The maximum allowable scaled length of the Newton step.

If set to zero, default values provided by KINSOL will be used.

Definition at line 423 of file kinsol.h.

◆ dq_relative_error

template<typename VectorType = Vector<double>>
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_jacobian_system_matrix() function.

If set to zero, default values provided by KINSOL will be used.

Definition at line 432 of file kinsol.h.

◆ maximum_beta_failures

template<typename VectorType = Vector<double>>
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.

Definition at line 439 of file kinsol.h.

◆ anderson_subspace_size

template<typename VectorType = Vector<double>>
unsigned int SUNDIALS::KINSOL< VectorType >::AdditionalData::anderson_subspace_size

The size of the subspace used with Anderson acceleration in conjunction with Picard or fixed-point iteration.

If you set this to 0, no acceleration is used.

Definition at line 447 of file kinsol.h.


The documentation for this class was generated from the following file:
LinearAlgebra::CUDAWrappers::kernel::set
__global__ void set(Number *val, const Number s, const size_type N)
OpenCASCADE::point
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition: utilities.cc:188
SUNDIALS::KINSOL::AdditionalData::linesearch
@ linesearch
Definition: kinsol.h:220
Algorithms::Events::initial
const Event initial
Definition: event.cc:65
SUNDIALS::KINSOL::AdditionalData::strategy
SolutionStrategy strategy
Definition: kinsol.h:377
LocalIntegrators::Divergence::norm
double norm(const FEValuesBase< dim > &fe, const ArrayView< const std::vector< Tensor< 1, dim >>> &Du)
Definition: divergence.h:548
LAPACKSupport::matrix
@ matrix
Contents is actually a matrix.
Definition: lapack_support.h:60
TrilinosWrappers::internal::end
VectorType::value_type * end(VectorType &V)
Definition: trilinos_sparse_matrix.cc:65
Function
Definition: function.h:151