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
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
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
110 call precon_allocator(pc, type_name)
111 call pc%init(coef, bclst, json)
113 end subroutine precon_factory
120 module subroutine register_precon(type_name, allocator)
121 character(len=*),
intent(in) :: type_name
122 procedure(precon_allocate),
pointer,
intent(in) :: allocator
123 type(precon_allocator_entry),
allocatable :: temp(:)
126 do i = 1,
size(pc_known_types)
127 if (trim(type_name) .eq. trim(pc_known_types(i)))
then
133 do i = 1, precon_registry_size
134 if (trim(type_name) .eq. trim(precon_registry(i)%type_name))
then
140 if (precon_registry_size .eq. 0)
then
141 allocate(precon_registry(1))
143 allocate(temp(precon_registry_size + 1))
144 temp(1:precon_registry_size) = precon_registry
145 call move_alloc(temp, precon_registry)
148 precon_registry_size = precon_registry_size + 1
149 precon_registry(precon_registry_size)%type_name = type_name
150 precon_registry(precon_registry_size)%allocator => allocator
151 end subroutine register_precon
153end 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.