MPI-SCATCI 2.0
An MPI version of SCATCI
Loading...
Searching...
No Matches
SolutionHandler_module Module Reference

Solution handler module. More...

Data Types

type  SolutionHandler
 Solution writer. More...

Functions/Subroutines

subroutine construct (this, opts)
 Set up solution handler.
subroutine destroy (this)
 Release resources.
subroutine write_header_sol (this, option, integrals)
 Start writing eigenvector record.
subroutine export_header_sol (this, option, integrals)
 Write basic information into a CI vector.
subroutine shift_eigenvalues (this, output_eigenvalues, num_eigenpairs)
 Shift eigenvalues according to the NAMELIST input ESHIFT.
subroutine write_eigenvalues (this, eigenvalues, diagonals, num_eigenpairs, vec_dimen)
 Save Hamiltonian eigen-energies to disk file.
subroutine export_eigenvalues (this, eigenvalues, diagonals, num_eigenpairs, vec_dimen, ei, iphz)
 Write eigevalues and phases to supplied arrays.
subroutine write_eigenvector (this, eigenvector, vec_dimen)
 Save Hamiltonian eigen-vectors to disk file.
subroutine read_from_file (this, option)
 Import eigensolution from file.
subroutine finalize_solutions_sol (this, option)
 Finalize writing the eigenvector disk file.

Detailed Description

Solution handler module.

Authors
A Al-Refaie
Date
2017

Manages the eigevalue and eigenvector output. These are passed to individual subroutines by the caller; solution handler itself contains just a little basic information.

Note
16/01/2019 - Jakub Benda: Unifom coding style and expanded documentation.

Function/Subroutine Documentation

◆ construct()

subroutine SolutionHandler_module::construct ( class(solutionhandler) this,
class(options), intent(in) opts )

Set up solution handler.

Authors
A Al-Refaie
Date
2017

Initialize internal parameters, most notably the number of the output unit.

Definition at line 91 of file SolutionHandler_module.F90.

◆ destroy()

subroutine SolutionHandler_module::destroy ( class(solutionhandler), intent(inout) this)

Release resources.

Authors
J Benda
Date
2019

Release all allocated memory (phases and the CDENPROP data vector).

Definition at line 122 of file SolutionHandler_module.F90.

◆ export_eigenvalues()

subroutine SolutionHandler_module::export_eigenvalues ( class(solutionhandler) this,
real(wp), dimension(num_eigenpairs), intent(in) eigenvalues,
real(wp), dimension(vec_dimen), intent(in) diagonals,
integer, intent(in) num_eigenpairs,
integer, intent(in) vec_dimen,
real(wp), dimension(:), allocatable ei,
integer, dimension(:), allocatable iphz )

Write eigevalues and phases to supplied arrays.

Authors
A Al-Refaie
Date
2017

Copies (a subset of) eigenvalues and phases stored in the calling objecst to supplied arrays. This is used when preparing diagonalization data for processing in CDENPROP.

Definition at line 416 of file SolutionHandler_module.F90.

◆ export_header_sol()

subroutine SolutionHandler_module::export_header_sol ( class(solutionhandler) this,
class(options), intent(in) option,
class(baseintegral), intent(in) integrals )

Write basic information into a CI vector.

Authors
A Al-Refaie, J Benda
Date
2017 - 2019

Store general data related to the eigenvectors (like global quantum numbers, nuclear information and number of eigenvectors) to the provided CDENPROP data vector. This is used when passing data from MPI-SCATCI directly to the CDENPROP library.

Definition at line 246 of file SolutionHandler_module.F90.

◆ finalize_solutions_sol()

subroutine SolutionHandler_module::finalize_solutions_sol ( class(solutionhandler) this,
class(options), intent(in) option )

Finalize writing the eigenvector disk file.

Authors
J Benda
Date
2019

To avoid concurrent, conflicting accesses to the disk file in case that multiple datasets are to be written to it, by different processes, MPI-SCATCI uses a semaphore system. Once a process finishes writing its results into a dataset, it notifies the next process in line that wants to write to the same file unit (but into the subsequent dataset).

Definition at line 575 of file SolutionHandler_module.F90.

◆ read_from_file()

subroutine SolutionHandler_module::read_from_file ( class(solutionhandler) this,
class(options), intent(in) option )

Import eigensolution from file.

Authors
J Benda
Date
2022 - 2025

Instead of calculating the eigenpairs, simple read them from a file written earlier. Store them in a distributed CIvect structure for processing in CDENPROP.

Definition at line 488 of file SolutionHandler_module.F90.

◆ shift_eigenvalues()

subroutine SolutionHandler_module::shift_eigenvalues ( class(solutionhandler) this,
real(wp), dimension(num_eigenpairs), intent(inout) output_eigenvalues,
integer, intent(in) num_eigenpairs )

Shift eigenvalues according to the NAMELIST input ESHIFT.

Authors
T Meltzer
Date
2020

Shift eigenvalues according to the NAMELIST input ESHIFT. This subroutine is called only when some of the energy_shifts is non-zero.

Definition at line 342 of file SolutionHandler_module.F90.

◆ write_eigenvalues()

subroutine SolutionHandler_module::write_eigenvalues ( class(solutionhandler) this,
real(wp), dimension(num_eigenpairs), intent(in) eigenvalues,
real(wp), dimension(vec_dimen), intent(in) diagonals,
integer, intent(in) num_eigenpairs,
integer, intent(in) vec_dimen )

Save Hamiltonian eigen-energies to disk file.

Authors
A Al-Refaie
Date
2017

Continues the output operation commenced in write_header_sol by writing the phase information, eigenvalues and diagonals(?).

Definition at line 374 of file SolutionHandler_module.F90.

◆ write_eigenvector()

subroutine SolutionHandler_module::write_eigenvector ( class(solutionhandler) this,
real(wp), dimension(vec_dimen), intent(in) eigenvector,
integer, intent(in) vec_dimen )

Save Hamiltonian eigen-vectors to disk file.

Authors
A Al-Refaie
Date
2017

Completes the output operation commenced in write_header_sol by writing the eigenvectors (one per a call).

Definition at line 454 of file SolutionHandler_module.F90.

◆ write_header_sol()

subroutine SolutionHandler_module::write_header_sol ( class(solutionhandler) this,
class(options), intent(in) option,
class(baseintegral), intent(in) integrals )

Start writing eigenvector record.

Authors
A Al-Refaie
Date
2017

Opens or rewinds the output file, positions it to the beginning of the requested record and writes basic information about the solution, excluding phase information, eigenvalues and eigenvectors.

Definition at line 147 of file SolutionHandler_module.F90.