LCOV - code coverage report
Current view: top level - src - qs_fb_input.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:4dc10b3) Lines: 17 17 100.0 %
Date: 2024-11-21 06:45:46 Functions: 1 1 100.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             : MODULE qs_fb_input
       9             :    USE bibliography,                    ONLY: Rayson2009
      10             :    USE cp_units,                        ONLY: cp_unit_to_cp2k
      11             :    USE input_keyword_types,             ONLY: keyword_create,&
      12             :                                               keyword_release,&
      13             :                                               keyword_type
      14             :    USE input_section_types,             ONLY: section_add_keyword,&
      15             :                                               section_create,&
      16             :                                               section_type
      17             :    USE input_val_types,                 ONLY: logical_t,&
      18             :                                               real_t
      19             :    USE kinds,                           ONLY: dp
      20             : #include "./base/base_uses.f90"
      21             : 
      22             :    IMPLICIT NONE
      23             :    PRIVATE
      24             : 
      25             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_fb_input'
      26             : 
      27             :    PUBLIC :: create_filtermatrix_section
      28             : 
      29             : CONTAINS
      30             : 
      31             : ! **************************************************************************************************
      32             : !> \brief Input section for filter matrix diagonalisation method
      33             : !> \param section : section to be created
      34             : !> \author Lianheng Tong (LT) lianheng.tong@kcl.ac.uk
      35             : ! **************************************************************************************************
      36       19931 :    SUBROUTINE create_filtermatrix_section(section)
      37             :       TYPE(section_type), POINTER                        :: section
      38             : 
      39             :       TYPE(keyword_type), POINTER                        :: keyword
      40             : 
      41       19931 :       CPASSERT(.NOT. ASSOCIATED(section))
      42             : 
      43             :       CALL section_create(section, __LOCATION__, name="FILTER_MATRIX", &
      44             :                           description=" ", &
      45       19931 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
      46             : 
      47       19931 :       NULLIFY (keyword)
      48             : 
      49             :       CALL keyword_create(keyword, __LOCATION__, &
      50             :                           name="FILTER_TEMPERATURE", &
      51             :                           description="Temperature used for the filter function used "// &
      52             :                           "to construct the filter matrix.", &
      53             :                           repeats=.FALSE., &
      54             :                           n_var=1, &
      55             :                           type_of_var=real_t, &
      56             :                           default_r_val=cp_unit_to_cp2k(value=10000.0_dp, &
      57             :                                                         unit_str="K"), &
      58             :                           unit_str="K", &
      59             :                           usage="FILTER_TEMPERATURE [K] 10000", &
      60       39862 :                           citations=(/Rayson2009/))
      61       19931 :       CALL section_add_keyword(section, keyword)
      62       19931 :       CALL keyword_release(keyword)
      63             : 
      64             :       CALL keyword_create(keyword, __LOCATION__, &
      65             :                           name="AUTO_CUTOFF_SCALE", &
      66             :                           description="Scalar constant multiplied to maximum orbital "// &
      67             :                           "size of each atom, used for automatically "// &
      68             :                           "creating cutoff radii for atomic matrices", &
      69             :                           repeats=.FALSE., &
      70             :                           n_var=1, &
      71             :                           type_of_var=real_t, &
      72             :                           default_r_val=0.5_dp, &
      73             :                           usage="AUTO_CUTOFF_SCALE 0.5_dp", &
      74       39862 :                           citations=(/Rayson2009/))
      75       19931 :       CALL section_add_keyword(section, keyword)
      76       19931 :       CALL keyword_release(keyword)
      77             : 
      78             :       CALL keyword_create(keyword, __LOCATION__, &
      79             :                           name="EPS_FB", &
      80             :                           description="Default tolerance used in generating the filter "// &
      81             :                           "matrix. Anything less than EPS_FB will be "// &
      82             :                           "regarded as zero", &
      83             :                           repeats=.FALSE., &
      84             :                           n_var=1, &
      85             :                           type_of_var=real_t, &
      86             :                           default_r_val=1.e-12_dp, &
      87             :                           usage="EPS_FB 1.e-12", &
      88       39862 :                           citations=(/Rayson2009/))
      89       19931 :       CALL section_add_keyword(section, keyword)
      90       19931 :       CALL keyword_release(keyword)
      91             : 
      92             :       CALL keyword_create(keyword, __LOCATION__, &
      93             :                           name="COLLECTIVE_COMMUNICATION", &
      94             :                           description="If set to TRUE, then all MPI communications "// &
      95             :                           "required for the construction of the "// &
      96             :                           "filter matrix is done at the start and end "// &
      97             :                           "of each filter matrix calculation. This "// &
      98             :                           "makes communications more efficient, at "// &
      99             :                           "the expense of using more memory. If you "// &
     100             :                           "find the fb_fltrmat_add_blkcol_mpi times "// &
     101             :                           "at the end of CP2K output is high, then "// &
     102             :                           "run again with this option set to .TRUE.", &
     103             :                           repeats=.FALSE., &
     104             :                           n_var=1, &
     105             :                           type_of_var=logical_t, &
     106             :                           default_l_val=.FALSE., &
     107       19931 :                           usage="COLLECTIVE_COMMUNICATION T")
     108       19931 :       CALL section_add_keyword(section, keyword)
     109       19931 :       CALL keyword_release(keyword)
     110             : 
     111       19931 :    END SUBROUTINE create_filtermatrix_section
     112             : 
     113             : END MODULE qs_fb_input

Generated by: LCOV version 1.15