helmholtz_operator_m Module

Routines related with Helmholtz operator



Functions

public pure function helmholtz_single_inner(mesh, u, ind, co, xiv, lambdav) result(res)

Computes helmholtz operator for single inner grid point

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh

Mesh

real(kind=FP), intent(in), dimension(mesh%n_points) :: u

Variable

integer, intent(in) :: ind

Index where helmholtz operator should be computed MUST be index of an inner grid pointt (not checked for performance reasons)

real(kind=FP), intent(in), optional, dimension(mesh%n_points) :: co

Coefficient

real(kind=FP), intent(in), optional :: xiv

Coefficient at mesh point

real(kind=FP), intent(in), optional :: lambdav

Coefficient at mesh point

Return Value real(kind=FP)

result

public function helmholtz_single_boundary(mesh, u, ind, bnd_descr) result(res)

Computes helmholtz operator for single boundary point

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh

Mesh

real(kind=FP), intent(in), dimension(mesh%n_points) :: u

Variable

integer, intent(in) :: ind

Index where helmholtz operator should be computed MUST be index of a boundary point (not checked for performance reasons)

integer, intent(in) :: bnd_descr

Descriptor for boundary condition

Return Value real(kind=FP)

result

public pure function helmholtz_single_ghost(mesh, u, ind) result(res)

Computes helmholtz operator for single boundary point

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh

Mesh

real(kind=FP), intent(in), dimension(mesh%n_points) :: u

Variable

integer, intent(in) :: ind

Index where helmholtz operator should be computed MUST be index of a ghost point (not checked for performance reasons)

Return Value real(kind=FP)

result


Subroutines

public subroutine build_helmholtz_csr(mesh, hcsr, hdiag_inv, co, xi, lambda, bnd_descrs)

Builds Helmholtz matrix

Arguments

Type IntentOptional Attributes Name
type(mesh_cart_t), intent(in) :: mesh

Mesh

type(csrmat_t), intent(inout) :: hcsr

Helmholtz matrix. If hcsr%i is already allocated on input, the matrix is assumed to have the provided non-zero structure with all fields allocated, otherwise structure is allocated and created from scratch.

real(kind=FP), intent(out), optional, dimension(mesh%get_n_points()) :: hdiag_inv

Inverse of diagonal of Helmholtz matrix

real(kind=FP), intent(in), optional, dimension(mesh%get_n_points()) :: co

Coefficient within Helmholtz operator

real(kind=FP), intent(in), optional, dimension(mesh%get_n_points_inner()) :: xi

Coefficient within Helmholtz operator

real(kind=FP), intent(in), optional, dimension(mesh%get_n_points_inner()) :: lambda

Coefficient within Helmholtz operator

integer, intent(in), optional, dimension(mesh%get_n_points_boundary()) :: bnd_descrs

Descriptors_m for type of boundary conditions