16#ifndef dealii_sundials_kinsol_h
17#define dealii_sundials_kinsol_h
21#ifdef DEAL_II_WITH_SUNDIALS
34# include <boost/signals2.hpp>
36# include <kinsol/kinsol.h>
37# include <nvector/nvector_serial.h>
38# include <sundials/sundials_math.h>
47# define AssertKINSOL(code) Assert(code >= 0, ExcKINSOLError(code))
182 template <
typename VectorType = Vector<
double>>
302 const OrthogonalizationStrategy
465 solve(VectorType &initial_guess_and_solution);
496 std::function<void(
const VectorType &src, VectorType &dst)>
residual;
511 std::function<void(
const VectorType &src, VectorType &dst)>
559 std::function<void(
const VectorType ¤t_u,
560 const VectorType ¤t_f)>
603 void(
const VectorType &rhs, VectorType &dst,
const double tolerance)>
712 <<
"One of the SUNDIALS KINSOL internal functions "
713 <<
"returned a negative error code: " << arg1
714 <<
". Please consult SUNDIALS manual.");
723 <<
"Please provide an implementation for the function \""
749# if DEAL_II_SUNDIALS_VERSION_GTE(6, 0, 0)
unsigned int maximum_setup_calls
double maximum_newton_step
SolutionStrategy strategy
unsigned int maximum_beta_failures
OrthogonalizationStrategy
@ delayed_classical_gram_schmidt
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)
OrthogonalizationStrategy anderson_qr_orthogonalization
void add_parameters(ParameterHandler &prm)
unsigned int maximum_non_linear_iterations
unsigned int anderson_subspace_size
double function_tolerance
std::function< VectorType &()> get_solution_scaling
std::function< void(const VectorType ¤t_u, const VectorType ¤t_f)> setup_jacobian
void set_functions_to_trigger_an_assert()
MPI_Comm mpi_communicator
unsigned int solve(VectorType &initial_guess_and_solution)
std::function< void(const VectorType &src, VectorType &dst)> residual
std::function< void(const VectorType &src, VectorType &dst)> iteration_function
GrowingVectorMemory< VectorType > mem
std::exception_ptr pending_exception
std::function< void(const VectorType &rhs, VectorType &dst, const double tolerance)> solve_with_jacobian
std::function< VectorType &()> get_function_scaling
std::function< void(VectorType &)> reinit_vector
std::function< void(void *kinsol_mem)> custom_setup
KINSOL(const AdditionalData &data=AdditionalData())
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcKINSOLError(int arg1)
static ::ExceptionBase & ExcFunctionNotProvided(std::string arg1)
#define DeclException1(Exception1, type1, outsequence)