LCOV - code coverage report
Current view: top level - src/pw - ps_wavelet_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:d1f8d1b) Lines: 8 9 88.9 %
Date: 2024-11-29 06:42:44 Functions: 1 2 50.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief Definition and initialisation of the ps_wavelet data type.
      10             : !> \author Florian Schiffmann (09.2007,fschiff)
      11             : ! **************************************************************************************************
      12             : MODULE ps_wavelet_types
      13             : 
      14             :    USE kinds,                           ONLY: dp
      15             : #include "../base/base_uses.f90"
      16             : 
      17             :    IMPLICIT NONE
      18             : 
      19             :    PRIVATE
      20             : 
      21             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'ps_wavelet_types'
      22             : 
      23             :    INTEGER, PARAMETER, PUBLIC               :: WAVELET3D = 1400, &
      24             :                                                WAVELET2D = 1401, &
      25             :                                                WAVELET1D = 1402, &
      26             :                                                WAVELET0D = 1403
      27             : 
      28             :    PUBLIC :: ps_wavelet_type, &
      29             :              ps_wavelet_release
      30             : 
      31             : ! **************************************************************************************************
      32             : !> \par History
      33             : !>      09.2007 created [Florian Schiffmann]
      34             : !> \author fschiff
      35             : ! **************************************************************************************************
      36             :    TYPE ps_wavelet_type
      37             :       CHARACTER(LEN=1)                                  :: geocode = " "
      38             :       CHARACTER(LEN=1)                                  :: datacode = " "
      39             :       INTEGER                                           :: itype_scf = 0
      40             :       INTEGER                                           :: method = WAVELET3D, special_dimension = 0
      41             :       REAL(kind=dp), POINTER, DIMENSION(:)             :: karray => NULL()
      42             :       REAL(KIND=dp), DIMENSION(:, :, :), POINTER    :: rho_z_sliced => NULL()
      43             :       INTEGER, DIMENSION(3)                              :: PS_grid = 0
      44             :    END TYPE ps_wavelet_type
      45             : 
      46             : CONTAINS
      47             : 
      48             : ! **************************************************************************************************
      49             : !> \brief ...
      50             : !> \param wavelet ...
      51             : ! **************************************************************************************************
      52       20320 :    SUBROUTINE ps_wavelet_release(wavelet)
      53             : 
      54             :       TYPE(ps_wavelet_type), POINTER                     :: wavelet
      55             : 
      56       20320 :       IF (ASSOCIATED(wavelet)) THEN
      57         830 :          IF (ASSOCIATED(wavelet%karray)) &
      58         830 :             DEALLOCATE (wavelet%karray)
      59         830 :          IF (ASSOCIATED(wavelet%rho_z_sliced)) &
      60         830 :             DEALLOCATE (wavelet%rho_z_sliced)
      61         830 :          DEALLOCATE (wavelet)
      62             :       END IF
      63       20320 :    END SUBROUTINE ps_wavelet_release
      64             : 
      65           0 : END MODULE ps_wavelet_types

Generated by: LCOV version 1.15