Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
ax_helm_template.f90
Go to the documentation of this file.
1
3 use ax_product, only : ax_t, ax_helm_allocate, register_ax_helm
4 use ax_helm, only : ax_helm_t
5 use coefs, only : coef_t
6 use mesh, only : mesh_t
7 use num_types, only : rp
8 use space, only : space_t
9 implicit none
10 private
11
15 type, extends(ax_helm_t) :: ax_helm_template_t
16 contains
17 procedure, pass(this) :: compute => ax_helm_template_compute
18 end type ax_helm_template_t
19
21
22contains
23
30 subroutine ax_helm_template_compute(this, w, u, coef, msh, Xh)
31 class(ax_helm_template_t), intent(in) :: this
32 type(mesh_t), intent(in) :: msh
33 type(space_t), intent(in) :: Xh
34 type(coef_t), intent(in) :: coef
35 real(kind=rp), intent(inout) :: w(xh%lx, xh%ly, xh%lz, msh%nelv)
36 real(kind=rp), intent(in) :: u(xh%lx, xh%ly, xh%lz, msh%nelv)
37
38 ! TODO: Replace the identity operation with the desired Ax product.
39 w = u
40 end subroutine ax_helm_template_compute
41
44 procedure(ax_helm_allocate), pointer :: allocator
45 allocator => ax_helm_template_allocate
46 call register_ax_helm('ax_helm_template', allocator)
48
52 class(ax_t), allocatable, intent(inout) :: obj
53 allocate(ax_helm_template_t :: obj)
54 end subroutine ax_helm_template_allocate
55end module ax_helm_template
Allocate a Helmholtz problem matrix-vector product. The implementation is selected by name and comput...
Definition ax.f90:69
Template for a user-defined Helmholtz matrix-vector product.
subroutine ax_helm_template_allocate(obj)
Allocate the user-defined Helmholtz operator.
subroutine ax_helm_template_compute(this, w, u, coef, msh, xh)
Apply the user-defined Helmholtz matrix-vector product.
subroutine, public ax_helm_template_register_types()
Register the user-defined Helmholtz operator.
Defines a Matrix-vector product.
Definition ax.f90:34
Coefficients.
Definition coef.f90:34
Defines a mesh.
Definition mesh.f90:34
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:14
Defines a function space.
Definition space.f90:34
Matrix-vector product for a Helmholtz problem.
Definition ax_helm.f90:44
A scalar Helmholtz-like operator. Extending ax_helm_t supplies compute_vector by applying compute to ...
Base type for a matrix-vector product providing .
Definition ax.f90:43
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Definition coef.f90:135
The function space for the SEM solution fields.
Definition space.f90:64