LCOV - code coverage report
Current view: top level - src/tmc - tmc_analysis_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:9f1e18e) Lines: 120 145 82.8 %
Date: 2021-09-22 20:58:48 Functions: 11 21 52.4 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2021 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief module provides variables for the TMC analysis tool
      10             : !> \par History
      11             : !>      02.2013 created [Mandes Schoenherr]
      12             : !> \author Mandes
      13             : ! **************************************************************************************************
      14             : 
      15             : MODULE tmc_analysis_types
      16             :    USE cell_types,                      ONLY: cell_type
      17             :    USE kinds,                           ONLY: default_path_length,&
      18             :                                               default_string_length,&
      19             :                                               dp
      20             :    USE tmc_tree_types,                  ONLY: tree_type
      21             :    USE tmc_types,                       ONLY: tmc_atom_type
      22             : #include "../base/base_uses.f90"
      23             : 
      24             :    IMPLICIT NONE
      25             : 
      26             :    PRIVATE
      27             : 
      28             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'tmc_analysis_types'
      29             : 
      30             :    PUBLIC :: tmc_analysis_env, tmc_ana_list_type
      31             :    PUBLIC :: tmc_ana_env_create, tmc_ana_env_release
      32             :    PUBLIC :: tmc_ana_density_create
      33             :    PUBLIC :: pair_correl_type, tmc_ana_pair_correl_create, &
      34             :              search_pair_in_list, atom_pairs_type
      35             :    PUBLIC :: dipole_moment_type, tmc_ana_dipole_moment_create
      36             :    PUBLIC :: tmc_ana_dipole_analysis_create
      37             :    PUBLIC :: tmc_ana_displacement_create
      38             : 
      39             :    CHARACTER(LEN=default_path_length), PARAMETER, &
      40             :       PUBLIC :: tmc_ana_density_file_name = "tmc_ana_density.dat"
      41             :    CHARACTER(LEN=default_path_length), PARAMETER, &
      42             :       PUBLIC :: tmc_ana_pair_correl_file_name = "tmc_ana_g_r.dat"
      43             : 
      44             :    INTEGER, PARAMETER, PUBLIC                      :: ana_type_default = 0
      45             :    INTEGER, PARAMETER, PUBLIC                      :: ana_type_ice = 1
      46             :    INTEGER, PARAMETER, PUBLIC                      :: ana_type_sym_xyz = 2
      47             : 
      48             :    TYPE tmc_ana_list_type
      49             :       TYPE(tmc_analysis_env), POINTER               :: temp => NULL()
      50             :    END TYPE tmc_ana_list_type
      51             : 
      52             :    TYPE tmc_analysis_env
      53             :       INTEGER                                       :: io_unit
      54             :       CHARACTER(len=default_string_length), &
      55             :          DIMENSION(:), POINTER                       :: dirs
      56             :       CHARACTER(LEN=default_path_length)          :: out_file_prefix
      57             :       INTEGER                                       :: conf_offset
      58             :       TYPE(cell_type), POINTER                      :: cell
      59             :       TYPE(tmc_atom_type), DIMENSION(:), POINTER    :: atoms
      60             :       INTEGER                                       :: dim_per_elem = 3
      61             :       INTEGER                                       :: nr_dim = -1
      62             :       REAL(KIND=dp)                                 :: temperature
      63             :       TYPE(tree_type), POINTER                      :: last_elem
      64             :       INTEGER                                       :: from_elem, to_elem
      65             :       INTEGER                                       :: id_traj, id_cell, id_frc, id_dip, id_ener
      66             :       INTEGER                                       :: lc_traj, lc_cell, lc_frc, lc_dip, lc_ener
      67             :       CHARACTER(LEN=default_path_length)          :: costum_pos_file_name
      68             :       CHARACTER(LEN=default_path_length)          :: costum_dip_file_name
      69             :       CHARACTER(LEN=default_path_length)          :: costum_cell_file_name
      70             :       LOGICAL                                       :: restart, restarted
      71             :       LOGICAL                                       :: print_test_output
      72             : 
      73             :       TYPE(density_3d_type), POINTER                :: density_3d
      74             :       TYPE(pair_correl_type), POINTER               :: pair_correl
      75             :       TYPE(dipole_moment_type), POINTER             :: dip_mom
      76             :       TYPE(dipole_analysis_type), POINTER           :: dip_ana
      77             :       TYPE(displacement_type), POINTER              :: displace
      78             :    END TYPE tmc_analysis_env
      79             : 
      80             :    TYPE density_3d_type
      81             :       INTEGER                                       :: conf_counter
      82             :       INTEGER, DIMENSION(3)                         :: nr_bins
      83             :       REAL(KIND=dp)                                 :: sum_vol
      84             :       REAL(KIND=dp)                                 :: sum_vol2
      85             :       REAL(KIND=dp), DIMENSION(3)                   :: sum_box_length
      86             :       REAL(KIND=dp), DIMENSION(3)                   :: sum_box_length2
      87             :       REAL(KIND=dp), DIMENSION(:, :, :), POINTER      :: sum_density, sum_dens2
      88             :       LOGICAL                                       :: print_dens
      89             :    END TYPE density_3d_type
      90             : 
      91             :    TYPE pair_correl_type
      92             :       INTEGER                                       :: conf_counter
      93             :       INTEGER                                       :: nr_bins
      94             :       REAL(KIND=dp)                                 :: step_lenght
      95             :       TYPE(atom_pairs_type), DIMENSION(:), POINTER  :: pairs
      96             :       REAL(KIND=dp), DIMENSION(:, :), POINTER        :: g_r
      97             :       REAL(KIND=dp)                                 :: sum_box_scale(3)
      98             :    END TYPE pair_correl_type
      99             : 
     100             :    TYPE atom_pairs_type
     101             :       CHARACTER(LEN=default_string_length)          :: f_n = ""
     102             :       CHARACTER(LEN=default_string_length)          :: s_n = ""
     103             :       INTEGER                                       :: pair_count
     104             :    END TYPE atom_pairs_type
     105             : 
     106             :    TYPE dipole_moment_type
     107             :       INTEGER                                       :: conf_counter
     108             :       TYPE(tmc_atom_type), DIMENSION(:), POINTER    :: charges_inp
     109             :       REAL(KIND=dp), DIMENSION(:), POINTER          :: charges
     110             :       REAL(KIND=dp), DIMENSION(:), POINTER          :: last_dip_cl
     111             :       LOGICAL                                       :: print_cl_dip = .TRUE.
     112             :    END TYPE dipole_moment_type
     113             : 
     114             :    TYPE dipole_analysis_type
     115             :       REAL(KIND=dp)                                 :: conf_counter
     116             :       INTEGER                                       :: ana_type
     117             :       LOGICAL                                       :: print_diel_const_traj = .TRUE.
     118             :       ! squared dipoles per volume
     119             :       REAL(KIND=dp)                                 :: mu2_pv_s
     120             :       ! dipole per square root ov volume per direction
     121             :       REAL(KIND=dp), DIMENSION(:), POINTER          :: mu_psv, mu_pv, mu2_pv
     122             :       ! dipole dipole correlation matrix (per volume)
     123             :       REAL(KIND=dp), DIMENSION(:, :), POINTER        :: mu2_pv_mat
     124             : 
     125             :    END TYPE dipole_analysis_type
     126             : 
     127             :    TYPE displacement_type
     128             :       INTEGER                                       :: conf_counter
     129             :       REAL(KIND=dp)                                 :: disp
     130             :       LOGICAL                                       :: print_disp
     131             :    END TYPE displacement_type
     132             : 
     133             : CONTAINS
     134             : 
     135             : ! **************************************************************************************************
     136             : !> \brief creates a new structure environment for TMC analysis
     137             : !> \param tmc_ana structure with parameters for TMC analysis
     138             : !> \author Mandes 02.2013
     139             : ! **************************************************************************************************
     140          18 :    SUBROUTINE tmc_ana_env_create(tmc_ana)
     141             :       TYPE(tmc_analysis_env), POINTER                    :: tmc_ana
     142             : 
     143          18 :       CPASSERT(.NOT. ASSOCIATED(tmc_ana))
     144             : 
     145          18 :       ALLOCATE (tmc_ana)
     146             : 
     147          18 :       NULLIFY (tmc_ana%dirs, tmc_ana%cell, tmc_ana%atoms, tmc_ana%density_3d, &
     148          18 :                tmc_ana%pair_correl, tmc_ana%dip_mom, tmc_ana%last_elem, &
     149          18 :                tmc_ana%displace, tmc_ana%dip_ana)
     150             : 
     151             :       ! file IO units set
     152          18 :       tmc_ana%id_traj = -1
     153          18 :       tmc_ana%id_cell = -1
     154          18 :       tmc_ana%id_frc = -1
     155          18 :       tmc_ana%id_dip = -1
     156          18 :       tmc_ana%id_ener = -1
     157             :       ! line counters
     158          18 :       tmc_ana%lc_traj = 0
     159          18 :       tmc_ana%lc_cell = 0
     160          18 :       tmc_ana%lc_frc = 0
     161          18 :       tmc_ana%lc_dip = 0
     162          18 :       tmc_ana%lc_ener = 0
     163             :       ! file names
     164          18 :       tmc_ana%out_file_prefix = ""
     165          18 :       tmc_ana%costum_pos_file_name = ""
     166          18 :       tmc_ana%costum_dip_file_name = ""
     167          18 :       tmc_ana%costum_cell_file_name = ""
     168          18 :       tmc_ana%restart = .TRUE.
     169          18 :       tmc_ana%restarted = .FALSE.
     170          18 :       tmc_ana%print_test_output = .FALSE.
     171             : 
     172             :       ! configuration control
     173          18 :       tmc_ana%conf_offset = 0
     174          18 :       tmc_ana%from_elem = -1
     175          18 :       tmc_ana%to_elem = -1
     176          18 :    END SUBROUTINE tmc_ana_env_create
     177             : 
     178             : ! **************************************************************************************************
     179             : !> \brief releases the structure environment for TMC analysis
     180             : !> \param tmc_ana structure with parameters for TMC analysis
     181             : !> \author Mandes 02.2013
     182             : ! **************************************************************************************************
     183          18 :    SUBROUTINE tmc_ana_env_release(tmc_ana)
     184             :       TYPE(tmc_analysis_env), POINTER                    :: tmc_ana
     185             : 
     186          18 :       CPASSERT(ASSOCIATED(tmc_ana))
     187             : 
     188          18 :       IF (ASSOCIATED(tmc_ana%dirs)) &
     189          18 :          DEALLOCATE (tmc_ana%dirs)
     190             : 
     191          18 :       IF (ASSOCIATED(tmc_ana%density_3d)) &
     192           9 :          CALL tmc_ana_dens_release(tmc_ana%density_3d)
     193          18 :       IF (ASSOCIATED(tmc_ana%pair_correl)) &
     194           9 :          CALL tmc_ana_pair_correl_release(tmc_ana%pair_correl)
     195             : 
     196          18 :       IF (ASSOCIATED(tmc_ana%dip_mom)) &
     197           9 :          CALL tmc_ana_dipole_moment_release(tmc_ana%dip_mom)
     198             : 
     199          18 :       IF (ASSOCIATED(tmc_ana%dip_ana)) &
     200           0 :          CALL tmc_ana_dipole_analysis_release(tmc_ana%dip_ana)
     201             : 
     202          18 :       IF (ASSOCIATED(tmc_ana%displace)) &
     203           9 :          CALL tmc_ana_displacement_release(ana_disp=tmc_ana%displace)
     204             : 
     205          18 :       DEALLOCATE (tmc_ana)
     206             : 
     207          18 :    END SUBROUTINE tmc_ana_env_release
     208             : 
     209             :    !============================================================================
     210             :    ! density calculations
     211             :    !============================================================================
     212             : 
     213             : ! **************************************************************************************************
     214             : !> \brief creates a new structure environment for TMC analysis
     215             : !> \param ana_dens structure with parameters for TMC density analysis
     216             : !> \param nr_bins ...
     217             : !> \author Mandes 02.2013
     218             : ! **************************************************************************************************
     219           9 :    SUBROUTINE tmc_ana_density_create(ana_dens, nr_bins)
     220             :       TYPE(density_3d_type), POINTER                     :: ana_dens
     221             :       INTEGER, DIMENSION(3)                              :: nr_bins
     222             : 
     223           9 :       CPASSERT(.NOT. ASSOCIATED(ana_dens))
     224             : 
     225           9 :       ALLOCATE (ana_dens)
     226             : 
     227           9 :       NULLIFY (ana_dens%sum_density, ana_dens%sum_dens2)
     228             : 
     229          36 :       ana_dens%nr_bins(:) = nr_bins(:)
     230           9 :       ana_dens%conf_counter = 0
     231           9 :       ana_dens%sum_vol = 0.0_dp
     232          36 :       ana_dens%sum_box_length(:) = 0.0_dp
     233           9 :       ana_dens%sum_vol2 = 0.0_dp
     234          36 :       ana_dens%sum_box_length2(:) = 0.0_dp
     235             : 
     236          45 :       ALLOCATE (ana_dens%sum_density(nr_bins(1), nr_bins(2), nr_bins(3)))
     237          45 :       ALLOCATE (ana_dens%sum_dens2(nr_bins(1), nr_bins(2), nr_bins(3)))
     238          45 :       ana_dens%sum_density(:, :, :) = 0.0_dp
     239          45 :       ana_dens%sum_dens2(:, :, :) = 0.0_dp
     240           9 :       ana_dens%print_dens = .TRUE.
     241           9 :    END SUBROUTINE tmc_ana_density_create
     242             : 
     243             : ! **************************************************************************************************
     244             : !> \brief releases the structure environment for TMC analysis
     245             : !> \param ana_dens structure with parameters for TMC analysis
     246             : !> \author Mandes 02.2013
     247             : ! **************************************************************************************************
     248           9 :    SUBROUTINE tmc_ana_dens_release(ana_dens)
     249             :       TYPE(density_3d_type), POINTER                     :: ana_dens
     250             : 
     251           9 :       CPASSERT(ASSOCIATED(ana_dens))
     252             : 
     253           9 :       DEALLOCATE (ana_dens%sum_density)
     254           9 :       DEALLOCATE (ana_dens%sum_dens2)
     255           9 :       DEALLOCATE (ana_dens)
     256           9 :    END SUBROUTINE tmc_ana_dens_release
     257             : 
     258             :    !============================================================================
     259             :    ! radial distribution function
     260             :    !============================================================================
     261             : 
     262             : ! **************************************************************************************************
     263             : !> \brief creates a new structure environment for TMC analysis
     264             : !> \param ana_pair_correl ...
     265             : !> \param nr_bins ...
     266             : !> \param
     267             : !> \author Mandes 02.2013
     268             : ! **************************************************************************************************
     269           9 :    SUBROUTINE tmc_ana_pair_correl_create(ana_pair_correl, nr_bins)
     270             :       TYPE(pair_correl_type), POINTER                    :: ana_pair_correl
     271             :       INTEGER                                            :: nr_bins
     272             : 
     273           9 :       CPASSERT(.NOT. ASSOCIATED(ana_pair_correl))
     274           9 :       ALLOCATE (ana_pair_correl)
     275             : 
     276           9 :       NULLIFY (ana_pair_correl%g_r, ana_pair_correl%pairs)
     277           9 :       ana_pair_correl%conf_counter = 0
     278           9 :       ana_pair_correl%nr_bins = nr_bins
     279           9 :       ana_pair_correl%step_lenght = -1.0_dp
     280          36 :       ana_pair_correl%sum_box_scale = 0.0_dp
     281             :       ! still the initialization routine has to be called
     282           9 :    END SUBROUTINE tmc_ana_pair_correl_create
     283             : 
     284             : ! **************************************************************************************************
     285             : !> \brief releases the structure environment for TMC analysis
     286             : !> \param ana_pair_correl ...
     287             : !> \param
     288             : !> \author Mandes 02.2013
     289             : ! **************************************************************************************************
     290           9 :    SUBROUTINE tmc_ana_pair_correl_release(ana_pair_correl)
     291             :       TYPE(pair_correl_type), POINTER                    :: ana_pair_correl
     292             : 
     293           9 :       CPASSERT(ASSOCIATED(ana_pair_correl))
     294             : 
     295           9 :       DEALLOCATE (ana_pair_correl%g_r)
     296           9 :       DEALLOCATE (ana_pair_correl%pairs)
     297           9 :       DEALLOCATE (ana_pair_correl)
     298           9 :    END SUBROUTINE tmc_ana_pair_correl_release
     299             : 
     300             : ! **************************************************************************************************
     301             : !> \brief search the pair of two atom types in list
     302             : !> \param pair_list ...
     303             : !> \param n1 atom names
     304             : !> \param n2 atom names
     305             : !> \param list_end ...
     306             : !> \return ...
     307             : !> \author Mandes 02.2013
     308             : ! **************************************************************************************************
     309       88635 :    FUNCTION search_pair_in_list(pair_list, n1, n2, list_end) RESULT(ind)
     310             :       TYPE(atom_pairs_type), DIMENSION(:), POINTER       :: pair_list
     311             :       CHARACTER(LEN=default_string_length)               :: n1, n2
     312             :       INTEGER, OPTIONAL                                  :: list_end
     313             :       INTEGER                                            :: ind
     314             : 
     315             :       INTEGER                                            :: last, list_nr
     316             : 
     317       88635 :       CPASSERT(ASSOCIATED(pair_list))
     318       88635 :       IF (PRESENT(list_end)) THEN
     319        1890 :          CPASSERT(list_end .LE. SIZE(pair_list))
     320        1890 :          last = list_end
     321             :       ELSE
     322       86745 :          last = SIZE(pair_list)
     323             :       END IF
     324             : 
     325       88635 :       ind = -1
     326             : 
     327      173962 :       list_search: DO list_nr = 1, last
     328             :          IF ((pair_list(list_nr)%f_n .EQ. n1 .AND. &
     329      173935 :               pair_list(list_nr)%s_n .EQ. n2) .OR. &
     330             :              (pair_list(list_nr)%f_n .EQ. n2 .AND. &
     331          27 :               pair_list(list_nr)%s_n .EQ. n1)) THEN
     332             :             ind = list_nr
     333             :             EXIT list_search
     334             :          END IF
     335             :       END DO list_search
     336       88635 :    END FUNCTION search_pair_in_list
     337             : 
     338             :    !============================================================================
     339             :    ! classical cell dipole moment
     340             :    !============================================================================
     341             : 
     342             : ! **************************************************************************************************
     343             : !> \brief creates a new structure environment for TMC analysis
     344             : !> \param ana_dip_mom ...
     345             : !> \param charge_atm ...
     346             : !> \param charge ...
     347             : !> \param dim_per_elem ...
     348             : !> \param
     349             : !> \author Mandes 02.2013
     350             : ! **************************************************************************************************
     351           9 :    SUBROUTINE tmc_ana_dipole_moment_create(ana_dip_mom, charge_atm, charge, &
     352             :                                            dim_per_elem)
     353             :       TYPE(dipole_moment_type), POINTER                  :: ana_dip_mom
     354             :       CHARACTER(LEN=default_string_length), POINTER      :: charge_atm(:)
     355             :       REAL(KIND=dp), POINTER                             :: charge(:)
     356             :       INTEGER                                            :: dim_per_elem
     357             : 
     358             :       INTEGER                                            :: i
     359             : 
     360           9 :       CPASSERT(.NOT. ASSOCIATED(ana_dip_mom))
     361           9 :       ALLOCATE (ana_dip_mom)
     362             : 
     363           9 :       NULLIFY (ana_dip_mom%charges_inp, ana_dip_mom%charges)
     364             : 
     365          27 :       ALLOCATE (ana_dip_mom%charges_inp(SIZE(charge)))
     366          27 :       DO i = 1, SIZE(charge)
     367          18 :          ana_dip_mom%charges_inp(i)%name = charge_atm(i)
     368          27 :          ana_dip_mom%charges_inp(i)%mass = charge(i)
     369             :       END DO
     370             : 
     371           9 :       ana_dip_mom%conf_counter = 0
     372          27 :       ALLOCATE (ana_dip_mom%last_dip_cl(dim_per_elem))
     373             :       ! still the initialization routine has to be called
     374             : 
     375           9 :    END SUBROUTINE tmc_ana_dipole_moment_create
     376             : 
     377             : ! **************************************************************************************************
     378             : !> \brief releases the structure environment for TMC analysis
     379             : !> \param ana_dip_mom ...
     380             : !> \param
     381             : !> \author Mandes 02.2013
     382             : ! **************************************************************************************************
     383           9 :    SUBROUTINE tmc_ana_dipole_moment_release(ana_dip_mom)
     384             :       TYPE(dipole_moment_type), POINTER                  :: ana_dip_mom
     385             : 
     386           9 :       CPASSERT(ASSOCIATED(ana_dip_mom))
     387             : 
     388           9 :       IF (ASSOCIATED(ana_dip_mom%charges_inp)) DEALLOCATE (ana_dip_mom%charges_inp)
     389           9 :       IF (ASSOCIATED(ana_dip_mom%charges)) DEALLOCATE (ana_dip_mom%charges)
     390           9 :       DEALLOCATE (ana_dip_mom%last_dip_cl)
     391           9 :       DEALLOCATE (ana_dip_mom)
     392           9 :    END SUBROUTINE tmc_ana_dipole_moment_release
     393             : 
     394             : ! **************************************************************************************************
     395             : !> \brief creates a new structure environment for TMC analysis
     396             : !> \param ana_dip_ana ...
     397             : !> \param
     398             : !> \author Mandes 02.2013
     399             : ! **************************************************************************************************
     400           0 :    SUBROUTINE tmc_ana_dipole_analysis_create(ana_dip_ana)
     401             :       TYPE(dipole_analysis_type), POINTER                :: ana_dip_ana
     402             : 
     403           0 :       CPASSERT(.NOT. ASSOCIATED(ana_dip_ana))
     404           0 :       ALLOCATE (ana_dip_ana)
     405             : 
     406           0 :       ana_dip_ana%conf_counter = 0
     407           0 :       ana_dip_ana%ana_type = -1
     408           0 :       ana_dip_ana%mu2_pv_s = 0.0_dp
     409           0 :       ALLOCATE (ana_dip_ana%mu_psv(3))
     410           0 :       ana_dip_ana%mu_psv(:) = 0.0_dp
     411           0 :       ALLOCATE (ana_dip_ana%mu_pv(3))
     412           0 :       ana_dip_ana%mu_pv(:) = 0.0_dp
     413           0 :       ALLOCATE (ana_dip_ana%mu2_pv(3))
     414           0 :       ana_dip_ana%mu2_pv(:) = 0.0_dp
     415           0 :       ALLOCATE (ana_dip_ana%mu2_pv_mat(3, 3))
     416           0 :       ana_dip_ana%mu2_pv_mat(:, :) = 0.0_dp
     417           0 :    END SUBROUTINE tmc_ana_dipole_analysis_create
     418             : 
     419             : ! **************************************************************************************************
     420             : !> \brief releases the structure environment for TMC analysis
     421             : !> \param ana_dip_ana ...
     422             : !> \param
     423             : !> \author Mandes 02.2013
     424             : ! **************************************************************************************************
     425           0 :    SUBROUTINE tmc_ana_dipole_analysis_release(ana_dip_ana)
     426             :       TYPE(dipole_analysis_type), POINTER                :: ana_dip_ana
     427             : 
     428           0 :       CPASSERT(ASSOCIATED(ana_dip_ana))
     429             : 
     430           0 :       DEALLOCATE (ana_dip_ana%mu_psv)
     431           0 :       DEALLOCATE (ana_dip_ana%mu_pv)
     432           0 :       DEALLOCATE (ana_dip_ana%mu2_pv)
     433           0 :       DEALLOCATE (ana_dip_ana%mu2_pv_mat)
     434             : 
     435           0 :       DEALLOCATE (ana_dip_ana)
     436           0 :    END SUBROUTINE tmc_ana_dipole_analysis_release
     437             : 
     438             :    !============================================================================
     439             :    ! particle displacement in cell (from one configuration to the next)
     440             :    !============================================================================
     441             : 
     442             : ! **************************************************************************************************
     443             : !> \brief creates a new structure environment for TMC analysis
     444             : !> \param ana_disp ...
     445             : !> \param dim_per_elem ...
     446             : !> \param
     447             : !> \author Mandes 02.2013
     448             : ! **************************************************************************************************
     449           9 :    SUBROUTINE tmc_ana_displacement_create(ana_disp, dim_per_elem)
     450             :       TYPE(displacement_type), POINTER                   :: ana_disp
     451             :       INTEGER                                            :: dim_per_elem
     452             : 
     453           9 :       CPASSERT(.NOT. ASSOCIATED(ana_disp))
     454           9 :       CPASSERT(dim_per_elem .GT. 0)
     455             :       MARK_USED(dim_per_elem)
     456             : 
     457           9 :       ALLOCATE (ana_disp)
     458             : 
     459           9 :       ana_disp%disp = 0.0_dp
     460           9 :       ana_disp%conf_counter = 0
     461           9 :       ana_disp%print_disp = .TRUE.
     462           9 :    END SUBROUTINE tmc_ana_displacement_create
     463             : 
     464             : ! **************************************************************************************************
     465             : !> \brief releases a structure environment for TMC analysis
     466             : !> \param ana_disp ...
     467             : !> \param
     468             : !> \author Mandes 02.2013
     469             : ! **************************************************************************************************
     470           9 :    SUBROUTINE tmc_ana_displacement_release(ana_disp)
     471             :       TYPE(displacement_type), POINTER                   :: ana_disp
     472             : 
     473           9 :       CPASSERT(ASSOCIATED(ana_disp))
     474             : 
     475           9 :       DEALLOCATE (ana_disp)
     476           9 :    END SUBROUTINE tmc_ana_displacement_release
     477           0 : END MODULE tmc_analysis_types

Generated by: LCOV version 1.15