53 character(len=20) :: AX_HELM_KNOWN_TYPES(4) = [character(len=20) :: &
65 module subroutine ax_helm_allocator(object, type_name)
66 class(ax_t),
allocatable,
intent(inout) :: object
67 character(len=*),
intent(in) :: type_name
70 if (
allocated(object))
then
75 select case (trim(type_name))
88 call neko_error(
"Full stress formulation is only available " // &
89 "on the CPU and device")
97 call neko_error(
"SVV is not available with the SX or " // &
101 call neko_error(
"SVV is only available on CPU, " // &
102 "CUDA, and HIP backends")
110 call neko_error(
"Full stress formulation is only available &
111 &on the CPU and device")
114 call neko_error(
"Full-stress SVV is only " // &
115 "available on CPU, CUDA, and HIP backends")
122 do i = 1, ax_helm_registry_size
123 if (trim(type_name) .eq. &
124 trim(ax_helm_registry(i)%type_name))
then
125 call ax_helm_registry(i)%allocator(object)
134 end subroutine ax_helm_allocator
141 module subroutine register_ax_helm(type_name, allocator)
142 character(len=*),
intent(in) :: type_name
143 procedure(ax_helm_allocate),
pointer,
intent(in) :: allocator
144 type(ax_helm_allocator_entry),
allocatable :: temp(:)
147 do i = 1,
size(ax_helm_known_types)
148 if (trim(type_name) .eq. trim(ax_helm_known_types(i)))
then
154 do i = 1, ax_helm_registry_size
155 if (trim(type_name) .eq. trim(ax_helm_registry(i)%type_name))
then
161 if (ax_helm_registry_size .eq. 0)
then
162 allocate(ax_helm_registry(1))
164 allocate(temp(ax_helm_registry_size + 1))
165 temp(1:ax_helm_registry_size) = ax_helm_registry
166 call move_alloc(temp, ax_helm_registry)
169 ax_helm_registry_size = ax_helm_registry_size + 1
170 ax_helm_registry(ax_helm_registry_size)%type_name = type_name
171 ax_helm_registry(ax_helm_registry_size)%allocator => allocator
172 end subroutine register_ax_helm
174end submodule ax_helm_fctry
CPU implementation of the one-sided SVV Helmholtz operator.
CPU implementation of the full-stress one-sided SVV Helmholtz operator.
Device implementation of the full-stress one-sided SVV operator.
Defines a Matrix-vector product.
integer, parameter neko_bcknd_sx
integer, parameter neko_bcknd_hip
integer, parameter neko_bcknd_device
integer, parameter neko_bcknd_cuda
integer, parameter neko_bcknd_xsmm
Data and filter construction for spectral vanishing viscosity.
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.
Matrix-vector product for a Helmholtz problem.
CPU matrix-vector product for a Helmholtz problem.
CPU matrix-vector product for a Helmholtz problem with full stress tensor.
CPU one-sided SVV Helmholtz operator.
Device matrix-vector product for an SVV Helmholtz problem.
CPU matrix-vector product for a Helmholtz problem.
Device one-sided full-stress SVV Helmholtz operator.
Spectral vanishing viscosity configuration and coefficients.