Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

?_sph_p/?_sph_np

Computes the solution of the spherical Helmholtz problem specified by the parameters.

Syntax

void d_sph_p(double* f, DFTI_DESCRIPTOR_HANDLE* handle_s, DFTI_DESCRIPTOR_HANDLE* handle_c, MKL_INT* ipar, double* dpar, MKL_INT* stat);

void s_sph_p(float* f, DFTI_DESCRIPTOR_HANDLE* handle_s, DFTI_DESCRIPTOR_HANDLE* handle_c, MKL_INT* ipar, float* spar, MKL_INT* stat);

void d_sph_np(double* f, DFTI_DESCRIPTOR_HANDLE* handle, MKL_INT* ipar, double* dpar, MKL_INT* stat);

void s_sph_np(float* f, DFTI_DESCRIPTOR_HANDLE* handle, MKL_INT* ipar, float* spar, MKL_INT* stat);

Include Files

  • mkl.h

Input Parameters

f

double* for d_sph_p/d_sph_np,

float* for s_sph_p/s_sph_np.

Contains the right-hand side of the problem packed in a single vector and modified by the appropriate ?_commit_sph_p/?_commit_sph_np routine. Note that an attempt to substitute the original right-hand side vector, which was passed to the ?_commit_sph_p/?_commit_sph_np routine, at this point results in an incorrect solution.

The size of the vector is (np+1)*(nt+1) and the value of the modified right-hand side in the mesh point (i, j) is stored in f[i+j*(np+1)] .

handle_s, handle_c, handle

DFTI_DESCRIPTOR_HANDLE*. Data structures used by Intel® oneAPI Math Kernel Library (oneMKL) FFT interface (for details, refer toFFT Functions). handle_s and handle_c are used only in ?_sph_p and handle is used only in ?_sph_np.

ipar

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

dpar

double array of size 5*np/2+nt+10. Contains double-precision data to be used by the Fast Helmholtz Solver on a sphere (for details, refer to dpar and spar).

spar

float array of size 5*np/2+nt+10. Contains single-precision data to be used by the Fast Helmholtz Solver on a sphere (for details, refer to dpar and spar).

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.

handle_s, handle_c, handle

Data structures used by the Intel® oneAPI Math Kernel Library (oneMKL) FFT interface.

ipar

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

dpar

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

spar

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

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 sph_p/sph_np routines compute the approximate solution on a sphere of the Helmholtz problem defined in the previous calls to the corresponding initialization and commit routines. The solution is computed according to the 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 np and nt are passed to each of the routines 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= -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 memory was insufficient to complete 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 an Intel® oneAPI Math Kernel Library (oneMKL) 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.