Neko  0.9.99
A portable framework for high-order spectral element flow simulations
cg Module Reference

Defines various Conjugate Gradient methods.

Data Types

type  cg_t
 Standard preconditioned conjugate gradient method. More...
 

Functions/Subroutines

subroutine cg_init (this, n, max_iter, M, rel_tol, abs_tol, monitor)
 Initialise a standard PCG solver. More...
 
subroutine cg_free (this)
 Deallocate a standard PCG solver. More...
 
type(ksp_monitor_t) function cg_solve (this, Ax, x, f, n, coef, blst, gs_h, niter)
 Standard PCG solve. More...
 
subroutine second_cg_part (rtr, r, mult, w, alpha, n)
 
type(ksp_monitor_t) function, dimension(3) cg_solve_coupled (this, Ax, x, y, z, fx, fy, fz, n, coef, blstx, blsty, blstz, gs_h, niter)
 Standard PCG coupled solve. More...
 

Variables

integer, parameter cg_p_space = 7
 

Function/Subroutine Documentation

◆ cg_free()

subroutine cg::cg_free ( class(cg_t), intent(inout)  this)
private

Definition at line 108 of file cg.f90.

◆ cg_init()

subroutine cg::cg_init ( class(cg_t), intent(inout), target  this,
integer, intent(in)  n,
integer, intent(in)  max_iter,
class(pc_t), intent(in), optional, target  M,
real(kind=rp), intent(in), optional  rel_tol,
real(kind=rp), intent(in), optional  abs_tol,
logical, intent(in), optional  monitor 
)

Definition at line 67 of file cg.f90.

◆ cg_solve()

type(ksp_monitor_t) function cg::cg_solve ( class(cg_t), intent(inout)  this,
class(ax_t), intent(in)  Ax,
type(field_t), intent(inout)  x,
real(kind=rp), dimension(n), intent(in)  f,
integer, intent(in)  n,
type(coef_t), intent(inout)  coef,
type(bc_list_t), intent(in)  blst,
type(gs_t), intent(inout)  gs_h,
integer, intent(in), optional  niter 
)
private

Definition at line 138 of file cg.f90.

Here is the call graph for this function:

◆ cg_solve_coupled()

type(ksp_monitor_t) function, dimension(3) cg::cg_solve_coupled ( class(cg_t), intent(inout)  this,
class(ax_t), intent(in)  Ax,
type(field_t), intent(inout)  x,
type(field_t), intent(inout)  y,
type(field_t), intent(inout)  z,
real(kind=rp), dimension(n), intent(in)  fx,
real(kind=rp), dimension(n), intent(in)  fy,
real(kind=rp), dimension(n), intent(in)  fz,
integer, intent(in)  n,
type(coef_t), intent(inout)  coef,
type(bc_list_t), intent(in)  blstx,
type(bc_list_t), intent(in)  blsty,
type(bc_list_t), intent(in)  blstz,
type(gs_t), intent(inout)  gs_h,
integer, intent(in), optional  niter 
)
private

Definition at line 258 of file cg.f90.

◆ second_cg_part()

subroutine cg::second_cg_part ( real(kind=rp), intent(inout)  rtr,
real(kind=rp), dimension(n), intent(inout)  r,
real(kind=rp), dimension(n), intent(in)  mult,
real(kind=rp), dimension(n), intent(in)  w,
real(kind=rp), intent(in)  alpha,
integer, intent(in)  n 
)
private

Definition at line 239 of file cg.f90.

Here is the caller graph for this function:

Variable Documentation

◆ cg_p_space

integer, parameter cg::cg_p_space = 7
private

Definition at line 48 of file cg.f90.