Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

_commit_Helmholtz_2D/?_commit_Helmholtz_3D

Checks consistency and correctness of input data and initializes certain data structures required to solve 2D/3D Helmholtz problem.

Syntax

void d_commit_Helmholtz_2D (double * f, const double * bd_ax, const double * bd_bx, const double * bd_ay, const double * bd_by, DFTI_DESCRIPTOR_HANDLE * xhandle, MKL_INT * ipar, double * dpar, MKL_INT * stat );

void s_commit_Helmholtz_2D (float * f, const float * bd_ax, const float * bd_bx, const float * bd_ay, const float * bd_by, DFTI_DESCRIPTOR_HANDLE * xhandle, MKL_INT * ipar, float * spar, MKL_INT * stat );

void d_commit_Helmholtz_3D (double * f, const double * bd_ax, const double * bd_bx, const double * bd_ay, const double * bd_by, const double * bd_az, const double * bd_bz, DFTI_DESCRIPTOR_HANDLE * xhandle, DFTI_DESCRIPTOR_HANDLE * yhandle, MKL_INT * ipar, double * dpar, MKL_INT * stat );

void s_commit_Helmholtz_3D (float * f, const float * bd_ax, const float * bd_bx, const float * bd_ay, const float * bd_by, const float * bd_az, const float * bd_bz, DFTI_DESCRIPTOR_HANDLE * xhandle, DFTI_DESCRIPTOR_HANDLE * yhandle, MKL_INT * ipar, float * spar, MKL_INT * stat );

Include Files
  • mkl_poisson.f90
Input Parameters

f

double* for d_commit_Helmholtz_2D/d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_2D/s_commit_Helmholtz_3D.

Contains the right-hand side of the problem packed in a single vector:

  • 2D problem: The size of the vector for the is (nx+1)*(ny+1). The value of the right-hand side in the mesh point (i, j) is stored in f[i+j*(nx+1)] .

  • 3D problem: The size of the vector for the is (nx+1)*(ny+1)*(nz+1). The value of the right-hand side in the mesh point (i, j, k) is stored in f[i+j*(nx+1)+k*(nx+1)*(ny+1)].

Note that to solve the Laplace problem, you should set all the elements of the array f to 0.

Note also that the array f may be altered by the routine. To preserve the f vector, save it to another memory location.

ipar

MKL_INT array of size 128. Contains integer data to be used by the Fast Helmholtz Solver (for details, refer to ipar).

dpar

double array of size depending on the dimension of the problem:

  • 2D problem: 5*nx/2+7

  • 3D problem: 5*(nx+ny)/2+9

Contains double-precision data to be used by the 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*nx/2+7

  • 3D problem: 5*(nx+ny)/2+9

Contains single-precision data to be used by the Fast Helmholtz Solver (for details, refer to dpar and spar).

bd_ax

double* for d_commit_Helmholtz_2D/d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_2D/s_commit_Helmholtz_3D.

Contains values of the boundary condition on the leftmost boundary of the domain along the x-axis (for more information, refer to a detailed description of bd_ax).

bd_bx

double* for d_commit_Helmholtz_2D/d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_2D/s_commit_Helmholtz_3D.

Contains values of the boundary condition on the rightmost boundary of the domain along the x-axis (for more information, refer to a detailed description of bd_bx).

bd_ay

double* for d_commit_Helmholtz_2D/d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_2D/s_commit_Helmholtz_3D.

Contains values of the boundary condition on the leftmost boundary of the domain along the y-axis (for more information, refer to a detailed description of bd_ay).

bd_by

double* for d_commit_Helmholtz_2D/d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_2D/s_commit_Helmholtz_3D.

Contains values of the boundary condition on the rightmost boundary of the domain along the y-axis (for more information, refer to a detailed description of bd_by).

bd_az

double* for d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_3D.

Used only by ?_commit_Helmholtz_3D. Contains values of the boundary condition on the leftmost boundary of the domain along the z-axis (for more information, refer to a detailed description of bd_az).

bd_bz

double* for d_commit_Helmholtz_3D,

float* for s_commit_Helmholtz_3D.

Used only by ?_commit_Helmholtz_3D. Contains values of the boundary condition on the rightmost boundary of the domain along the z-axis (for more information, refer to a detailed description of bd_bz).

Output Parameters

f

Contains right-hand side of the problem, possibly altered on output.

ipar

Contains integer data to be used by Fast Helmholtz Solver. Modified on output as explained in ipar.

dpar

Contains double-precision data to be used by Fast Helmholtz Solver. Modified on output as explained in dpar and spar.

spar

Contains single-precision data to be used by Fast Helmholtz Solver. Modified on output as explained in dpar and spar.

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 ?_commit_Helmholtz_3D.

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 ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routines check the consistency and correctness of the parameters to be passed to the solver routines ?_Helmholtz_2D/?_Helmholtz_3D. They also initialize the xhandle and yhandle data structures, ipar array, and dpar or spar array, depending upon the routine precision. Refer to Common Parameters to find out which particular array elements the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routines initialize and to what values these elements are initialized.

The routines perform only a basic check for correctness and consistency. If you are going to modify parameters of Poisson Solver routines, see Caveat on Parameter Modifications. Unlike ?_init_Helmholtz_2D/?_init_Helmholtz_3D, you must call the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routines in your code. 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 warnings.

stat= 0

The routine successfully completed the task.

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 an 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.