FV3 Bundle
solve_helmholz.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine solve_helmholz (x, b, c, nx, ny, deltax, deltay)
 Solve a Helmholz equation. More...
 

Function/Subroutine Documentation

◆ solve_helmholz()

subroutine solve_helmholz ( real(kind=kind_real), dimension(nx,ny), intent(out)  x,
real(kind=kind_real), dimension(nx,ny), intent(in)  b,
real(kind=kind_real), intent(in)  c,
integer, intent(in)  nx,
integer, intent(in)  ny,
real(kind=kind_real), intent(in)  deltax,
real(kind=kind_real), intent(in)  deltay 
)

Solve a Helmholz equation.

This routine solves the Helmholz equation: \( \nabla^2 \psi + c \psi = b \), where \( c \) is a constant, and where \( \nabla^2 \) is the two-dimensional, 5-point finite-difference Laplacian.

The solution method is to apply an FFT in the zonal direction. This reduces the problem to a set of un-coupled tri-diagonal systems that are solved with the standard back-substitution algorithm.

Parameters
[in]nxZonal grid dimension
[in]nyMeridional grid dimension
[out]xSolution
[in]bRight hand side
[in]cCoefficient in the linear operator
[in]deltaxZonal grid spacing (non-dimensional)
[in]deltayMeridional grid spacing (non-dimensional)

Definition at line 21 of file solve_helmholz.f90.

Here is the call graph for this function:
Here is the caller graph for this function: