Contains a dedicated type for the various settings of the ARPACK solvers. All variables that are used in different solver settings are defined, initialised and set in this module.
General type containing the ARPACK configuration.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | mode | mode of the solver |
|||
integer, | public | :: | ido | reverse communication flag |
|||
character(len=1), | private | :: | bmat | type of the matrix B ("I" = unit matrix, "G" = general matrix) |
|||
integer, | private | :: | evpdim | dimension of the eigenvalue problem |
|||
character(len=2), | private | :: | which | which eigenvalues to calculate |
|||
integer, | private | :: | nev | number of eigenvalues to calculate |
|||
real(kind=dp), | private | :: | tolerance | stopping criteria, relative accuracy of Ritz eigenvalues |
|||
complex(kind=dp), | public, | allocatable | :: | residual(:) | residual vector |
||
integer, | private | :: | ncv | indicates how many Arnoldi vectors are generated each iteration |
|||
integer, | public | :: | iparam(11) | integer array containing mode and parameters |
|||
integer, | private | :: | lworkl | length of workl array, must be at least 3 * ncv**2 + 5 * ncv |
|||
integer, | public | :: | info | info parameter |
|||
integer, | private | :: | maxiter | maximum number of iterations |
procedure, public :: get_bmat | |
procedure, public :: get_evpdim | |
procedure, public :: get_which | |
procedure, public :: get_nev | |
procedure, public :: get_tolerance | |
procedure, public :: get_ncv | |
procedure, public :: get_maxiter | |
procedure, public :: get_lworkl | |
procedure, public :: parse_znaupd_info | |
procedure, public :: parse_zneupd_info | |
procedure, public :: parse_finished_stats | |
procedure, public :: destroy | |
procedure, private :: set_mode | |
procedure, private :: set_bmat | |
procedure, private :: set_which | |
procedure, private :: set_nev | |
procedure, private :: set_residual | |
procedure, private :: set_ncv | |
procedure, private :: set_maxiter |
Constructor for a new ARPACK configuration based on the dimension of the eigenvalue problem, mode of the solver and type of the B-matrix. Initialises required variables and allocates work arrays to be used when calling the solvers.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | evpdim | dimension of the eigenvalue problem |
||
integer, | intent(in) | :: | mode | mode for the solver |
||
character(len=1), | intent(in) | :: | bmat | type of the matrix B |
||
type(solver_settings_t), | intent(inout) | :: | solver_settings |
initialised arpack configuration
Getter for kind of B-matrix in eigenvalue problem.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for dimension of eigenvalue problem.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for which eigenvalues to return.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for number of eigenvalues to calculate.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for tolerance (relative accuracy) to indicate eigenvalue convergence.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for number of Arnoldi basis vectors that should be calculated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for maximum number of iterations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Getter for length of workl array, returns 3 * ncv**2 + 5 * ncv
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |
Sets the mode for the solver.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
integer, | intent(in) | :: | mode | solver mode |
Sets the type of B-matrix.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
character, | intent(in) | :: | bmat | type of B-matrix |
Setter for the "which" argument of ARPACK routines.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
character(len=2), | intent(in) | :: | which | which kind of eigenvalues to calculate |
Setter for number of eigenvalues to calculate.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
integer, | intent(in) | :: | nev | number of eigenvalues to calculate |
Setter for the residual vector, allocates and manually initialises the
residual (= starting) vector using a uniform distribution on (-1, 1)
for both the real and imaginary parts. Relies on the LAPACK routine zlarnv
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
integer, | intent(in) | :: | evpdim | dimension of the eigenvalue problem |
Setter for ncv, the number of Arnoldi basis vectors to calculate. This should satisfy 1 <= ncv - nev and ncv <= evpdim, with recommended value ncv = 2 * nev (see arpack docs).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
integer, | intent(in) | :: | ncv | value for ncv |
Sets the maximum number of iterations that ARPACK is allowed to take, defaults to max(100, 10 * k) with k the number of eigenvalues.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
||
integer, | intent(in) | :: | maxiter | maximum number of iterations |
Destructor, deallocates variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(inout) | :: | this | type instance |
Parses the info parameter that comes out of ARPACK's znaupd method. If info = 0, everything behaved nicely and the reverse communication subroutines exited properly. If info is any other value something went wrong and we handle it accordingly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | reference to type object |
||
logical, | intent(out) | :: | converged | if .true. the reverse communication routines converged, .false. otherwise |
Parses the info parameter that comes out of ARPACK's zneupd method. If info = 0, the eigenvalues extraction routines exited properly, if info is any other value something went wrong and we handle it accordingly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | reference to type object |
Parses the statistics that come out of ARPACK when the run is finished. Displays the number of OPX and BX operations and the number of re-orthogonalisation steps that were needed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(arpack_t), | intent(in) | :: | this | type instance |