Reference documentation for deal.II version 9.4.1
\(\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\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SUNDIALS::SundialsPreconditioner< VectorType > Struct Template Reference

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

Public Member Functions

void vmult (VectorType &dst, const VectorType &src) const
 
 SundialsPreconditioner (void *P_data, PSolveFn p_solve_fn, SUNContext linsol_ctx, double tol)
 

Private Attributes

void * P_data
 
PSolveFn p_solve_fn
 
SUNContext linsol_ctx
 
double tol
 

Detailed Description

template<typename VectorType>
struct SUNDIALS::SundialsPreconditioner< VectorType >

A linear operator that wraps preconditioner functionality as specified by SUNDIALS. The vmult() function solves the preconditioner equation \(Px=b\), i.e., it computes \(x=P^{-1}b\).

Definition at line 101 of file sunlinsol_wrapper.h.

Constructor & Destructor Documentation

◆ SundialsPreconditioner()

template<typename VectorType >
SUNDIALS::SundialsPreconditioner< VectorType >::SundialsPreconditioner ( void *  P_data,
PSolveFn  p_solve_fn,
SUNContext  linsol_ctx,
double  tol 
)

Constructor.

Parameters
P_dataData required by p_solve_fn
p_solve_fnA function pointer to the function that computes A*v
linsol_ctxThe context object used to set up the linear solver and all vectors
tolTolerance, that an iterative solver should use to judge convergence
Note
This function is only available with SUNDIALS 6.0.0 and later. 6.0.0. If you are using an earlier version of SUNDIALS then you need to use the other constructor.

Definition at line 304 of file sunlinsol_wrapper.cc.

Member Function Documentation

◆ vmult()

template<typename VectorType >
void SUNDIALS::SundialsPreconditioner< VectorType >::vmult ( VectorType &  dst,
const VectorType &  src 
) const

Apply the wrapped preconditioner, i.e., solve \(Px=b\) where \(x\) is the dst vector and \(b\) the src vector.

Parameters
dstResult vector of the preconditioner application
srcTarget vector of the preconditioner application

Definition at line 330 of file sunlinsol_wrapper.cc.

Member Data Documentation

◆ P_data

template<typename VectorType >
void* SUNDIALS::SundialsPreconditioner< VectorType >::P_data
private

Data necessary to calls p_solve_fn

Definition at line 151 of file sunlinsol_wrapper.h.

◆ p_solve_fn

template<typename VectorType >
PSolveFn SUNDIALS::SundialsPreconditioner< VectorType >::p_solve_fn
private

Function pointer to a function that computes the preconditioner application.

Definition at line 157 of file sunlinsol_wrapper.h.

◆ linsol_ctx

template<typename VectorType >
SUNContext SUNDIALS::SundialsPreconditioner< VectorType >::linsol_ctx
private

Context object used for SUNDIALS logging.

Definition at line 163 of file sunlinsol_wrapper.h.

◆ tol

template<typename VectorType >
double SUNDIALS::SundialsPreconditioner< VectorType >::tol
private

Potential tolerance to use in the internal solve of the preconditioner equation.

Definition at line 170 of file sunlinsol_wrapper.h.


The documentation for this struct was generated from the following files: