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

ipar

ipar

MKL_INT array of size 128, holds integer data needed for Fast Helmholtz Solver (both for Cartesian and spherical coordinate systems). Its elements are described in Table "Elements of the ipar Array":

NOTE:

Initial values can be assigned to the array parameters by the appropriate ?_init_Helmholtz_2D/?_init_Helmholtz_3D/?_init_sph_p/?_init_sph_np and ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D/?_commit_sph_p/?_commit_sph_np routines.

Elements of the ipar Array

Index

Description

0

Contains status value of the last Poisson Solver routine called. In general, it should be 0 on exit from a routine to proceed with the Fast Helmholtz Solver. The element has no predefined values. This element can also be used to inform the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D/?_commit_sph_p/?_commit_sph_np routines of how the Commit step of the computation should be carried out (see Figure "Typical Order of Invoking Poisson Solver Routines"). A non-zero value of ipar[0] with decimal representation


=100a+10b+c, where each of a, b, and c is equal to 0 or 9, indicates that some parts of the Commit step should be omitted.
  • If c=9, the routine omits checking of parameters and initialization of the data structures.

  • If b=9,

    • In the Cartesian case, the routine omits the adjustment of the right-hand side vector f to the Neumann boundary condition (multiplication of boundary values by 0.5 as well as incorporation of the boundary function g) and/or the Dirichlet boundary condition (setting boundary values to 0 as well as incorporation of the boundary function G).

    • For the Helmholtz solver on a sphere, the routine omits computation of the spherical weights for the dpar/spar array.

  • If a=9, the routine omits the normalization of the right-hand side vector f. Depending on the solver, the normalization means:

    • 2D Cartesian case: multiplication by hy2, where hy is the mesh size in the y direction (for details, see Poisson Solver Implementation).
    • 3D (Cartesian) case: multiplication by hz2, where hz is the mesh size in the z direction.
    • Helmholtz solver on a sphere: multiplication by hθ2, where hθ is the mesh size in the θ direction (for details, see Poisson Solver Implementation).

Using ipar[0] you can adjust the routine to your needs and improve efficiency in solving multiple Helmholtz problems that differ only in the right-hand side. You must be cautious when using this method, because any misunderstanding of the commit process may cause incorrect results or program failure (see also Caveat on Parameter Modifications).

1

Contains error messaging options:

  • ipar[1]=-1 indicates that all error messages are printed to the MKL_Poisson_Library_log.txt file in the folder from which the routine is called. If the file does not exist, the routine tries to create it. If the attempt fails, the routine prints information that the file cannot be created to the standard output device (usually, screen).
  • ipar[1]=0 indicates that no error messages will be printed.
  • ipar[1]=1 is the default value. It indicates that all error messages are printed to the standard output device.

In case of errors, the stat parameter contains a non-zero value on exit from a routine regardless of the ipar[1] setting.

2

Contains warning messaging options:

  • ipar[2]=-1 indicates that all warning messages are printed to the MKL_Poisson_Library_log.txt file in the directory from which the routine is called. If the file does not exist, the routine tries to create it. If the attempt fails, the routine prints information that the file cannot be created to the standard output device.
  • ipar[2]=0 indicates that no warning messages will be printed.
  • ipar[2]=1 is the default value. It indicates that all warning messages are printed to the standard output device.

In case of warnings, the stat parameter contains a non-zero value on exit from a routine regardless of the ipar[2] setting.

3 through 5

Internal parameters.

Parameters 6 through 11 are used only in the Cartesian case.

6

Takes this value:

  • 2, if BCtype[0]='P'
  • 1, if BCtype[0]='N'
  • 0, if BCtype[0]='D'
  • -1, otherwise

7

Takes this value:

  • 2, if BCtype[1]='P'
  • 1, if BCtype[1]='N'
  • 0, if BCtype[1]='D'
  • -1, otherwise

8

Takes this value:

  • 2, if BCtype[2]='P'
  • 1, if BCtype[2]='N'
  • 0, if BCtype[2]='D'
  • -1, otherwise

9

Takes this value:

  • 2, if BCtype[3]='P'
  • 1, if BCtype[3]='N'
  • 0, if BCtype[3]='D'
  • -1, otherwise

10

Takes this value:

  • 2, if BCtype[4]='P'
  • 1, if BCtype[4]='N'
  • 0, if BCtype[4]='D'
  • -1, otherwise

11

Takes this value:

  • 2, if BCtype[5]='P'
  • 1, if BCtype[5]='N'
  • 0, if BCtype[5]='D'
  • -1, otherwise

12

Takes the value of

  • nx, that is, the number of intervals along the x-axis, in the Cartesian case.

  • np, that is, the number of intervals along the φ-axis, in the spherical case.

13

Takes the value of

  • ny, that is, the number of intervals along the y-axis, in the Cartesian case

  • nt, that is, the number of intervals along the θ-axis, in the spherical case.

14

Takes the value of nz, the number of intervals along the z-axis. This parameter is used only in the 3D case (Cartesian).

15 through 22

Internal parameters which define the internal partitioning of the dpar/spar array.

The values of ipar[21] - ipar[119] are assigned regardless of the dimension of the problem for the Cartesian solver or of whether the solver on a sphere is periodic.

23

Contains message style options. Specifically:

  • ipar[21]=0 indicates that Poisson Solver routines prints the messages in Fortran-style notations.

  • ipar[21]=1 (default) indicates that Poisson Solver routines prints the messages in C-style notations.

24

Contains the number of OpenMP threads to be used for computations in a multithreaded environment. The default value is 1 in the serial mode, and the result returned by the mkl_get_max_threads function otherwise.

25 through 28

Internal parameters which define the internal partitioning of the dpar/spar array.

25

Takes the value of ipar[18]+1, which specifies the internal partitioning of the dpar/spar array in the periodic Cartesian case.

26

Takes the value of ipar[23]+3*ipar[12]/4, which specifies the internal partitioning of the dpar/spar array in the periodic Cartesian case.

27

Takes the value of ipar[20]+1, which specifies the internal partitioning of the dpar/spar array in the periodic 3D Cartesian case.

28

Takes the value of ipar[25]+3*ipar[13]/4, which specifies the internal partitioning of the dpar/spar array in the periodic 3D Cartesian case.

29 through 39

Unused.

40 through 59

Contain the first twenty elements of the ipar array of the first Trigonometric Transform that the solver uses. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.)

60 through 79

Contain the first twenty elements of the ipar array of the second Trigonometric Transform that the 3D Cartesian and periodic spherical solvers use. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.)

80 through 99

Contain the first twenty elements of the ipar array of the third Trigonometric Transform that the solver uses in case of periodic boundary conditions along the x-axis. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.)

100 through 119

Contain the first twenty elements of the ipar array of the fourth Trigonometric Transform used by periodic spherical solvers and 3D Cartesian solvers with periodic boundary conditions along the y-axis. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.)

120 through 128

Internal parameters used by nonuniform 3D solvers.

NOTE:

While you can declare the ipar array as MKL_INT ipar[120], for future compatibility you should declare ipar as MKL_INT ipar[128].