Dice Fortran Backend Documentation
|
Contains routines to read and write restart files. More...
Functions/Subroutines | |
subroutine | write_res_nml (i_qoi, i_par, auto, guess) |
Writes the restart file res_nml.txt, using the current states of simulation variables. More... | |
subroutine | read_res_nml (res) |
Reads the RESTART namelist in res_nml.txt. Assigns the input data to the corresponding variables in the restart derived type instance 'res'. More... | |
subroutine | error_check (ierr) |
Checks error status at each point of the NetCDF read. More... | |
subroutine | read_energies (filename, energies, variances, accept_rates) |
Reads restart files with energies, variances and acceptence arrays. More... | |
subroutine | read_energies_h2plus (filename, energies, variances, accept_rates, c_array) |
Reads restart files with energies, variances and acceptence arrays. Also reads one extra array of optimized 'c' parameters for H2plus problem. More... | |
subroutine | read_energies_h2 (filename, energies, variances, accept_rates, a_array, b_array) |
Reads restart files with energies, variances and acceptence arrays. Also reads two extra arrays of optimized parameters ('a' and 'beta') for H2 problem. More... | |
Variables | |
integer | fu |
To store LUN of files during i/o. More... | |
integer | rc |
To capture error states during file i/o. More... | |
Contains routines to read and write restart files.
Contains subroutines to read and write the RESTART namelist in the res_nml.txt restart file. Also contains subroutines that read the NetCDF files storing the restart history of either total energies or parameter energies.
subroutine restart_fns::write_res_nml | ( | integer(int32), intent(in) | i_qoi, |
integer(int32), intent(in), optional | i_par, | ||
logical, intent(in), optional | auto, | ||
real(real64), intent(in), optional | guess | ||
) |
Writes the restart file res_nml.txt, using the current states of simulation variables.
[in] | iqoi | Index of last grid point of alpha (for QHO)or bond (for H2plus or H2) |
[in] | auto | Boolean indicating if auto_params is turned on or not (for H2plus or H2) |
[in] | i_par | Index of last grid-point or auto-search iteration of c or beta (for H2plus or H2) |
[in] | guess | For auto-search, last guess value for c or beta (for H2plus or H2) |
Definition at line 47 of file restart_fns.f90.
subroutine restart_fns::read_res_nml | ( | type(restart_type), intent(out) | res | ) |
Reads the RESTART namelist in res_nml.txt. Assigns the input data to the corresponding variables in the restart derived type instance 'res'.
[out] | resvals | Instance of restart_type, to store restart parameter values |
Definition at line 110 of file restart_fns.f90.
subroutine restart_fns::error_check | ( | integer, intent(in) | ierr | ) |
Checks error status at each point of the NetCDF read.
Will print error message/code corresponding to ierr input. Copied from module write_netCDF.f90.
[in] | ierr | Internal error value |
Definition at line 152 of file restart_fns.f90.
subroutine restart_fns::read_energies | ( | character(len=*), intent(in) | filename, |
real(real64), dimension(:), intent(out) | energies, | ||
real(real64), dimension(:), intent(out) | variances, | ||
real(real64), dimension(:), intent(out) | accept_rates | ||
) |
Reads restart files with energies, variances and acceptence arrays.
Assigns the data arrays it reads to the corresponding array variables passed to it.
[in] | filename | Name of the NetCDF restart file with required energies |
[in] | energies | Array to store restart energies |
[in] | variances | Array to store restart variances |
[in] | accept_rates | Array to store restart acceptence rates |
Definition at line 176 of file restart_fns.f90.
subroutine restart_fns::read_energies_h2plus | ( | character(len=*), intent(in) | filename, |
real(real64), dimension(:), intent(out) | energies, | ||
real(real64), dimension(:), intent(out) | variances, | ||
real(real64), dimension(:), intent(out) | accept_rates, | ||
real(real64), dimension(:), intent(out) | c_array | ||
) |
Reads restart files with energies, variances and acceptence arrays. Also reads one extra array of optimized 'c' parameters for H2plus problem.
Assigns the data arrays it reads to the corresponding array variables passed to it.
[in] | filename | Name of the NetCDF restart file with required energies |
[in] | energies | Array to store restart energies |
[in] | variances | Array to store restart variances |
[in] | accept_rates | Array to store restart acceptence rates |
[in] | c_array | Array to store optimized c-values for each bondlength |
Definition at line 238 of file restart_fns.f90.
subroutine restart_fns::read_energies_h2 | ( | character(len=*), intent(in) | filename, |
real(real64), dimension(:), intent(out) | energies, | ||
real(real64), dimension(:), intent(out) | variances, | ||
real(real64), dimension(:), intent(out) | accept_rates, | ||
real(real64), dimension(:), intent(out) | a_array, | ||
real(real64), dimension(:), intent(out) | b_array | ||
) |
Reads restart files with energies, variances and acceptence arrays. Also reads two extra arrays of optimized parameters ('a' and 'beta') for H2 problem.
Assigns the data arrays it reads to the corresponding array variables passed to it.
[in] | filename | Name of the NetCDF restart file with required energies |
[in] | energies | Array to store restart energies |
[in] | variances | Array to store restart variances |
[in] | accept_rates | Array to store restart acceptence rates |
[in] | a_array | Array to store optimized a-values for each bondlength |
[in] | b_array | Array to store optimized beta-values for each bondlength |
Definition at line 309 of file restart_fns.f90.
integer restart_fns::fu |
integer restart_fns::rc |
To capture error states during file i/o.
Definition at line 24 of file restart_fns.f90.