40 type,
public,
abstract ::
pc_t
43 procedure(
pc_update), pass(this),
deferred :: update
55 integer,
intent(in) :: n
56 class(
pc_t),
intent(inout) :: this
57 real(kind=
rp),
dimension(n),
intent(inout) :: z
58 real(kind=
rp),
dimension(n),
intent(inout) :: r
64 class(
pc_t),
intent(inout) :: this
70 module subroutine precon_allocator(pc, type_name)
71 class(pc_t),
allocatable,
intent(inout) :: pc
72 character(len=*),
intent(in) :: type_name
73 end subroutine precon_allocator
76 module subroutine precon_destroy(pc)
77 class(pc_t),
allocatable,
intent(inout) :: pc
78 end subroutine precon_destroy
89 subroutine precon_allocate(obj)
91 class(pc_t),
allocatable,
intent(inout) :: obj
92 end subroutine precon_allocate
97 module subroutine register_precon(type_name, allocator)
98 character(len=*),
intent(in) :: type_name
99 procedure(precon_allocate),
pointer,
intent(in) :: allocator
100 end subroutine register_precon
104 type precon_allocator_entry
105 character(len=20) :: type_name
106 procedure(precon_allocate),
pointer,
nopass :: allocator
107 end type precon_allocator_entry
110 type(precon_allocator_entry),
allocatable :: precon_registry(:)
113 integer :: precon_registry_size = 0
115 public :: precon_allocator, precon_destroy, register_precon, precon_allocate
__device__ T solve(const T u, const T y, const T guess, const T nu, const T kappa, const T B)
Abstract interface for solving .
integer, parameter, public rp
Global precision used in computations.
Defines a canonical Krylov preconditioner.