Neko  0.8.1
A portable framework for high-order spectral element flow simulations
krylov Module Reference

Implements the base abstract type for Krylov solvers plus helper types. More...

Data Types

type  ksp_monitor_t
 Type for storing initial and final residuals in a Krylov solver. More...
 
type  ksp_t
 Base abstract type for a canonical Krylov method, solving \( Ax = f \). More...
 
interface  ksp_method
 Abstract interface for a Krylov method's solve routine. More...
 
interface  ksp_t_free
 Abstract interface for deallocating a Krylov method. More...
 

Functions/Subroutines

subroutine krylov_init (this, max_iter, rel_tol, abs_tol, M)
 Constructor for the base type. More...
 
subroutine krylov_free (this)
 Deallocate a Krylov solver. More...
 
subroutine krylov_set_pc (this, M)
 Setup a Krylov solver's preconditioner. More...
 

Variables

integer, parameter, public ksp_max_iter = 1e4
 Maximum number of iters. More...
 
real(kind=rp), parameter, public ksp_abs_tol = 1d-9
 Absolut tolerance. More...
 
real(kind=rp), parameter, public ksp_rel_tol = 1d-9
 Relative tolerance. More...
 

Detailed Description

Implements the base abstract type for Krylov solvers plus helper types.

Function/Subroutine Documentation

◆ krylov_free()

subroutine krylov::krylov_free ( class(ksp_t), intent(inout)  this)
private

Deallocate a Krylov solver.

Todo:
add calls to destroy precon. if necessary

Definition at line 172 of file krylov.f90.

Here is the caller graph for this function:

◆ krylov_init()

subroutine krylov::krylov_init ( class(ksp_t), intent(inout), target  this,
integer, intent(in)  max_iter,
real(kind=rp), intent(in), optional  rel_tol,
real(kind=rp), intent(in), optional  abs_tol,
class(pc_t), intent(in), optional, target  M 
)
private

Constructor for the base type.

Parameters
max_iterMaximum number of iterations.
rel_tolRelative tolarance for converence.
rel_tolAbsolute tolarance for converence.
MThe preconditioner.

Definition at line 133 of file krylov.f90.

Here is the call graph for this function:

◆ krylov_set_pc()

subroutine krylov::krylov_set_pc ( class(ksp_t), intent(inout)  this,
class(pc_t), intent(in), target  M 
)
private

Setup a Krylov solver's preconditioner.

Parameters
MThe preconditioner.

Definition at line 181 of file krylov.f90.

Variable Documentation

◆ ksp_abs_tol

real(kind=rp), parameter, public krylov::ksp_abs_tol = 1d-9

Absolut tolerance.

Definition at line 51 of file krylov.f90.

◆ ksp_max_iter

integer, parameter, public krylov::ksp_max_iter = 1e4

Maximum number of iters.

Definition at line 50 of file krylov.f90.

◆ ksp_rel_tol

real(kind=rp), parameter, public krylov::ksp_rel_tol = 1d-9

Relative tolerance.

Definition at line 52 of file krylov.f90.