33submodule(
precon) precon_fctry
46 character(len=20) :: PC_KNOWN_TYPES(4) = [character(len=20) :: &
55 module subroutine precon_allocator(pc, type_name)
56 class(pc_t),
allocatable,
intent(inout) :: pc
57 character(len=*),
intent(in) :: type_name
60 if (
allocated(pc))
then
61 call precon_destroy(pc)
65 select case (trim(type_name))
85 do i = 1, precon_registry_size
86 if (trim(type_name) .eq. trim(precon_registry(i)%type_name))
then
87 call precon_registry(i)%allocator(pc)
95 end subroutine precon_allocator
98 module subroutine precon_destroy(pc)
99 class(pc_t),
allocatable,
intent(inout) :: pc
101 if (
allocated(pc))
then
102 select type (pcp => pc)
116 end subroutine precon_destroy
123 module subroutine register_precon(type_name, allocator)
124 character(len=*),
intent(in) :: type_name
125 procedure(precon_allocate),
pointer,
intent(in) :: allocator
126 type(precon_allocator_entry),
allocatable :: temp(:)
129 do i = 1,
size(pc_known_types)
130 if (trim(type_name) .eq. trim(pc_known_types(i)))
then
136 do i = 1, precon_registry_size
137 if (trim(type_name) .eq. trim(precon_registry(i)%type_name))
then
143 if (precon_registry_size .eq. 0)
then
144 allocate(precon_registry(1))
146 allocate(temp(precon_registry_size + 1))
147 temp(1:precon_registry_size) = precon_registry
148 call move_alloc(temp, precon_registry)
151 precon_registry_size = precon_registry_size + 1
152 precon_registry(precon_registry_size)%type_name = type_name
153 precon_registry(precon_registry_size)%allocator => allocator
154 end subroutine register_precon
156end submodule precon_fctry
Identity Krylov preconditioner for accelerators.
Jacobi preconditioner accelerator backend.
Krylov preconditioner (identity)
integer, parameter neko_bcknd_sx
integer, parameter neko_bcknd_device
Hybrid ph-multigrid preconditioner.
Jacobi preconditioner SX-Aurora backend.
subroutine, public neko_type_registration_error(base_type, wrong_type, known)
subroutine, public neko_type_error(base_type, wrong_type, known_types)
Reports an error allocating a type for a particular base pointer class.
Defines a canonical Krylov preconditioner for accelerators.
Defines a jacobi preconditioner.
Defines a canonical Krylov preconditioner.
Defines a jacobi preconditioner.
Defines a jacobi preconditioner for SX-Aurora.