LCOV - code coverage report
Current view: top level - src/eri_mme - eri_mme_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:d0bd076) Lines: 119 142 83.8 %
Date: 2021-09-15 13:52:28 Functions: 8 12 66.7 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2021 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief Types and initialization / release routines for Minimax-Ewald method for electron
      10             : !>        repulsion integrals.
      11             : !> \par History
      12             : !>       2015 09 created
      13             : !> \author Patrick Seewald
      14             : ! **************************************************************************************************
      15             : 
      16             : MODULE eri_mme_types
      17             : 
      18             :    USE cp_para_types,                   ONLY: cp_para_env_type
      19             :    USE eri_mme_error_control,           ONLY: calibrate_cutoff,&
      20             :                                               cutoff_minimax_error,&
      21             :                                               minimax_error
      22             :    USE eri_mme_gaussian,                ONLY: eri_mme_coulomb,&
      23             :                                               eri_mme_longrange,&
      24             :                                               eri_mme_yukawa,&
      25             :                                               get_minimax_coeff_v_gspace
      26             :    USE eri_mme_util,                    ONLY: G_abs_min,&
      27             :                                               R_abs_min
      28             :    USE kinds,                           ONLY: dp
      29             :    USE mathlib,                         ONLY: det_3x3,&
      30             :                                               inv_3x3
      31             :    USE orbital_pointers,                ONLY: init_orbital_pointers
      32             : #include "../base/base_uses.f90"
      33             : 
      34             :    IMPLICIT NONE
      35             : 
      36             :    PRIVATE
      37             : 
      38             :    LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .FALSE.
      39             : 
      40             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'eri_mme_types'
      41             : 
      42             :    INTEGER, PARAMETER, PUBLIC :: n_minimax_max = 53
      43             : 
      44             :    PUBLIC :: eri_mme_param, &
      45             :              eri_mme_init, &
      46             :              eri_mme_release, &
      47             :              eri_mme_set_params, &
      48             :              eri_mme_print_grid_info, &
      49             :              get_minimax_from_cutoff, &
      50             :              eri_mme_coulomb, &
      51             :              eri_mme_yukawa, &
      52             :              eri_mme_longrange, &
      53             :              eri_mme_set_potential
      54             : 
      55             :    TYPE minimax_grid
      56             :       REAL(KIND=dp)                    :: cutoff
      57             :       INTEGER                          :: n_minimax
      58             :       REAL(KIND=dp), POINTER, &
      59             :          DIMENSION(:)                  :: minimax_aw => NULL()
      60             :       REAL(KIND=dp)                    :: error
      61             :    END TYPE
      62             : 
      63             :    TYPE eri_mme_param
      64             :       INTEGER                          :: n_minimax
      65             :       REAL(KIND=dp), DIMENSION(3, 3)   :: hmat, h_inv
      66             :       REAL(KIND=dp)                    :: vol
      67             :       LOGICAL                          :: is_ortho
      68             :       REAL(KIND=dp)                    :: cutoff
      69             :       LOGICAL                          :: do_calib_cutoff
      70             :       LOGICAL                          :: do_error_est
      71             :       LOGICAL                          :: print_calib
      72             :       REAL(KIND=dp)                    :: cutoff_min, cutoff_max, cutoff_delta, &
      73             :                                           cutoff_eps
      74             :       REAL(KIND=dp)                    :: err_mm, err_c
      75             :       REAL(KIND=dp)                    :: mm_delta
      76             :       REAL(KIND=dp)                    :: G_min, R_min
      77             :       LOGICAL                          :: is_valid
      78             :       LOGICAL                          :: debug
      79             :       REAL(KIND=dp)                    :: debug_delta
      80             :       INTEGER                          :: debug_nsum
      81             :       REAL(KIND=dp)                    :: C_mm
      82             :       INTEGER                          :: unit_nr
      83             :       REAL(KIND=dp)                    :: sum_precision
      84             :       INTEGER                          :: n_grids
      85             :       TYPE(minimax_grid), DIMENSION(:), &
      86             :          ALLOCATABLE                   :: minimax_grid
      87             :       REAL(KIND=dp)                    :: zet_max, zet_min
      88             :       INTEGER                          :: l_mm, l_max_zet
      89             :       INTEGER                          :: potential
      90             :       REAL(KIND=dp)                    :: pot_par
      91             :    END TYPE eri_mme_param
      92             : 
      93             : CONTAINS
      94             : 
      95             : ! **************************************************************************************************
      96             : !> \brief ...
      97             : !> \param param ...
      98             : !> \param n_minimax ...
      99             : !> \param cutoff ...
     100             : !> \param do_calib_cutoff ...
     101             : !> \param do_error_est ...
     102             : !> \param cutoff_min ...
     103             : !> \param cutoff_max ...
     104             : !> \param cutoff_eps ...
     105             : !> \param cutoff_delta ...
     106             : !> \param sum_precision ...
     107             : !> \param debug ...
     108             : !> \param debug_delta ...
     109             : !> \param debug_nsum ...
     110             : !> \param unit_nr ...
     111             : !> \param print_calib ...
     112             : ! **************************************************************************************************
     113          54 :    SUBROUTINE eri_mme_init(param, n_minimax, cutoff, do_calib_cutoff, do_error_est, &
     114             :                            cutoff_min, cutoff_max, cutoff_eps, cutoff_delta, sum_precision, &
     115             :                            debug, debug_delta, debug_nsum, unit_nr, print_calib)
     116             :       TYPE(eri_mme_param), INTENT(OUT)                   :: param
     117             :       INTEGER, INTENT(IN)                                :: n_minimax
     118             :       REAL(KIND=dp), INTENT(IN)                          :: cutoff
     119             :       LOGICAL, INTENT(IN)                                :: do_calib_cutoff, do_error_est
     120             :       REAL(KIND=dp), INTENT(IN)                          :: cutoff_min, cutoff_max, cutoff_eps, &
     121             :                                                             cutoff_delta, sum_precision
     122             :       LOGICAL, INTENT(IN)                                :: debug
     123             :       REAL(KIND=dp), INTENT(IN)                          :: debug_delta
     124             :       INTEGER, INTENT(IN)                                :: debug_nsum, unit_nr
     125             :       LOGICAL, INTENT(IN)                                :: print_calib
     126             : 
     127             :       CHARACTER(len=2)                                   :: string
     128             : 
     129          54 :       WRITE (string, '(I2)') n_minimax_max
     130          54 :       IF (n_minimax .GT. n_minimax_max) &
     131           0 :          CPABORT("The maximum allowed number of minimax points N_MINIMAX is "//TRIM(string))
     132             : 
     133          54 :       param%n_minimax = n_minimax
     134          54 :       param%n_grids = 1
     135          54 :       param%cutoff = cutoff
     136          54 :       param%do_calib_cutoff = do_calib_cutoff
     137          54 :       param%do_error_est = do_error_est
     138          54 :       param%cutoff_min = cutoff_min
     139          54 :       param%cutoff_max = cutoff_max
     140          54 :       param%cutoff_eps = cutoff_eps
     141          54 :       param%cutoff_delta = cutoff_delta
     142          54 :       param%sum_precision = sum_precision
     143          54 :       param%debug = debug
     144          54 :       param%debug_delta = debug_delta
     145          54 :       param%debug_nsum = debug_nsum
     146          54 :       param%print_calib = print_calib
     147          54 :       param%unit_nr = unit_nr
     148          54 :       param%err_mm = -1.0_dp
     149          54 :       param%err_c = -1.0_dp
     150             : 
     151          54 :       param%is_valid = .FALSE.
     152         108 :       ALLOCATE (param%minimax_grid(param%n_grids))
     153          54 :    END SUBROUTINE eri_mme_init
     154             : 
     155             : ! **************************************************************************************************
     156             : !> \brief Set parameters for MME method with manual specification of basis parameters.
     157             : !>        Takes care of cutoff calibration if requested.
     158             : !> \param param ...
     159             : !> \param hmat ...
     160             : !> \param is_ortho ...
     161             : !> \param zet_min Exponent used to estimate error of minimax approximation.
     162             : !> \param zet_max  Exponent used to estimate error of finite cutoff.
     163             : !> \param l_max_zet    Total ang. mom. quantum numbers l to be combined with exponents in
     164             : !>                        zet_max.
     165             : !> \param l_max           Maximum total angular momentum quantum number
     166             : !> \param para_env ...
     167             : !> \param potential   potential to use. Accepts the following values:
     168             : !>                    1: coulomb potential V(r)=1/r
     169             : !>                    2: yukawa potential V(r)=e(-a*r)/r
     170             : !>                    3: long-range coulomb erf(a*r)/r
     171             : !> \param pot_par     potential parameter a for yukawa V(r)=e(-a*r)/r or long-range coulomb V(r)=erf(a*r)/r
     172             : ! **************************************************************************************************
     173         112 :    SUBROUTINE eri_mme_set_params(param, hmat, is_ortho, zet_min, zet_max, l_max_zet, l_max, para_env, &
     174             :                                  potential, pot_par)
     175             :       TYPE(eri_mme_param), INTENT(INOUT)                 :: param
     176             :       REAL(KIND=dp), DIMENSION(3, 3), INTENT(IN)         :: hmat
     177             :       LOGICAL, INTENT(IN)                                :: is_ortho
     178             :       REAL(KIND=dp), INTENT(IN)                          :: zet_min, zet_max
     179             :       INTEGER, INTENT(IN)                                :: l_max_zet, l_max
     180             :       TYPE(cp_para_env_type), INTENT(IN), OPTIONAL, &
     181             :          POINTER                                         :: para_env
     182             :       INTEGER, INTENT(IN), OPTIONAL                      :: potential
     183             :       REAL(KIND=dp), INTENT(IN), OPTIONAL                :: pot_par
     184             : 
     185             :       CHARACTER(LEN=*), PARAMETER :: routineN = 'eri_mme_set_params'
     186             : 
     187             :       INTEGER                                            :: handle, l_mm, n_grids
     188             :       LOGICAL                                            :: s_only
     189             :       REAL(KIND=dp)                                      :: cutoff
     190         112 :       REAL(KIND=dp), ALLOCATABLE, DIMENSION(:)           :: minimax_aw
     191             : 
     192         112 :       CALL timeset(routineN, handle)
     193             : 
     194             :       ! Note: in MP2 default logger hacked and does not use global default print level
     195         112 :       s_only = l_max .EQ. 0
     196             : 
     197         112 :       CALL init_orbital_pointers(3*l_max) ! allow for orbital pointers of combined index
     198             : 
     199             :       ! l values for minimax error estimate (l_mm) and for cutoff error estimate (l_max_zet)
     200         216 :       l_mm = MERGE(0, 1, s_only)
     201             : 
     202             :       ! cell info
     203             :       ! Note: we recompute basic quantities from hmat to avoid dependency on cp2k cell type
     204        1456 :       param%hmat = hmat
     205        1456 :       param%h_inv = inv_3x3(hmat)
     206         112 :       param%vol = ABS(det_3x3(hmat))
     207         112 :       param%is_ortho = is_ortho
     208             : 
     209             :       ! Minimum lattice vectors
     210         112 :       param%G_min = G_abs_min(param%h_inv)
     211         112 :       param%R_min = R_abs_min(param%hmat)
     212             : 
     213             :       ! Minimum and maximum exponents
     214         112 :       param%zet_max = zet_max
     215         112 :       param%zet_min = zet_min
     216         112 :       param%l_max_zet = l_max_zet
     217         112 :       param%l_mm = l_mm
     218             : 
     219             :       ! cutoff calibration not yet implemented for general cell
     220         112 :       IF (.NOT. param%is_ortho) THEN
     221          28 :          param%do_calib_cutoff = .FALSE.
     222          28 :          param%do_error_est = .FALSE.
     223             :       ENDIF
     224             : 
     225         112 :       n_grids = param%n_grids
     226             : 
     227             :       ! Cutoff calibration and error estimate for orthorhombic cell
     228             :       ! Here we assume Coulomb potential which should give an upper bound error also for the other
     229             :       ! potentials
     230         112 :       IF (param%do_calib_cutoff) THEN
     231             :          CALL calibrate_cutoff(param%hmat, param%h_inv, param%G_min, param%vol, &
     232             :                                zet_min, l_mm, zet_max, l_max_zet, param%n_minimax, &
     233             :                                param%cutoff_min, param%cutoff_max, param%cutoff_eps, &
     234             :                                param%cutoff_delta, cutoff, param%err_mm, param%err_c, &
     235          76 :                                param%C_mm, para_env, param%print_calib, param%unit_nr)
     236             : 
     237          76 :          param%cutoff = cutoff
     238          36 :       ELSE IF (param%do_error_est) THEN
     239          24 :          ALLOCATE (minimax_aw(2*param%n_minimax))
     240             :          CALL cutoff_minimax_error(param%cutoff, param%hmat, param%h_inv, param%vol, param%G_min, &
     241             :                                    zet_min, l_mm, zet_max, l_max_zet, param%n_minimax, &
     242           8 :                                    minimax_aw, param%err_mm, param%err_c, param%C_mm, para_env)
     243           8 :          DEALLOCATE (minimax_aw)
     244             :       ENDIF
     245             : 
     246         112 :       param%is_valid = .TRUE.
     247             : 
     248         112 :       CALL eri_mme_set_potential(param, potential=potential, pot_par=pot_par)
     249             : 
     250         112 :       CALL timestop(handle)
     251         112 :    END SUBROUTINE eri_mme_set_params
     252             : 
     253             : ! **************************************************************************************************
     254             : !> \brief ...
     255             : !> \param param ...
     256             : !> \param potential   potential to use. Accepts the following values:
     257             : !>                    1: coulomb potential V(r)=1/r
     258             : !>                    2: yukawa potential V(r)=e(-a*r)/r
     259             : !>                    3: long-range coulomb erf(a*r)/r
     260             : !> \param pot_par     potential parameter a for yukawa V(r)=e(-a*r)/r or long-range coulomb V(r)=erf(a*r)/r
     261             : ! **************************************************************************************************
     262       55722 :    SUBROUTINE eri_mme_set_potential(param, potential, pot_par)
     263             :       TYPE(eri_mme_param), INTENT(INOUT)                 :: param
     264             :       INTEGER, INTENT(IN), OPTIONAL                      :: potential
     265             :       REAL(KIND=dp), INTENT(IN), OPTIONAL                :: pot_par
     266             : 
     267             :       REAL(KIND=dp)                                      :: cutoff_max, cutoff_min, cutoff_rel
     268       55722 :       REAL(KIND=dp), ALLOCATABLE, DIMENSION(:)           :: minimax_aw
     269             : 
     270       55722 :       CPASSERT(param%is_valid)
     271             : 
     272       55722 :       IF (PRESENT(potential)) THEN
     273       55618 :          param%potential = potential
     274             :       ELSE
     275         104 :          param%potential = eri_mme_coulomb
     276             :       ENDIF
     277             : 
     278       55722 :       IF (PRESENT(pot_par)) THEN
     279       55618 :          param%pot_par = pot_par
     280             :       ELSE
     281         104 :          param%pot_par = 0.0_dp
     282             :       ENDIF
     283             : 
     284      167166 :       ALLOCATE (minimax_aw(2*param%n_minimax))
     285             : 
     286             :       CALL minimax_error(param%cutoff, param%hmat, param%vol, param%G_min, param%zet_min, param%l_mm, &
     287       55722 :                          param%n_minimax, minimax_aw, param%err_mm, param%mm_delta, potential=potential, pot_par=pot_par)
     288             : 
     289       55722 :       DEALLOCATE (minimax_aw)
     290             : 
     291       55722 :       CPASSERT(param%zet_max + 1.0E-12 .GT. param%zet_min)
     292       55722 :       CPASSERT(param%n_grids .GE. 1)
     293             : 
     294       55722 :       cutoff_max = param%cutoff
     295       55722 :       cutoff_rel = param%cutoff/param%zet_max
     296       55722 :       cutoff_min = param%zet_min*cutoff_rel
     297             : 
     298       55722 :       CALL eri_mme_destroy_minimax_grids(param%minimax_grid)
     299      222888 :       ALLOCATE (param%minimax_grid(param%n_grids))
     300             : 
     301             :       CALL eri_mme_create_minimax_grids(param%n_grids, param%minimax_grid, param%n_minimax, &
     302             :                                         cutoff_max, cutoff_min, param%G_min, &
     303       55722 :                                         param%mm_delta, potential=potential, pot_par=pot_par)
     304             : 
     305       55722 :    END SUBROUTINE
     306             : 
     307             : ! **************************************************************************************************
     308             : !> \brief ...
     309             : !> \param n_grids ...
     310             : !> \param minimax_grids ...
     311             : !> \param n_minimax ...
     312             : !> \param cutoff_max ...
     313             : !> \param cutoff_min ...
     314             : !> \param G_min ...
     315             : !> \param target_error ...
     316             : !> \param potential ...
     317             : !> \param pot_par ...
     318             : ! **************************************************************************************************
     319      111444 :    SUBROUTINE eri_mme_create_minimax_grids(n_grids, minimax_grids, n_minimax, &
     320             :                                            cutoff_max, cutoff_min, G_min, &
     321             :                                            target_error, potential, pot_par)
     322             :       INTEGER, INTENT(IN)                                :: n_grids
     323             :       TYPE(minimax_grid), DIMENSION(n_grids), &
     324             :          INTENT(OUT)                                     :: minimax_grids
     325             :       INTEGER, INTENT(IN)                                :: n_minimax
     326             :       REAL(KIND=dp), INTENT(IN)                          :: cutoff_max, cutoff_min, G_min, &
     327             :                                                             target_error
     328             :       INTEGER, INTENT(IN), OPTIONAL                      :: potential
     329             :       REAL(KIND=dp), INTENT(IN), OPTIONAL                :: pot_par
     330             : 
     331             :       INTEGER                                            :: i_grid, n_mm
     332             :       REAL(KIND=dp)                                      :: cutoff, cutoff_delta, err_mm, err_mm_prev
     333       55722 :       REAL(KIND=dp), ALLOCATABLE, DIMENSION(:)           :: minimax_aw, minimax_aw_prev
     334             : 
     335       55722 :       cutoff_delta = (cutoff_max/cutoff_min)**(1.0_dp/(n_grids))
     336       55722 :       cutoff = cutoff_max
     337             : 
     338      167166 :       ALLOCATE (minimax_aw(2*n_minimax))
     339             :       ! for first grid (for max. cutoff) always use default n_minimax
     340             :       CALL get_minimax_coeff_v_gspace(n_minimax, cutoff, G_min, minimax_aw, err_minimax=err_mm, &
     341       55722 :                                       potential=potential, pot_par=pot_par)
     342       55722 :       CPASSERT(err_mm .LT. 1.1_dp*target_error + 1.0E-12)
     343       55722 :       CALL create_minimax_grid(minimax_grids(n_grids), cutoff, n_minimax, minimax_aw, err_mm)
     344       55722 :       DEALLOCATE (minimax_aw)
     345             : 
     346       55722 :       DO i_grid = n_grids - 1, 1, -1
     347           0 :          DO n_mm = n_minimax, 1, -1
     348           0 :             ALLOCATE (minimax_aw(2*n_mm))
     349             :             CALL get_minimax_coeff_v_gspace(n_mm, cutoff, G_min, minimax_aw, err_minimax=err_mm, &
     350           0 :                                             potential=potential, pot_par=pot_par)
     351             : 
     352           0 :             IF (err_mm .GT. 1.1_dp*target_error) THEN
     353           0 :                CPASSERT(n_mm .NE. n_minimax)
     354           0 :                CALL create_minimax_grid(minimax_grids(i_grid), cutoff, n_mm + 1, minimax_aw_prev, err_mm_prev)
     355             : 
     356           0 :                DEALLOCATE (minimax_aw)
     357           0 :                EXIT
     358             :             ENDIF
     359             : 
     360           0 :             IF (ALLOCATED(minimax_aw_prev)) DEALLOCATE (minimax_aw_prev)
     361           0 :             ALLOCATE (minimax_aw_prev(2*n_mm))
     362           0 :             minimax_aw_prev(:) = minimax_aw(:)
     363           0 :             DEALLOCATE (minimax_aw)
     364           0 :             err_mm_prev = err_mm
     365             :          ENDDO
     366       55722 :          cutoff = cutoff/cutoff_delta
     367             :       ENDDO
     368      111444 :    END SUBROUTINE
     369             : 
     370             : ! **************************************************************************************************
     371             : !> \brief ...
     372             : !> \param minimax_grids ...
     373             : ! **************************************************************************************************
     374       55776 :    SUBROUTINE eri_mme_destroy_minimax_grids(minimax_grids)
     375             :       TYPE(minimax_grid), ALLOCATABLE, DIMENSION(:), &
     376             :          INTENT(INOUT)                                   :: minimax_grids
     377             : 
     378             :       INTEGER                                            :: igrid
     379             : 
     380       55776 :       IF (ALLOCATED(minimax_grids)) THEN
     381      111552 :          DO igrid = 1, SIZE(minimax_grids)
     382      111552 :             IF (ASSOCIATED(minimax_grids(igrid)%minimax_aw)) THEN
     383       55722 :                DEALLOCATE (minimax_grids(igrid)%minimax_aw)
     384             :             ENDIF
     385             :          ENDDO
     386       55776 :          DEALLOCATE (minimax_grids)
     387             :       ENDIF
     388       55776 :    END SUBROUTINE
     389             : 
     390             : ! **************************************************************************************************
     391             : !> \brief ...
     392             : !> \param grid ...
     393             : !> \param cutoff ...
     394             : !> \param n_minimax ...
     395             : !> \param minimax_aw ...
     396             : !> \param error ...
     397             : ! **************************************************************************************************
     398       55722 :    SUBROUTINE create_minimax_grid(grid, cutoff, n_minimax, minimax_aw, error)
     399             :       TYPE(minimax_grid), INTENT(OUT)                    :: grid
     400             :       REAL(KIND=dp), INTENT(IN)                          :: cutoff
     401             :       INTEGER, INTENT(IN)                                :: n_minimax
     402             :       REAL(KIND=dp), DIMENSION(2*n_minimax), INTENT(IN)  :: minimax_aw
     403             :       REAL(KIND=dp), INTENT(IN)                          :: error
     404             : 
     405       55722 :       grid%cutoff = cutoff
     406       55722 :       grid%n_minimax = n_minimax
     407      222888 :       ALLOCATE (grid%minimax_aw(2*n_minimax))
     408     1525162 :       grid%minimax_aw(:) = minimax_aw(:)
     409       55722 :       grid%error = error
     410             : 
     411       55722 :    END SUBROUTINE
     412             : 
     413             : ! **************************************************************************************************
     414             : !> \brief ...
     415             : !> \param grids ...
     416             : !> \param cutoff ...
     417             : !> \param n_minimax ...
     418             : !> \param minimax_aw ...
     419             : !> \param grid_no ...
     420             : ! **************************************************************************************************
     421      147860 :    SUBROUTINE get_minimax_from_cutoff(grids, cutoff, n_minimax, minimax_aw, grid_no)
     422             :       TYPE(minimax_grid), DIMENSION(:), INTENT(IN)       :: grids
     423             :       REAL(KIND=dp), INTENT(IN)                          :: cutoff
     424             :       INTEGER, INTENT(OUT)                               :: n_minimax
     425             :       REAL(KIND=dp), DIMENSION(:), INTENT(OUT), POINTER  :: minimax_aw
     426             :       INTEGER, INTENT(OUT)                               :: grid_no
     427             : 
     428             :       INTEGER                                            :: igrid
     429             : 
     430      147860 :       grid_no = 0
     431      162616 :       DO igrid = 1, SIZE(grids)
     432      162616 :          IF (grids(igrid)%cutoff .GE. cutoff/2) THEN
     433      133104 :             n_minimax = grids(igrid)%n_minimax
     434      133104 :             minimax_aw => grids(igrid)%minimax_aw
     435      133104 :             grid_no = igrid
     436      133104 :             EXIT
     437             :          ENDIF
     438             :       ENDDO
     439      147860 :       IF (grid_no == 0) THEN
     440       14756 :          igrid = SIZE(grids)
     441       14756 :          n_minimax = grids(igrid)%n_minimax
     442       14756 :          minimax_aw => grids(igrid)%minimax_aw
     443       14756 :          grid_no = igrid
     444             :       ENDIF
     445      147860 :    END SUBROUTINE
     446             : 
     447             : ! **************************************************************************************************
     448             : !> \brief ...
     449             : !> \param grid ...
     450             : !> \param grid_no ...
     451             : !> \param unit_nr ...
     452             : ! **************************************************************************************************
     453           0 :    SUBROUTINE eri_mme_print_grid_info(grid, grid_no, unit_nr)
     454             :       TYPE(minimax_grid), INTENT(IN)                     :: grid
     455             :       INTEGER, INTENT(IN)                                :: grid_no, unit_nr
     456             : 
     457           0 :       IF (unit_nr > 0) THEN
     458           0 :          WRITE (unit_nr, '(T2, A, 1X, I2)') "ERI_MME | Info for grid no.", grid_no
     459           0 :          WRITE (unit_nr, '(T2, A, 1X, ES9.2)') "ERI_MME | Cutoff", grid%cutoff
     460           0 :          WRITE (unit_nr, '(T2, A, 1X, I2)') "ERI_MME | Number of minimax points", grid%n_minimax
     461           0 :          WRITE (unit_nr, '(T2, A, 1X, 2ES9.2)') "ERI_MME | minimax error", grid%error
     462           0 :          WRITE (unit_nr, *)
     463             :       ENDIF
     464             : 
     465           0 :    END SUBROUTINE
     466             : 
     467             : ! **************************************************************************************************
     468             : !> \brief ...
     469             : !> \param param ...
     470             : ! **************************************************************************************************
     471          54 :    SUBROUTINE eri_mme_release(param)
     472             :       TYPE(eri_mme_param), INTENT(INOUT)                 :: param
     473             : 
     474          54 :       IF (ALLOCATED(param%minimax_grid)) THEN
     475          54 :          CALL eri_mme_destroy_minimax_grids(param%minimax_grid)
     476             :       ENDIF
     477          54 :    END SUBROUTINE eri_mme_release
     478             : 
     479           0 : END MODULE eri_mme_types

Generated by: LCOV version 1.15