Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
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

Poisson Solver Implementation Details

Several aspects of the Intel® oneAPI Math Kernel Library (oneMKL) Poisson Solver interface are platform-specific and language-specific. To promote portability of the Intel® oneAPI Math Kernel Library (oneMKL) Poisson Solver interface across platforms and ease of use across different languages, Intel® oneAPI Math Kernel Library (oneMKL) provides you with the Poisson Solver language-specific header file to include in your code:

  • mkl_poisson.f90, to be used together with mkl_dfti.f90.
NOTE:

  • Intel® oneAPI Math Kernel Library (oneMKL) Poisson Solver interface supports Fortran versions starting with Fortran 90.
  • Use of the Intel® oneAPI Math Kernel Library (oneMKL) Poisson Solver software without including the above language-specific header files is not supported.

Header File

The header file defines the following function prototypes for the Cartesian solver:

SUBROUTINE D_INIT_HELMHOLTZ_2D (AX, BX, AY, BY, NX, NY, BCTYPE, Q, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER NX, NY, STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION AX, BX, AY, BY, Q 
   DOUBLE PRECISION DPAR(*) 
   CHARACTER(4) BCTYPE 
END SUBROUTINE 
    
    
SUBROUTINE D_COMMIT_HELMHOLTZ_2D (F, BD_AX, BD_BX, BD_AY, BD_BY, XHANDLE, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION F(IPAR(11)+1,*)    
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION BD_AX(*), BD_BX(*), BD_AY(*), BD_BY(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE D_HELMHOLTZ_2D (F, BD_AX, BD_BX, BD_AY, BD_BY, XHANDLE, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION F(IPAR(11)+1,*)    
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION BD_AX(*), BD_BX(*), BD_AY(*), BD_BY(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_INIT_HELMHOLTZ_2D (AX, BX, AY, BY, NX, NY, BCTYPE, Q, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER NX, NY, STAT 
   INTEGER IPAR(*) 
   REAL AX, BX, AY, BY, Q 
   REAL SPAR(*) 
   CHARACTER(4) BCTYPE 
END SUBROUTINE 
    
    
SUBROUTINE S_COMMIT_HELMHOLTZ_2D (F, BD_AX, BD_BX, BD_AY, BD_BY, XHANDLE, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL F(IPAR(11)+1,*)    
   REAL SPAR(*)  
   REAL BD_AX(*), BD_BX(*), BD_AY(*), BD_BY(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_HELMHOLTZ_2D (F, BD_AX, BD_BX, BD_AY, BD_BY, XHANDLE, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL F(IPAR(11)+1,*)    
   REAL SPAR(*)  
   REAL BD_AX(*), BD_BX(*), BD_AY(*), BD_BY(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE FREE_HELMHOLTZ_2D (XHANDLE, IPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE 
END SUBROUTINE 
    
    
    
SUBROUTINE D_INIT_HELMHOLTZ_3D (AX, BX, AY, BY, AZ, BZ, NX, NY, NZ, BCTYPE, Q, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER NX, NY, NZ, STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION AX, BX, AY, BY, AZ, BZ, Q 
   DOUBLE PRECISION DPAR(*)  
   CHARACTER(6) BCTYPE 
END SUBROUTINE 
    
    
SUBROUTINE D_COMMIT_HELMHOLTZ_3D (F, BD_AX, BD_BX, BD_AY, BD_BY, BD_AZ, BD_BZ, XHANDLE, YHANDLE, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION F(IPAR(11)+1,IPAR(12)+1,*) 
   DOUBLE PRECISION DPAR(*) 
   DOUBLE PRECISION BD_AX(IPAR(12)+1,*), BD_BX(IPAR(12)+1,*), BD_AY(IPAR(11)+1,*) 
   DOUBLE PRECISION BD_BY(IPAR(11)+1,*), BD_AZ(IPAR(11)+1,*), BD_BZ(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE, YHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE D_HELMHOLTZ_3D (F, BD_AX, BD_BX, BD_AY, BD_BY, BD_AZ, BD_BZ, XHANDLE, YHANDLE, IPAR, DPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION F(IPAR(11)+1,IPAR(12)+1,*) 
   DOUBLE PRECISION DPAR(*) 
   DOUBLE PRECISION BD_AX(IPAR(12)+1,*), BD_BX(IPAR(12)+1,*), BD_AY(IPAR(11)+1,*) 
   DOUBLE PRECISION BD_BY(IPAR(11)+1,*), BD_AZ(IPAR(11)+1,*), BD_BZ(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE, YHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_INIT_HELMHOLTZ_3D (AX, BX, AY, BY, AZ, BZ, NX, NY, NZ, BCTYPE, Q, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER NX, NY, NZ, STAT 
   INTEGER IPAR(*) 
   REAL AX, BX, AY, BY, AZ, BZ, Q 
   REAL SPAR(*)  
   CHARACTER(6) BCTYPE 
END SUBROUTINE 
    
    
SUBROUTINE S_COMMIT_HELMHOLTZ_3D (F, BD_AX, BD_BX, BD_AY, BD_BY, BD_AZ, BD_BZ, XHANDLE, YHANDLE, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL F(IPAR(11)+1,IPAR(12)+1,*) 
   REAL SPAR(*) 
   REAL BD_AX(IPAR(12)+1,*), BD_BX(IPAR(12)+1,*), BD_AY(IPAR(11)+1,*) 
   REAL BD_BY(IPAR(11)+1,*), BD_AZ(IPAR(11)+1,*), BD_BZ(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE, YHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_HELMHOLTZ_3D (F, BD_AX, BD_BX, BD_AY, BD_BY, BD_AZ, BD_BZ, XHANDLE, YHANDLE, IPAR, SPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL F(IPAR(11)+1,IPAR(12)+1,*) 
   REAL SPAR(*) 
   REAL BD_AX(IPAR(12)+1,*), BD_BX(IPAR(12)+1,*), BD_AY(IPAR(11)+1,*) 
   REAL BD_BY(IPAR(11)+1,*), BD_AZ(IPAR(11)+1,*), BD_BZ(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE, YHANDLE 
END SUBROUTINE 
    
    
SUBROUTINE FREE_HELMHOLTZ_3D (XHANDLE, YHANDLE, IPAR, STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: XHANDLE, YHANDLE 
END SUBROUTINE

The header file defines the following function prototypes for the spherical solver:

SUBROUTINE D_INIT_SPH_P(AP,BP,AT,BT,NP,NT,Q,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER NP, NT, STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION AP,BP,AT,BT,Q 
   DOUBLE PRECISION DPAR(*)  
END SUBROUTINE 
    
    
SUBROUTINE D_COMMIT_SPH_P(F,HANDLE_S,HANDLE_C,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE_C, HANDLE_S 
END SUBROUTINE 
    
    
SUBROUTINE D_SPH_P(F,HANDLE_S,HANDLE_C,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE_C, HANDLE_S 
END SUBROUTINE 
    
    
SUBROUTINE S_INIT_SPH_P(AP,BP,AT,BT,NP,NT,Q,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER NP, NT, STAT 
   INTEGER IPAR(*) 
   REAL AP,BP,AT,BT,Q 
   REAL SPAR(*)  
END SUBROUTINE 
    
    
SUBROUTINE S_COMMIT_SPH_P(F,HANDLE_S,HANDLE_C,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL SPAR(*)  
   REAL F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE_C, HANDLE_S 
END SUBROUTINE 
    
    
SUBROUTINE S_SPH_P(F,HANDLE_S,HANDLE_C,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL SPAR(*)  
   REAL F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE_C, HANDLE_S 
END SUBROUTINE 
    
    
SUBROUTINE FREE_SPH_P(HANDLE_S,HANDLE_C,IPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE_S, HANDLE_C 
END SUBROUTINE 
    
    
    
SUBROUTINE D_INIT_SPH_NP(AP,BP,AT,BT,NP,NT,Q,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER NP, NT, STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION AP,BP,AT,BT,Q 
   DOUBLE PRECISION DPAR(*)  
END SUBROUTINE 
    
    
SUBROUTINE D_COMMIT_SPH_NP(F,HANDLE,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE 
END SUBROUTINE 
    
    
SUBROUTINE D_SPH_NP(F,HANDLE,IPAR,DPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   DOUBLE PRECISION DPAR(*)  
   DOUBLE PRECISION F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_INIT_SPH_NP(AP,BP,AT,BT,NP,NT,Q,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER NP, NT, STAT 
   INTEGER IPAR(*) 
   REAL AP,BP,AT,BT,Q 
   REAL SPAR(*)  
END SUBROUTINE 
    
    
SUBROUTINE S_COMMIT_SPH_NP(F,HANDLE,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL SPAR(*)  
   REAL F(IPAR(11)+1,*) 
     TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE 
END SUBROUTINE 
    
    
SUBROUTINE S_SPH_NP(F,HANDLE,IPAR,SPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   REAL SPAR(*)  
   REAL F(IPAR(11)+1,*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE 
END SUBROUTINE 
    
    
SUBROUTINE FREE_SPH_NP(HANDLE,IPAR,STAT) 
   USE MKL_DFTI 
    
   INTEGER STAT 
   INTEGER IPAR(*) 
   TYPE(DFTI_DESCRIPTOR), POINTER :: HANDLE 
END SUBROUTINE

Fortran specifics of the Poisson Solver routines usage are similar for all Intel® oneAPI Math Kernel Library (oneMKL) PDE support tools and described inCalling PDE Support Routines from Fortran.