Contents

# ?_Helmholtz_2D/?_Helmholtz_3D

Computes the solution of the 2D/3D Helmholtz problem specified by the parameters.

## Syntax

Include Files
• mkl.h
Input Parameters
f
double*
for
d_Helmholtz_2D/d_Helmholtz_3D
,
float*
for
s_Helmholtz_2D/s_Helmholtz_3D
.
Contains the right-hand side of the problem packed in a single vector and modified by the appropriate
?_commit_Helmholtz_2D/?_commit_Helmholtz_3D
routine. Note that an attempt to substitute the original right-hand side vector, which was passed to the
?_commit_Helmholtz_2D/?_commit_Helmholtz_3D
routine, at this point results in an incorrect solution.
• 2D problem: the size of the vector is (
nx
+1)*(
ny
+1). The value of the modified right-hand side in the mesh point (
i, j
) is stored in
f
[
i+j
*(
nx
+1)].
• 3D problem: the size of the vector is (
nx
+1)*(
ny
+1)*(
nz
+1). The value of the modified right-hand side in the mesh point (
i, j, k
) is stored in
f
[
i+j
*(
nx
+1)+
k
*(
nx
+1)*(
ny
+1)].
xhandle, yhandle
DFTI_DESCRIPTOR_HANDLE*
. Data structures used by the
Intel® oneAPI Math Kernel Library
FFT interface (for details, refer toFFT Functions).
yhandle
is used only by
?_Helmholtz_3D
.
ipar
MKL_INT
array of size 128. Contains integer data to be used by Fast Helmholtz Solver (for details, refer to
ipar
).
dpar
double
array of size depending on the dimension of the problem:
• 2D problem: 5*/2+7
• 3D problem: 5*(
nx
+
ny
)/2+9
Contains double-precision data to be used by Fast Helmholtz Solver (for details, refer to
dpar
and
spar
).
spar
float
array of size depending on the dimension of the problem:
• 2D problem: 5*/2+7
• 3D problem: 5*(
nx
+
ny
)/2+9
Contains single-precision data to be used by Fast Helmholtz Solver (for details, refer to
dpar
and
spar
).
bd_ax
double*
for
d_Helmholtz_2D/d_Helmholtz_3D
,
float*
for
s_Helmholtz_2D/s_Helmholtz_3D
.
Contains values of the boundary condition on the leftmost boundary of the domain along the
x
bd_ax
).
bd_bx
double*
for
d_Helmholtz_2D/d_Helmholtz_3D
,
float*
for
s_Helmholtz_2D/s_Helmholtz_3D
.
Contains values of the boundary condition on the rightmost boundary of the domain along the
x
bd_bx
).
bd_ay
double*
for
d_Helmholtz_2D/d_Helmholtz_3D
,
float*
for
s_Helmholtz_2D/s_Helmholtz_3D
.
Contains values of the boundary condition on the leftmost boundary of the domain along the
y
bd_ay
).
bd_by
double*
for
d_Helmholtz_2D/d_Helmholtz_3D
,
float*
for
s_Helmholtz_2D/s_Helmholtz_3D
.
Contains values of the boundary condition on the rightmost boundary of the domain along the
y
bd_by
).
bd_az
double*
for
d_Helmholtz_3D
,
float*
for
s_Helmholtz_3D
.
Used only by
?_Helmholtz_3D
. Contains values of the boundary condition on the leftmost boundary of the domain along the
z
bd_az
).
bd_bz
double*
for
d_Helmholtz_3D
,
float*
for
s_Helmholtz_3D
.
Used only by
?_Helmholtz_3D
. Contains values of the boundary condition on the rightmost boundary of the domain along the
z
bd_bz
).
To avoid incorrect computation results, do not change arrays
bd_ax
,
bd_bx
,
bd_ay
,
bd_by
,
bd_az
,
bd_bz
between a call to the
?_commit_Helmholtz_2D/?_commit_Helmholtz_3D
routine and a subsequent call to the appropriate
?_Helmholtz_2D/?_Helmholtz_3D
routine.
Output Parameters
f
On output, contains the approximate solution to the problem packed the same way as the right-hand side of the problem was packed on input.
xhandle, yhandle
Data structures used by the
Intel® oneAPI Math Kernel Library
FFT interface. Although the addresses do not change, the structures are modified on output.
ipar
Contains integer data to be used by Fast Helmholtz Solver. Modified on output as explained in
ipar
.
stat
MKL_INT*
. Routine completion status, which is also written to
ipar[0]
. Continue to call other Poisson Solver routines only if the status is 0.
Description
The
?_Helmholtz_2D/?_Helmholtz_3D
routines compute the approximate solution of the Helmholtz problem defined in the previous calls to the corresponding initialization and commit routines. The solution is computed according to formulas given in Poisson Solver Implementation. The
f
parameter, which initially holds the packed vector of the right-hand side of the problem, is replaced by the computed solution packed in the same way. Values of
ax
,
bx
,
ay
,
by
,
az
, and
bz
are passed to the routines with the
spar/dpar
array, and values of
nx
,
ny
,
nz
, and
BCtype
are passed with the
ipar
array.
Return Values
stat
= 1
The routine completed without errors but with some warnings.
stat
= 0
The routine successfully completed the task.
stat
= -2
The routine stopped because division by zero occurred. It usually happens if the data in the
dpar
or
spar
array was altered by mistake.
stat
= -3
The routine stopped because the sufficient memory was unavailable for the computations.
stat
= -100
The routine stopped because an error in the input data was found or the data in the
dpar
,
spar
, or
ipar
array was altered by mistake.
stat
= -1000
The routine stopped because of the
Intel® oneAPI Math Kernel Library
FFT or TT interface error.
stat
= -10000
The routine stopped because the initialization failed to complete or the parameter
ipar
[0] was altered by mistake.
stat
= -99999
The routine failed to complete the task because of a fatal error.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.