Line data Source code
1 : !--------------------------------------------------------------------------------------------------! 2 : ! CP2K: A general program to perform molecular dynamics simulations ! 3 : ! Copyright 2000-2023 CP2K developers group <https://cp2k.org> ! 4 : ! ! 5 : ! SPDX-License-Identifier: GPL-2.0-or-later ! 6 : !--------------------------------------------------------------------------------------------------! 7 : 8 : ! ************************************************************************************************** 9 : !> \brief a module to allow simple internal preprocessing in input files. 10 : !> \par History 11 : !> - standalone proof-of-concept implementation (20.02.2008,AK) 12 : !> - integration into cp2k (22.02.2008,tlaino) 13 : !> - variables added (25.02.2008,AK) 14 : !> \author Axel Kohlmeyer [AK] - CMM/UPenn Philadelphia 15 : !> \date 25.02.2008 16 : ! ************************************************************************************************** 17 : MODULE cp_parser_ilist_types 18 : 19 : #include "../base/base_uses.f90" 20 : IMPLICIT NONE 21 : PRIVATE 22 : 23 : TYPE ilist_type 24 : LOGICAL :: in_use 25 : INTEGER :: nel_list 26 : INTEGER :: istart, iend 27 : INTEGER :: ipresent 28 : END TYPE ilist_type 29 : 30 : PUBLIC :: ilist_type, create_ilist_type, release_ilist_type 31 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_parser_ilist_types' 32 : 33 : CONTAINS 34 : 35 : ! **************************************************************************** 36 : !> \brief creates the integer listing type 37 : !> \param ilist ... 38 : !> \date 08.2008 39 : !> \author Teodoro Laino [tlaino] - University of Zurich 40 : ! ************************************************************************************************** 41 48931 : SUBROUTINE create_ilist_type(ilist) 42 : TYPE(ilist_type), POINTER :: ilist 43 : 44 48931 : CPASSERT(.NOT. ASSOCIATED(ilist)) 45 48931 : ALLOCATE (ilist) 46 48931 : ilist%istart = HUGE(0) 47 48931 : ilist%iend = HUGE(0) 48 48931 : ilist%nel_list = HUGE(0) 49 48931 : ilist%ipresent = HUGE(0) 50 48931 : ilist%in_use = .FALSE. 51 : 52 48931 : END SUBROUTINE create_ilist_type 53 : 54 : ! **************************************************************************** 55 : !> \brief creates the integer listing type 56 : !> \param ilist ... 57 : !> \date 08.2008 58 : !> \author Teodoro Laino [tlaino] - University of Zurich 59 : ! ************************************************************************************************** 60 48931 : SUBROUTINE release_ilist_type(ilist) 61 : TYPE(ilist_type), POINTER :: ilist 62 : 63 48931 : CPASSERT(ASSOCIATED(ilist)) 64 48931 : DEALLOCATE (ilist) 65 48931 : END SUBROUTINE release_ilist_type 66 : 67 0 : END MODULE cp_parser_ilist_types