Contents

# Poisson Solver Implementation

Poisson Solver routines enable approximate solving of certain two-dimensional and three-dimensional problems. Figure
"Structure of the Poisson Solver"
shows the general structure of the Poisson Solver.
Although in the Cartesian case, both periodic and non-periodic solvers are also supported, they use the same interfaces.
Sections below provide details of the problems that can be solved using
Intel® oneAPI Math Kernel Library
Poisson Solver.

## Two-Dimensional Problems

Notational Conventions
The Poisson Solver interface description uses the following notation for boundaries of a rectangular domain
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
on a Cartesian plane:
bd_a
x
= {
x
=
a
x
,
a
y
y
b
y
},
bd_b
x
= {
x
=
b
x
,
a
y
y
b
y
}
bd_a
y
= {
a
x
x
b
x
,
y
=
a
y
},
bd_b
y
= {
a
x
x
b
x
,
y
=
b
y
}.
The following figure shows these boundaries:
The wildcard "+" may stand for any of the symbols
a
x
,
b
x
,
a
y
,
b
y
, so
bd_+
denotes any of the above boundaries.
The Poisson Solver interface description uses the following notation for boundaries of a rectangular domain
a
φ
< φ <
b
φ
,
a
θ
< θ <
b
θ
on a sphere 0 ≤ φ ≤ 2
π
, 0 ≤ θ ≤
π
:
bd_a
φ
= {φ =
a
φ
,
a
θ
≤ θ ≤
b
θ
},
bd_b
φ
= {φ =
b
φ
,
a
θ
≤ θ ≤
b
θ
},
bd_a
θ
= {
a
φ
≤ φ ≤
b
φ
, θ =
a
θ
},
bd_b
θ
= {
a
φ
≤ φ ≤
b
φ
, θ =
b
θ
}.
The wildcard "~" may stand for any of the symbols
a
φ
,
b
φ
,
a
θ
,
b
θ
, so
bd_~
denotes any of the above boundaries.
Two-dimensional Helmholtz problem on a Cartesian plane
The two-dimensional (2D) Helmholtz problem is to find an approximate solution of the Helmholtz equation
in a rectangle, that is, a rectangular domain
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
, with one of the following boundary conditions on each boundary
bd_+
:
• The Dirichlet boundary condition
• The Neumann boundary condition
where
n
= -
x
on
bd_a
x
,
n
=
x
on
bd_b
x
,
n
= -
y
on
bd_a
y
,
n
=
y
on
bd_b
y
.
• Periodic boundary conditions
Two-dimensional Poisson problem on a Cartesian plane
The Poisson problem is a special case of the Helmholtz problem, when
q
=0. The 2D Poisson problem is to find an approximate solution of the Poisson equation
in a rectangle
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
with the Dirichlet, Neumann, or periodic boundary conditions on each boundary
bd_+
. In case of a problem with the Neumann boundary condition on the entire boundary, you can find the solution of the problem only up to a constant. In this case, the Poisson Solver will compute the solution that provides the minimal Euclidean norm of a residual.
Two-dimensional (2D) Laplace problem on a Cartesian plane
The Laplace problem is a special case of the Helmholtz problem, when
q
=0 and
f(x, y)
=0. The 2D Laplace problem is to find an approximate solution of the Laplace equation
in a rectangle
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
with the Dirichlet, Neumann, or periodic boundary conditions on each boundary
bd_+
.
Helmholtz problem on a sphere
The Helmholtz problem on a sphere is to find an approximate solution of the Helmholtz equation
in a domain bounded by angles
a
φ
≤ φ ≤
b
φ
,
a
θ
≤ θ ≤
b
θ
(spherical rectangle), with boundary conditions for particular domains listed in Table
"Details of Helmholtz Problem on a Sphere"
.
Details of Helmholtz Problem on a Sphere
Domain on a sphere
Boundary condition
Periodic/non-periodic case
Rectangular, that is,
b
φ
-
a
φ
< 2
π
and
b
θ
-
a
θ
<
π
Homogeneous Dirichlet boundary conditions on each boundary
bd_~
non-periodic
Where
a
φ
= 0,
b
φ
= 2
π
, and
b
θ
-
a
θ
<
π
Homogeneous Dirichlet boundary conditions on the boundaries
bd_a
θ
and
bd_b
θ
periodic
Entire sphere, that is,
a
φ
= 0,
b
φ
= 2
π
,
a
θ
= 0, and
b
θ
=
π
Boundary condition
at the poles
periodic
Poisson problem on a sphere
The Poisson problem is a special case of the Helmholtz problem, when
q
=0. The Poisson problem on a sphere is to find an approximate solution of the Poisson equation
in a spherical rectangle
a
φ
≤ φ ≤
b
φ
,
a
θ
≤ θ ≤
b
θ
in cases listed in Table
"Details of Helmholtz Problem on a Sphere"
. The solution to the Poisson problem on the entire sphere can be found up to a constant only. In this case, Poisson Solver will compute the solution that provides the minimal Euclidean norm of a residual.
Approximation of 2D problems
To find an approximate solution for any of the 2D problems, in the rectangular domain a uniform mesh can be defined for the Cartesian case as:
and for the spherical case as:
The Poisson Solver uses the standard five-point finite difference approximation on this mesh to compute the approximation to the solution:
• In the Cartesian case, the values of the approximate solution will be computed in the mesh points (
x
i
,
y
j
) provided that you can supply the values of the right-hand side
f(x, y)
in these points and the values of the appropriate boundary functions
G(x, y)
and/or
g(x,y)
in the mesh points laying on the boundary of the rectangular domain.
• In the spherical case, the values of the approximate solution will be computed in the mesh points (φ
i
, θ
j
) provided that you can supply the values of the right-hand side
f
(φ, θ) in these points.
The number of mesh intervals
n
φ
in the φ direction of a spherical mesh must be even in the periodic case. The Poisson Solver does not support spherical meshes that do not meet this condition.

