Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
fusedcg_cpld_device::fusedcg_cpld_device_t Type Referenceabstract

Fused preconditioned conjugate gradient method. More...

Inheritance diagram for fusedcg_cpld_device::fusedcg_cpld_device_t:
Collaboration diagram for fusedcg_cpld_device::fusedcg_cpld_device_t:

Public Member Functions

procedure, pass(thisinit (this, n, max_iter, m, rel_tol, abs_tol, monitor)
 Initialise a fused PCG solver.
 
procedure, pass(thisfree (this)
 Deallocate a pipelined PCG solver.
 
procedure, pass(thissolve (this, ax, x, f, n, coef, blst, gs_h, niter)
 Pipelined PCG solve.
 
procedure, pass(thissolve_coupled (this, ax, x, y, z, fx, fy, fz, n, coef, blstx, blsty, blstz, gs_h, niter)
 Pipelined PCG solve coupled solve.
 
procedure, pass(thisksp_init (this, max_iter, rel_tol, abs_tol, m, monitor)
 Base type constructor.
 
procedure, pass(thisksp_free (this)
 Base type destructor.
 
procedure, pass(thisset_pc (this, m)
 Set preconditioner.
 
procedure(ksp_method), deferred, pass solve (this, ax, x, f, n, coef, blst, gs_h, niter)
 Solve the system.
 
procedure(ksp_method_coupled), deferred, pass solve_coupled (this, ax, x, y, z, fx, fy, fz, n, coef, blstx, blsty, blstz, gs_h, niter)
 Solve the system (coupled version).
 
procedure, pass(thismonitor_start (this, name)
 Monitor start.
 
procedure, pass(thismonitor_stop (this)
 Monitor stop.
 
procedure, pass(thismonitor_iter (this, iter, rnorm)
 Monitor iteration.
 
procedure, pass(thisis_converged (this, iter, residual)
 Check for convergence.
 
procedure(ksp_t_free), deferred, pass free (this)
 Destructor.
 

Public Attributes

real(kind=rp), dimension(:), allocatable w1
 
real(kind=rp), dimension(:), allocatable w2
 
real(kind=rp), dimension(:), allocatable w3
 
real(kind=rp), dimension(:), allocatable r1
 
real(kind=rp), dimension(:), allocatable r2
 
real(kind=rp), dimension(:), allocatable r3
 
real(kind=rp), dimension(:), allocatable z1
 
real(kind=rp), dimension(:), allocatable z2
 
real(kind=rp), dimension(:), allocatable z3
 
real(kind=rp), dimension(:), allocatable tmp
 
real(kind=rp), dimension(:,:), allocatable p1
 
real(kind=rp), dimension(:,:), allocatable p2
 
real(kind=rp), dimension(:,:), allocatable p3
 
real(kind=rp), dimension(:), allocatable alpha
 
type(c_ptr) w1_d = C_NULL_PTR
 
type(c_ptr) w2_d = C_NULL_PTR
 
type(c_ptr) w3_d = C_NULL_PTR
 
type(c_ptr) r1_d = C_NULL_PTR
 
type(c_ptr) r2_d = C_NULL_PTR
 
type(c_ptr) r3_d = C_NULL_PTR
 
type(c_ptr) z1_d = C_NULL_PTR
 
type(c_ptr) z2_d = C_NULL_PTR
 
type(c_ptr) z3_d = C_NULL_PTR
 
type(c_ptr) alpha_d = C_NULL_PTR
 
type(c_ptr) p1_d_d = C_NULL_PTR
 
type(c_ptr) p2_d_d = C_NULL_PTR
 
type(c_ptr) p3_d_d = C_NULL_PTR
 
type(c_ptr) tmp_d = C_NULL_PTR
 
type(c_ptr), dimension(:), allocatable p1_d
 
type(c_ptr), dimension(:), allocatable p2_d
 
type(c_ptr), dimension(:), allocatable p3_d
 
type(c_ptr) gs_event1 = C_NULL_PTR
 
type(c_ptr) gs_event2 = C_NULL_PTR
 
type(c_ptr) gs_event3 = C_NULL_PTR
 
class(pc_t), pointer m => null()
 Preconditioner.
 
real(kind=rp) rel_tol
 Relative tolerance.
 
real(kind=rp) abs_tol
 Absolute tolerance.
 
integer max_iter
 Maximum number of iterations.
 
class(pc_t), allocatable m_ident
 Internal preconditioner (Identity)
 
logical monitor
 Turn on/off monitoring.
 

Detailed Description

Definition at line 53 of file fusedcg_cpld_device.F90.

Member Function/Subroutine Documentation

◆ free() [1/2]

procedure, pass(this) fusedcg_cpld_device::fusedcg_cpld_device_t::free ( class(fusedcg_cpld_device_t), intent(inout this)

Definition at line 90 of file fusedcg_cpld_device.F90.

◆ free() [2/2]

procedure(ksp_t_free), deferred, pass krylov::ksp_t::free ( class(ksp_t), intent(inout this)
pure virtualinherited

Definition at line 95 of file krylov.f90.

◆ init()

procedure, pass(this) fusedcg_cpld_device::fusedcg_cpld_device_t::init ( class(fusedcg_cpld_device_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 89 of file fusedcg_cpld_device.F90.

◆ is_converged()

procedure, pass(this) krylov::ksp_t::is_converged ( class(ksp_t), intent(in this,
integer, intent(in iter,
real(kind=rp), intent(in residual 
)
inherited

This function checks if the Krylov solver has converged. The solver is considered converged if the residual is less than the absolute tolerance.

Parameters
residualResidual
iterIteration number

Definition at line 93 of file krylov.f90.

◆ ksp_free()

procedure, pass(this) krylov::ksp_t::ksp_free ( class(ksp_t), intent(inout this)
inherited

Definition at line 79 of file krylov.f90.

◆ ksp_init()

procedure, pass(this) krylov::ksp_t::ksp_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,
logical, intent(in), optional  monitor 
)
inherited
Parameters
objectThe object to be allocated.
nSize of the vectors the solver operates on.
type_nameThe name of the solver type.
max_iterThe maximum number of iterations
abstolThe absolute tolerance, optional.
MThe preconditioner, optional.
monitorEnable/disable monitoring, optional. Destroy an iterative Krylov type_name Constructor for the base type.
max_iterMaximum number of iterations.
rel_tolRelative tolarance for converence.
rel_tolAbsolute tolarance for converence.
MThe preconditioner.

Definition at line 77 of file krylov.f90.

◆ monitor_iter()

procedure, pass(this) krylov::ksp_t::monitor_iter ( class(ksp_t), intent(in this,
integer, intent(in iter,
real(kind=rp), intent(in rnorm 
)
inherited

Definition at line 91 of file krylov.f90.

◆ monitor_start()

procedure, pass(this) krylov::ksp_t::monitor_start ( class(ksp_t), intent(in this,
character(len=*)  name 
)
inherited

Definition at line 87 of file krylov.f90.

◆ monitor_stop()

procedure, pass(this) krylov::ksp_t::monitor_stop ( class(ksp_t), intent(in this)
inherited

Definition at line 89 of file krylov.f90.

◆ set_pc()

procedure, pass(this) krylov::ksp_t::set_pc ( class(ksp_t), intent(inout this,
class(pc_t), intent(in), target  m 
)
inherited
Parameters
MThe preconditioner.

Definition at line 81 of file krylov.f90.

◆ solve() [1/2]

procedure, pass(this) fusedcg_cpld_device::fusedcg_cpld_device_t::solve ( class(fusedcg_cpld_device_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(inout blst,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)

Definition at line 91 of file fusedcg_cpld_device.F90.

◆ solve() [2/2]

procedure(ksp_method), deferred, pass krylov::ksp_t::solve ( class(ksp_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(inout blst,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)
pure virtualinherited

Definition at line 83 of file krylov.f90.

◆ solve_coupled() [1/2]

procedure, pass(this) fusedcg_cpld_device::fusedcg_cpld_device_t::solve_coupled ( class(fusedcg_cpld_device_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(inout blstx,
type(bc_list_t), intent(inout blsty,
type(bc_list_t), intent(inout blstz,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)

Definition at line 92 of file fusedcg_cpld_device.F90.

◆ solve_coupled() [2/2]

procedure(ksp_method_coupled), deferred, pass krylov::ksp_t::solve_coupled ( class(ksp_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(inout blstx,
type(bc_list_t), intent(inout blsty,
type(bc_list_t), intent(inout blstz,
type(gs_t), intent(inout gs_h,
integer, intent(in), optional  niter 
)
pure virtualinherited

Definition at line 85 of file krylov.f90.

Member Data Documentation

◆ abs_tol

real(kind=rp) krylov::ksp_t::abs_tol
inherited

Definition at line 71 of file krylov.f90.

◆ alpha

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::alpha

Definition at line 67 of file fusedcg_cpld_device.F90.

◆ alpha_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::alpha_d = C_NULL_PTR

Definition at line 77 of file fusedcg_cpld_device.F90.

◆ gs_event1

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::gs_event1 = C_NULL_PTR

Definition at line 85 of file fusedcg_cpld_device.F90.

◆ gs_event2

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::gs_event2 = C_NULL_PTR

Definition at line 86 of file fusedcg_cpld_device.F90.

◆ gs_event3

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::gs_event3 = C_NULL_PTR

Definition at line 87 of file fusedcg_cpld_device.F90.

◆ m

class(pc_t), pointer krylov::ksp_t::m => null()
inherited

Definition at line 69 of file krylov.f90.

◆ m_ident

class(pc_t), allocatable krylov::ksp_t::m_ident
inherited

Definition at line 73 of file krylov.f90.

◆ max_iter

integer krylov::ksp_t::max_iter
inherited

Definition at line 72 of file krylov.f90.

◆ monitor

logical krylov::ksp_t::monitor
inherited

Definition at line 74 of file krylov.f90.

◆ p1

real(kind=rp), dimension(:,:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p1

Definition at line 64 of file fusedcg_cpld_device.F90.

◆ p1_d

type(c_ptr), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p1_d

Definition at line 82 of file fusedcg_cpld_device.F90.

◆ p1_d_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::p1_d_d = C_NULL_PTR

Definition at line 78 of file fusedcg_cpld_device.F90.

◆ p2

real(kind=rp), dimension(:,:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p2

Definition at line 65 of file fusedcg_cpld_device.F90.

◆ p2_d

type(c_ptr), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p2_d

Definition at line 83 of file fusedcg_cpld_device.F90.

◆ p2_d_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::p2_d_d = C_NULL_PTR

Definition at line 79 of file fusedcg_cpld_device.F90.

◆ p3

real(kind=rp), dimension(:,:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p3

Definition at line 66 of file fusedcg_cpld_device.F90.

◆ p3_d

type(c_ptr), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::p3_d

Definition at line 84 of file fusedcg_cpld_device.F90.

◆ p3_d_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::p3_d_d = C_NULL_PTR

Definition at line 80 of file fusedcg_cpld_device.F90.

◆ r1

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::r1

Definition at line 57 of file fusedcg_cpld_device.F90.

◆ r1_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::r1_d = C_NULL_PTR

Definition at line 71 of file fusedcg_cpld_device.F90.

◆ r2

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::r2

Definition at line 58 of file fusedcg_cpld_device.F90.

◆ r2_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::r2_d = C_NULL_PTR

Definition at line 72 of file fusedcg_cpld_device.F90.

◆ r3

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::r3

Definition at line 59 of file fusedcg_cpld_device.F90.

◆ r3_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::r3_d = C_NULL_PTR

Definition at line 73 of file fusedcg_cpld_device.F90.

◆ rel_tol

real(kind=rp) krylov::ksp_t::rel_tol
inherited

Definition at line 70 of file krylov.f90.

◆ tmp

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::tmp

Definition at line 63 of file fusedcg_cpld_device.F90.

◆ tmp_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::tmp_d = C_NULL_PTR

Definition at line 81 of file fusedcg_cpld_device.F90.

◆ w1

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::w1

Definition at line 54 of file fusedcg_cpld_device.F90.

◆ w1_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::w1_d = C_NULL_PTR

Definition at line 68 of file fusedcg_cpld_device.F90.

◆ w2

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::w2

Definition at line 55 of file fusedcg_cpld_device.F90.

◆ w2_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::w2_d = C_NULL_PTR

Definition at line 69 of file fusedcg_cpld_device.F90.

◆ w3

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::w3

Definition at line 56 of file fusedcg_cpld_device.F90.

◆ w3_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::w3_d = C_NULL_PTR

Definition at line 70 of file fusedcg_cpld_device.F90.

◆ z1

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::z1

Definition at line 60 of file fusedcg_cpld_device.F90.

◆ z1_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::z1_d = C_NULL_PTR

Definition at line 74 of file fusedcg_cpld_device.F90.

◆ z2

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::z2

Definition at line 61 of file fusedcg_cpld_device.F90.

◆ z2_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::z2_d = C_NULL_PTR

Definition at line 75 of file fusedcg_cpld_device.F90.

◆ z3

real(kind=rp), dimension(:), allocatable fusedcg_cpld_device::fusedcg_cpld_device_t::z3

Definition at line 62 of file fusedcg_cpld_device.F90.

◆ z3_d

type(c_ptr) fusedcg_cpld_device::fusedcg_cpld_device_t::z3_d = C_NULL_PTR

Definition at line 76 of file fusedcg_cpld_device.F90.


The documentation for this type was generated from the following file: