Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
preconditioner_template.f90
Go to the documentation of this file.
1
3 use num_types, only : rp
4 use precon, only : pc_t, precon_allocate, register_precon
5 implicit none
6 private
7
9 contains
11 procedure :: update => preconditioner_template_update
13
15
16contains
17
18 subroutine preconditioner_template_solve(this, z, r, n)
19 class(preconditioner_template_t), intent(inout) :: this
20 integer, intent(in) :: n
21 real(kind=rp), intent(inout) :: z(n), r(n)
22 ! TODO: Replace the identity operation with M z = r.
23 z = r
25
27 class(preconditioner_template_t), intent(inout) :: this
28 ! TODO: Update state after a change in geometry or operator coefficients.
30
32 procedure(precon_allocate), pointer :: allocator
34 call register_precon('preconditioner_template', allocator)
36
38 class(pc_t), allocatable, intent(inout) :: obj
39 allocate(preconditioner_template_t :: obj)
__device__ T solve(const T u, const T y, const T guess, const T nu, const T kappa, const T B)
Allocate a preconditioner.
Definition precon.f90:89
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Krylov preconditioner.
Definition precon.f90:34
Template for a user-defined Krylov preconditioner.
subroutine preconditioner_template_update(this)
subroutine preconditioner_template_solve(this, z, r, n)
subroutine preconditioner_template_allocate(obj)
subroutine, public preconditioner_template_register_types()
Defines a canonical Krylov preconditioner.
Definition precon.f90:40