MPI-SCATCI  2.0
An MPI version of SCATCI
DiagonalizerResult_module.f90
Go to the documentation of this file.
1 ! Copyright 2019
2 !
3 ! For a comprehensive list of the developers that contributed to these codes
4 ! see the UK-AMOR website.
5 !
6 ! This file is part of UKRmol-in (UKRmol+ suite).
7 !
8 ! UKRmol-in is free software: you can redistribute it and/or modify
9 ! it under the terms of the GNU General Public License as published by
10 ! the Free Software Foundation, either version 3 of the License, or
11 ! (at your option) any later version.
12 !
13 ! UKRmol-in is distributed in the hope that it will be useful,
14 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ! GNU General Public License for more details.
17 !
18 ! You should have received a copy of the GNU General Public License
19 ! along with UKRmol-in (in source/COPYING). Alternatively, you can also visit
20 ! <https://www.gnu.org/licenses/>.
21 
29 
30  use cdenprop_defs, only: civect
33  use options_module, only: options
34 
35  implicit none
36 
37  public diagonalizerresult
38 
39  private
40 
48  type, abstract :: diagonalizerresult
49  type(civect) :: ci_vec
50 
51  integer :: vector_storage = save_continuum_coeffs
52  integer :: continuum_dimen
53  contains
54  procedure(handle_eigenvalues), deferred, public :: handle_eigenvalues
55  procedure(handle_eigenvector), deferred, public :: handle_eigenvector
56  procedure(export_eigenvalues), deferred, public :: export_eigenvalues
57  procedure :: export_header
58  procedure :: write_header
59  procedure :: finalize_solutions
60  end type diagonalizerresult
61 
62  abstract interface
63 
71  subroutine handle_eigenvalues (this, eigenvalues, diagonals, num_eigenpairs, vec_dimen)
72  use precisn, only : wp
73  import :: diagonalizerresult
74  class(diagonalizerresult) :: this
75  integer, intent(in) :: num_eigenpairs, vec_dimen
76  real(wp), intent(in) :: eigenvalues(num_eigenpairs), diagonals(vec_dimen)
77  end subroutine handle_eigenvalues
78 
87  subroutine handle_eigenvector (this, eigenvector, vec_dimen)
88  use precisn, only : wp
89  import :: diagonalizerresult
90  class(diagonalizerresult) :: this
91  integer, intent(in) :: vec_dimen
92  real(wp), intent(in) :: eigenvector(vec_dimen)
93  end subroutine handle_eigenvector
94 
103  subroutine export_eigenvalues (this, eigenvalues, diagonals, num_eigenpairs, vec_dimen, ei, iphz)
104  use precisn, only : wp
105  import :: diagonalizerresult
106  class(diagonalizerresult) :: this
107  integer, intent(in) :: num_eigenpairs, vec_dimen
108  real(wp), intent(in) :: eigenvalues(num_eigenpairs), diagonals(vec_dimen)
109  real(wp), allocatable :: ei(:)
110  integer, allocatable :: iphz(:)
111  end subroutine export_eigenvalues
112  end interface
113 
114 contains
115 
124  subroutine export_header (this, option, integrals)
125  class(diagonalizerresult) :: this
126  class(options), intent(in) :: option
127  class(baseintegral), intent(in) :: integrals
128  end subroutine export_header
129 
130 
139  subroutine write_header (this, option, integrals)
140  class(diagonalizerresult) :: this
141  class(options), intent(in) :: option
142  class(baseintegral), intent(in) :: integrals
143  end subroutine write_header
144 
145 
154  subroutine finalize_solutions (this, option)
155  class(diagonalizerresult) :: this
156  class(options), intent(in) :: option
157  end subroutine finalize_solutions
158 
159 end module diagonalizerresult_module
diagonalizerresult_module::diagonalizerresult
Output from diagonalization.
Definition: DiagonalizerResult_module.f90:48
diagonalizerresult_module::write_header
subroutine write_header(this, option, integrals)
Save eigenvector information to disk.
Definition: DiagonalizerResult_module.f90:140
diagonalizerresult_module::handle_eigenvector
Main build routine of the hamiltonian.
Definition: DiagonalizerResult_module.f90:87
options_module::options
Calculation setup for a single Hamiltonian diagonalization.
Definition: Options_module.f90:74
consts_mpi_ci::save_continuum_coeffs
integer, parameter save_continuum_coeffs
Omit L2 section of the eigenvectors (only keep continuum channels)
Definition: consts_mpi_ci.f90:108
diagonalizerresult_module::finalize_solutions
subroutine finalize_solutions(this, option)
Finalize saving eigenvector information to disk.
Definition: DiagonalizerResult_module.f90:155
consts_mpi_ci
MPI SCATCI Constants module.
Definition: consts_mpi_ci.f90:31
diagonalizerresult_module::export_eigenvalues
build routine of the hamiltonian
Definition: DiagonalizerResult_module.f90:103
baseintegral_module
Base integral module.
Definition: BaseIntegral_module.f90:28
diagonalizerresult_module
Diagonalizer result data object.
Definition: DiagonalizerResult_module.f90:28
baseintegral_module::baseintegral
Definition: BaseIntegral_module.f90:41
diagonalizerresult_module::export_header
subroutine export_header(this, option, integrals)
Save eigenvector information internally.
Definition: DiagonalizerResult_module.f90:125
options_module
Options module.
Definition: Options_module.f90:41
diagonalizerresult_module::handle_eigenvalues
Main build routine of the hamiltonian.
Definition: DiagonalizerResult_module.f90:71