ana.F90 3.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
!  Copyright (C) 2019 The ALF project
! 
!     The ALF project is free software: you can redistribute it and/or modify
!     it under the terms of the GNU General Public License as published by
!     the Free Software Foundation, either version 3 of the License, or
!     (at your option) any later version.
! 
!     The ALF project is distributed in the hope that it will be useful,
!     but WITHOUT ANY WARRANTY; without even the implied warranty of
!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!     GNU General Public License for more details.
! 
!     You should have received a copy of the GNU General Public License
!     along with Foobar.  If not, see http://www.gnu.org/licenses/.
!     
!     Under Section 7 of GPL version 3 we require you to fulfill the following additional terms:
!     
!     - It is our hope that this program makes a contribution to the scientific community. Being
!       part of that community we feel that it is reasonable to require you to give an attribution
!       back to the original authors if you have benefitted from this program.
!       Guidelines for a proper citation can be found on the project's homepage
!       http://alf.physik.uni-wuerzburg.de .
!       
!     - We require the preservation of the above copyright notice and this license in all original files.
!     
!     - We prohibit the misrepresentation of the origin of the original source files. To obtain 
!       the original source files please visit the homepage http://alf.physik.uni-wuerzburg.de .
! 
!     - If you make substantial changes to the program we require you to either consider contributing
!       to the ALF project or to mark your material in a reasonable way as different from the original version.

   Program ana
      
!--------------------------------------------------------------------
!> @author 
!> ALF-project
!
!> @brief 
!> Wrapper program for analyzing Monte Carlo bins.
!> 
!> @details
!>  Analyzes scalar observables, equal-time and timedisplaced correlation functions.
!>
!>  Hand over any number of file names as command line argumens to this program.
!>  If will analyze names ending in "_scal" as scalar observables, "_eq"  asequal-time 
!>  correlation functions and "_tau" as timedisplaced correlation functions.
!>
!>  For timedisplaced observables that are listen in "names_PH" in namelist "VAR_PH_names"
!>  in file "parameters", it is assumed that they are symmetric in imaginary time around tau = beta/2
!>  
!
!--------------------------------------------------------------------
      
      
      use ana_mod
      implicit none
      Integer                         :: i, n, nargs
      Character (len=64)              :: name
      Character (len=64), allocatable :: names(:)
      
      nargs = COMMAND_ARGUMENT_COUNT()
      allocate( names(nargs) )
      do i = 1, nargs
         CALL GET_COMMAND_ARGUMENT(i, name)
         names(i) = name
      enddo
      
      do n=1, size(names)
         name = names(n)
         i = len(trim(name)) -4
         if ( i > 1 ) then
            if ( name(i:) == '_scal'  ) then
               print *, ''
               print '(A,A)', "analyzing scalar observable ", name
               call Cov_vec(name)
            endif
         endif
      enddo
      
      do n=1, size(names)
         name = names(n)
         i = len(trim(name)) -2
         if ( i > 1 ) then
            if ( name(i:) == '_eq' ) then
               print *, ''
               print '(A,A)', "analyzing equal time correlation ", name
               call Cov_eq(name)
            endif
         endif
      enddo
      
      do n=1, size(names)
         name = names(n)
         i = len(trim(name)) -3
         if ( i > 1 ) then
            if ( name(i:) == '_tau' ) then
               print *, ''
               print '(A,A)', "analyzing time displaced correlation ", name
               call Cov_tau(name)
            endif
         endif
      enddo
      
      deallocate( names )
      
   end Program ana