39 use json_module,
only : json_file
44 type,
public,
abstract ::
pc_t
46 procedure(
pc_init), pass(this),
deferred :: init
48 procedure(
pc_update), pass(this),
deferred :: update
49 procedure(
pc_free), pass(this),
deferred :: free
58 subroutine pc_init(this, coef, bclst, json)
61 class(
pc_t),
intent(inout),
target :: this
62 type(
coef_t),
intent(in),
target :: coef
63 type(
bc_list_t),
intent(inout),
target :: bclst
64 type(json_file),
intent(inout) :: json
77 integer,
intent(in) :: n
78 class(
pc_t),
intent(inout) :: this
79 real(kind=
rp),
dimension(n),
intent(inout) :: z
80 real(kind=
rp),
dimension(n),
intent(inout) :: r
86 class(
pc_t),
intent(inout) :: this
91 class(
pc_t),
intent(inout) :: this
97 module subroutine precon_allocator(pc, type_name)
98 class(pc_t),
allocatable,
intent(inout) :: pc
99 character(len=*),
intent(in) :: type_name
100 end subroutine precon_allocator
103 module subroutine precon_factory(pc, type_name, coef, bclst, json)
104 class(pc_t),
allocatable,
intent(inout),
target :: pc
105 character(len=*),
intent(in) :: type_name
106 type(
coef_t),
intent(in),
target :: coef
107 type(
bc_list_t),
intent(inout),
target :: bclst
108 type(json_file),
intent(inout) :: json
109 end subroutine precon_factory
120 subroutine precon_allocate(obj)
122 class(pc_t),
allocatable,
intent(inout) :: obj
123 end subroutine precon_allocate
128 module subroutine register_precon(type_name, allocator)
129 character(len=*),
intent(in) :: type_name
130 procedure(precon_allocate),
pointer,
intent(in) :: allocator
131 end subroutine register_precon
135 type precon_allocator_entry
136 character(len=NEKO_TYPENAME_LEN) :: type_name
137 procedure(precon_allocate),
pointer,
nopass :: allocator
138 end type precon_allocator_entry
141 type(precon_allocator_entry),
allocatable :: precon_registry(:)
144 integer :: precon_registry_size = 0
146 public :: precon_allocator, precon_factory, 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 initializing a preconditioner from the case file.
Abstract interface for solving .
integer, parameter, public rp
Global precision used in computations.
integer, parameter, public neko_typename_len
A list of allocatable `bc_t`. Follows the standard interface of lists.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Defines a canonical Krylov preconditioner.