LCOV - code coverage report
Current view: top level - src - exclusion_types.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:936074a) Lines: 92.9 % 14 13
Test Date: 2025-12-04 06:27:48 Functions: 50.0 % 2 1

            Line data    Source code
       1              : !--------------------------------------------------------------------------------------------------!
       2              : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3              : !   Copyright 2000-2025 CP2K developers group <https://cp2k.org>                                   !
       4              : !                                                                                                  !
       5              : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6              : !--------------------------------------------------------------------------------------------------!
       7              : ! **************************************************************************************************
       8              : !> \brief an exclusion type
       9              : ! **************************************************************************************************
      10              : MODULE exclusion_types
      11              : 
      12              : #include "./base/base_uses.f90"
      13              :    IMPLICIT NONE
      14              :    PRIVATE
      15              : 
      16              : ! **************************************************************************************************
      17              : !> \brief A type used to store lists of exclusions and onfos
      18              : !> \par History
      19              : !>      12.2010 created [Joost VandeVondele]
      20              : ! **************************************************************************************************
      21              :    TYPE exclusion_type
      22              :       INTEGER, POINTER, DIMENSION(:)        :: list_exclude_vdw => NULL()
      23              :       INTEGER, POINTER, DIMENSION(:)        :: list_exclude_ei => NULL()
      24              :       INTEGER, POINTER, DIMENSION(:)        :: list_onfo => NULL()
      25              :    END TYPE exclusion_type
      26              : 
      27              :    PUBLIC :: exclusion_type, &
      28              :              exclusion_release
      29              : 
      30              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'exclusion_types'
      31              : 
      32              : CONTAINS
      33              : 
      34              : ! **************************************************************************************************
      35              : !> \brief Release exclusion type
      36              : !> \param exclusions ...
      37              : !> \par History
      38              : !>      12.2010 created [Teodoro Laino] - teodoro.laino@gmail.com
      39              : !> \author teo
      40              : ! **************************************************************************************************
      41         2646 :    SUBROUTINE exclusion_release(exclusions)
      42              :       TYPE(exclusion_type), DIMENSION(:), POINTER        :: exclusions
      43              : 
      44              :       INTEGER                                            :: iatom
      45              : 
      46         2646 :       IF (ASSOCIATED(exclusions)) THEN
      47       635834 :          DO iatom = 1, SIZE(exclusions)
      48       633336 :             IF (ASSOCIATED(exclusions(iatom)%list_exclude_vdw, &
      49              :                            exclusions(iatom)%list_exclude_ei)) THEN
      50       631566 :                DEALLOCATE (exclusions(iatom)%list_exclude_vdw)
      51              :             ELSE
      52         1770 :                IF (ASSOCIATED(exclusions(iatom)%list_exclude_vdw)) THEN
      53         1770 :                   DEALLOCATE (exclusions(iatom)%list_exclude_vdw)
      54              :                END IF
      55         1770 :                IF (ASSOCIATED(exclusions(iatom)%list_exclude_ei)) THEN
      56         1770 :                   DEALLOCATE (exclusions(iatom)%list_exclude_ei)
      57              :                END IF
      58              :             END IF
      59       635834 :             IF (ASSOCIATED(exclusions(iatom)%list_onfo)) THEN
      60       633336 :                DEALLOCATE (exclusions(iatom)%list_onfo)
      61              :             END IF
      62              :          END DO
      63         2498 :          DEALLOCATE (exclusions)
      64              :       END IF
      65         2646 :    END SUBROUTINE exclusion_release
      66              : 
      67            0 : END MODULE exclusion_types
        

Generated by: LCOV version 2.0-1