This section provides description of array parameters ipar, dpar and spar, which hold PL routine options in both Cartesian and spherical cases.
Initial values are 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.
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":
Index |
Description |
|||
---|---|---|---|---|
0 |
Contains status value of the last called PL routine. In general, it should be 0 to proceed with 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 ). A non-zero value of ipar[0] with decimal representation
Using ipar[0] you can adjust the routine to your needs and gain efficiency in solving multiple Helmholtz problems that differ only in the right-hand side. You must be cautious using this opportunity, because misunderstanding of the commit process may cause wrong results or program failure (see also Caveat on Parameter Modifications). |
|||
1 |
Contains error messaging options:
In case of errors, the stat parameter will acquire a non-zero value regardless of the ipar[1] setting. |
|||
2 |
Contains warning messaging options:
In case of warnings, the stat parameter will acquire a non-zero value regardless of the ipar[2] setting. |
|||
3 |
Contains the number of the combination of boundary conditions. In the Cartesian case, it corresponds to the value that the BCtype parameter holds:
The Helmholtz solver on a sphere uses this parameter only in a periodic case. The bp and bt parameters of the ?_init_sph_p/?_init_sph_np routine, which initializes ipar[3], determine its value: |
|||
Parameters 4 through 9 are used only in Cartesian case. | ||||
4 |
Takes the value of 1 if BCtype[0]='N', 0 if BCtype[0]='D', and -1 otherwise. |
|||
5 |
Takes the value of 1 if BCtype[1]='N', 0 if BCtype[1]='D', and -1 otherwise. |
|||
6 |
Takes the value of 1 if BCtype[2]='N', 0 if BCtype[2]='D', and -1 otherwise. |
|||
7 |
Takes the value of 1 if BCtype[3]='N', 0 if BCtype[3]='D', and -1 otherwise. |
|||
8 |
Takes the value of 1 if BCtype[4]='N', 0 if BCtype[4]='D', and -1 otherwise. This parameter is used only in the 3D case. |
|||
9 |
Takes the value of 1 if BCtype[5]='N', 0 if BCtype[5]='D', and -1 otherwise. This parameter is used only in the 3D case. |
|||
10 |
Takes the value of |
|||
11 |
Takes the value of |
|||
12 |
Takes the value of nz, the number of intervals along z-axis. This parameter is used only in the 3D case (Cartesian). |
|||
13 |
Takes the value of 6, which specifies the internal partitioning of the dpar/spar array. |
|||
14 |
Takes the value of ipar[13]+ipar[10]+1, which specifies the internal partitioning of the dpar/spar array. |
|||
Subsequent values of ipar depend upon the dimension of the problem or upon whether the solver on a sphere is periodic. |
||||
|
2D case |
3D case |
Periodic case | Non-periodic case |
15 |
Unused |
Takes the value of ipar[14]+1, which specifies the internal partitioning of the dpar/spar array. |
||
16 |
Unused |
Takes the value of ipar[14]+ipar[11]+1, which specifies the internal partitioning of the dpar/spar array. | ||
17 |
Takes the value of ipar[14]+1, which specifies the internal partitioning of the dpar/spar array. |
Takes the value of ipar[16]+1, which specifies the internal partitioning of the dpar/spar array. |
||
18 |
Takes the value of ipar[14]+3*ipar[10]/2+1, which specifies the internal partitioning of the dpar/spar array. |
Takes the value of ipar[16]+3*ipar[10]/2+1, which specifies the internal partitioning of the dpar/spar array. |
Takes the value of ipar[16]+3*ipar[10]/4+1, which specifies the internal partitioning of the dpar/spar array. |
Takes the value of ipar[16]+3*ipar[10]/2+1, which specifies the internal partitioning of the dpar/spar array. |
19 |
Unused |
Takes the value of ipar[18]+1, which specifies the internal partitioning of the dpar/spar array. |
Unused | |
20 |
Unused |
Takes the value of ipar[18]+3*ipar[11]/2+1, which specifies the internal partitioning of the dpar/spar array. |
Takes the value of ipar[18]+3*ipar[10]/4+1, which specifies the internal partitioning of the dpar/spar array. |
Unused |
Subsequent values of ipar are assigned regardless. |
||||
21 |
Contains message style options: |
|||
22 |
Contains the number of 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. |
|||
23 through 39 |
Unused in the current implementation of the Poisson Library. |
|||
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 and periodic solvers use. (For details, see Common Parameters in the "Trigonometric Transform Routines" section.) |
You may declare the ipar array in your code as int ipar[80]. However, for compatibility with later versions of Intel MKL Poisson Library, which may require more ipar values, it is highly recommended to declare ipar as int ipar[128].
Arrays dpar and spar are the same except in the data precision:
Holds data needed for double-precision Fast Helmholtz Solver computations.
Holds data needed for single-precision Fast Helmholtz Solver computations.
As dpar and spar have similar elements in respective positions, the elements are described together in Table "Elements of the dpar and spar Arrays":
Index |
Description |
---|---|
0 |
In the Cartesian case, contains the length of the interval along x-axis right after a call to the ?_init_Helmholtz_2D/?_init_Helmholtz_3D routine or the mesh size hx in the x direction (for details, see Poisson Library Implemented) after a call to the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine. In the spherical case, contains the length of the interval along φ-axis right after a call to the ?_init_sph_p/?_init_sph_np routine or the mesh size hφ in the φ direction (for details, see Poisson Library Implemented) after a call to the ?_commit_sph_p/?_commit_sph_np routine. |
1 |
In the Cartesian case, contains the length of the interval along y-axis right after a call to the ?_init_Helmholtz_2D/?_init_Helmholtz_3D routine or the mesh size hy in the y direction (for details, see Poisson Library Implemented) after a call to the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine. In the spherical case, contains the length of the interval along θ-axis right after a call to the ?_init_sph_p/?_init_sph_np routine or the mesh size hθ in the θ direction (for details, see Poisson Library Implemented) after a call to the ?_commit_sph_p/?_commit_sph_np routine. |
2 |
In the Cartesian case, contains the length of the interval along z-axis right after a call to the ?_init_Helmholtz_2D/?_init_Helmholtz_3D routine or the mesh size hz in the z direction (for details, see Poisson Library Implemented) after a call to the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine. In the Cartesian solver, this parameter is used only in the 3D case. In the spherical solver, contains the coordinate of the leftmost boundary along θ-axis after a call to the ?_init_sph_p/?_init_sph_np routine. |
3 |
Contains the value of the coefficient q after a call to the ?_init_Helmholtz_2D/?_init_Helmholtz_3D/?_init_sph_p/?_init_sph_np routine. |
4 |
Contains the tolerance parameter after a call to the ?_init_Helmholtz_2D/?_init_Helmholtz_3D/?_init_sph_p/?_init_sph_np routine.
The default value for this parameter is 1.0E-10 in case of double-precision computations or 1.0E-4 in case of single-precision computations. You can increase the value of the tolerance, for instance, to avoid the warnings that may appear. |
ipar[13]-1 through ipar[14]-1 |
In the Cartesian case, contain the spectrum of the 1D problem along x-axis after a call to the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine. In the spherical case, contains the spectrum of the 1D problem along φ-axis after a call to the ?_commit_sph_p/?_commit_sph_np routine. |
ipar[15]-1 through ipar[16]-1 |
In the Cartesian case, contain the spectrum of the 1D problem along y-axis after a call to the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine. These elements are used only in the 3D case. In the spherical case, contains the spherical weights after a call to the ?_commit_sph_p/?_commit_sph_np routine. |
ipar[17]-1 through ipar[18]-1 |
Take the values of the (staggered) sine/cosine in the mesh points: |
ipar[19]-1 through ipar[20]-1 |
Take the values of the (staggered) sine/cosine in the mesh points:
These elements are not used in the 2D Cartesian case and in the non-periodic spherical case. |
You may define the array size depending upon the type of the problem to solve.
Flexibility of the PL interface enables you to skip calling the ?_init_Helmholtz_2D/?_init_Helmholtz_3D/?_init_sph_p/?_init_sph_np routine and to initialize the basic data structures explicitly in your code. You may also need to modify contents of ipar, dpar and spar arrays after initialization. When doing so, provide correct and consistent data in the arrays. Mistakenly altered arrays cause errors or wrong computation. You can perform a basic check for correctness and consistency of parameters by calling the ?_commit_Helmholtz_2D/?_commit_Helmholtz_3D routine; however, this does not ensure the correct solution but only reduces the chance of errors or wrong results.
To supply correct and consistent parameters to PL routines, you should have considerable experience in using the PL interface and good understanding of the solution process as well as elements that the ipar, spar and dpar arrays contain and dependencies between values of these elements.
However, in rare occurrences, even advanced users might fail in tuning parameters for the Fast Helmholtz Solver. In cases like these, refer for technical support at http://www.intel.com/software/products/support/ .
The only way that ensures a proper solution of a Helmholtz problem is to follow a typical sequence of invoking the routines and not change the default set of parameters. So, avoid modifications of ipar, dpar and spar arrays unless a strong need arises.
Copyright © 1994 - 2011, Intel Corporation. All rights reserved.