## Three-Dimensional Problems

Notational Conventions
The Poisson Solver interface description uses the following notation for boundaries of a parallelepiped domain
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
,
a
z
<
z
<
b
z
:
bd_a
x
= {
x
=
a
x
,
a
y
y
b
y
,
a
z
z
b
z
},
bd_b
x
= {
x
=
b
x
,
a
y
y
b
y
,
a
z
z
b
z
},
bd_a
y
= {
a
x
x
b
x
,
y
=
a
y
,
a
z
z
b
z
},
bd_b
y
= {
a
x
x
b
x
,
y
=
b
y
,
a
z
z
b
z
},
bd_a
z
= {
a
x
x
b
x
,
a
y
y
b
y
,
z
=
a
z
},
bd_b
x
= {
a
x
x
b
x
,
a
y
y
b
y
,
z
=
b
z
}.
The following figure shows these boundaries:
The wildcard "+" may stand for any of the symbols
a
x
,
b
x
,
a
y
,
b
y
,
a
z
,
b
z
, so
bd_+
denotes any of the above boundaries.
Three-dimensional (3D) Helmholtz problem
The 3D Helmholtz problem is to find an approximate solution of the Helmholtz equation
in a parallelepiped, that is, a parallelepiped domain
a
x
<
x
<
b
x
,
a
y
<
y
<
b
y
,
a
z
<
z
<
b
z
, with one of the following boundary conditions on each boundary
bd_+
:
• The Dirichlet boundary condition
• The Neumann boundary condition
where
n
= -
x
on
bd_a
x
,
n
=
x
on
bd_b
x
,
n
= -
y
on
bd_a
y
,
n
=
y
on
bd_b
y
,
n
= -
z
on
bd_a
z
,
n
=
z
on
bd_b
z
.
• Periodic boundary conditions
Three-dimensional (3D) Poisson problem
The Poisson problem is a special case of the Helmholtz problem, when
q
=0. The 3D Poisson problem is to find an approximate solution of the Poisson equation