|
BSpline Finite Element Exterior Calculus
|
Module that provides an interface to SLEPc for solving (generalized) eigenvalue problems. More...
Data Types | |
| interface | eigeninitoptions |
| type | eigensolver |
| Type that wraps SLEPc functionality for solving (generalized) eigenvalue problems. More... | |
Functions/Subroutines | |
| type(eigeninitoptions) function | init_eigeninitoptions (ksp_type, pc_type, hypre_type, rtol, atol, max_iter, verbosity, which, target, target_interval, eps_type) |
| Initialize an EigenInitOptions object. | |
| subroutine | init_eigen_options_from_traits (this, traits) |
| Select solver options for eigenvalue problems, favouring direct solvers (MUMPS) | |
| subroutine | eigensolver_init (this, amat, bmat, constraint1, constraint2, constraint3, coord_transform, options) |
| Initialize the eigensolver. | |
| subroutine | eigensolver_solve (this, rtol, max_iter, nr_pairs, verbosity) |
| Solve the eigenvalue problem. | |
| subroutine | eigensolver_get_eigenpair (this, index, val_r, fun_r, val_i, fun_i, err_est) |
| Get an eigenpair. | |
| subroutine | eigensolver_get_eigenvalues (this, vals_r, vals_i) |
| Get all computed eigenvalues. | |
| subroutine | eigensolver_destroy (this) |
| Destroy the eigensolver and free associated resources. | |
Module that provides an interface to SLEPc for solving (generalized) eigenvalue problems.
| subroutine m_mform_eigensolver::eigensolver_destroy | ( | class(eigensolver), intent(inout) | this | ) |
Destroy the eigensolver and free associated resources.
| this | The EigenSolver object |
| subroutine m_mform_eigensolver::eigensolver_get_eigenpair | ( | class(eigensolver), intent(in) | this, |
| integer, intent(in) | index, | ||
| real(wp), intent(out) | val_r, | ||
| type(mformfun), intent(out) | fun_r, | ||
| real(wp), intent(out), optional | val_i, | ||
| type(mformfun), intent(out), optional | fun_i, | ||
| real(wp), intent(out), optional | err_est ) |
Get an eigenpair.
| this | The EigenSolver object |
| index | The index of the eigenpair to get (1-based) |
| val_r | The real part of the eigenvalue |
| fun_r | The real part of the eigenfunction |
| val_i | _(optional)_ The imaginary part of the eigenvalue |
| fun_i | _(optional)_ The imaginary part of the eigenfunction |
| err_est | _(optional)_ The error estimate for the eigenpair |
| subroutine m_mform_eigensolver::eigensolver_get_eigenvalues | ( | class(eigensolver), intent(in) | this, |
| real(wp), dimension(:), intent(out), allocatable | vals_r, | ||
| real(wp), dimension(:), intent(out), optional, allocatable | vals_i ) |
Get all computed eigenvalues.
| this | The EigenSolver object |
| vals_r | The real parts of the eigenvalues |
| vals_i | _(optional)_ The imaginary parts of the eigenvalues |
| subroutine m_mform_eigensolver::eigensolver_init | ( | class(eigensolver), intent(inout) | this, |
| class(abstractmatrix), intent(in) | amat, | ||
| class(abstractmatrix), intent(in), optional | bmat, | ||
| class(mformconstraintlocal), intent(in), optional | constraint1, | ||
| class(mformconstraintlocal), intent(in), optional | constraint2, | ||
| class(mformconstraintlocal), intent(in), optional | constraint3, | ||
| class(coordtransformabstract), intent(in), optional | coord_transform, | ||
| type(eigeninitoptions), intent(in), optional | options ) |
Initialize the eigensolver.
| this | The EigenSolver object | |
| amat | The matrix A in the eigenvalue problem: $A x = \lambda x$ | |
| bmat | _(optional)_ The matrix B in the eigenvalue problem: $A x = \lambda B x$ | |
| [in] | constraint1 | _(optional)_ An optional constraint to be applied to the solution |
| [in] | constraint2 | _(optional)_ An optional constraint to be applied to the solution |
| [in] | constraint3 | _(optional)_ An optional constraint to be applied to the solution |
| [in] | coord_transform | _(optional)_ The coordinate transformation associated with the m-form spaces |
| options | _(optional)_ The options for initializing the eigensolver (default: auto-select based on traits) |
| subroutine m_mform_eigensolver::eigensolver_solve | ( | class(eigensolver), intent(inout) | this, |
| real(wp), intent(in), optional | rtol, | ||
| integer, intent(in), optional | max_iter, | ||
| integer, intent(in), optional | nr_pairs, | ||
| integer, intent(in), optional | verbosity ) |
Solve the eigenvalue problem.
| this | The EigenSolver object |
| rtol | _(optional)_ The relative tolerance (default: 1.e-8) |
| max_iter | _(optional)_ The maximum number of iterations (default: size of the space) |
| nr_pairs | _(optional)_ The number of eigenpairs to compute (default: 6) |
| verbosity | _(optional)_ The verbosity level (default: VERBOSITY_WARN_ON_FAILURE)
|
| subroutine m_mform_eigensolver::init_eigen_options_from_traits | ( | class(eigeninitoptions), intent(inout) | this, |
| type(solverinittraits), intent(in) | traits ) |
Select solver options for eigenvalue problems, favouring direct solvers (MUMPS)
Eigenvalue solvers require highly accurate linear solves inside the spectral transform. Iterative methods with standard preconditioners often lack the accuracy needed for convergence of multiple eigenpairs. This override defaults to a direct solver (PREONLY + Cholesky/LU with MUMPS) which works both in serial and parallel.
| this | The EigenInitOptions object |
| traits | The solver traits derived from matrix properties |
| type(eigeninitoptions) function m_mform_eigensolver::init_eigeninitoptions | ( | character(*), intent(in), optional | ksp_type, |
| character(*), intent(in), optional | pc_type, | ||
| character(*), intent(in), optional | hypre_type, | ||
| real(wp), intent(in), optional | rtol, | ||
| real(wp), intent(in), optional | atol, | ||
| integer, intent(in), optional | max_iter, | ||
| character(len=80), intent(in), optional | verbosity, | ||
| character(*), intent(in), optional | which, | ||
| real(wp), intent(in), optional | target, | ||
| real(wp), dimension(2), intent(in), optional | target_interval, | ||
| character(*), intent(in), optional | eps_type ) |
Initialize an EigenInitOptions object.
| ksp_type | _(optional)_ The KSP type to use (default: auto-select based on traits) |
| pc_type | _(optional)_ The PC type to use (default: auto-select based on traits) |
| hypre_type | _(optional)_ The HYPRE preconditioner type to use (default: auto-select based on traits) |
| rtol | _(optional)_ The relative tolerance (default: 1.e-10) |
| atol | _(optional)_ The absolute tolerance (default: 1.e-20) |
| max_iter | _(optional)_ The maximum number of iterations (default: size of the space) |
| verbosity | _(optional)_ The verbosity level (default: 'warn on failure')
|
| which | _(optional)_ Which part of the spectrum to compute. Possible values are: |
| which | _(optional)_ Which part of the spectrum to compute. Possible values are:
|
| target | _(optional)_ The target value if 'which' is a target option |
| target_interval | _(optional)_ The target interval if 'which' is 'all' |
| eps_type | _(optional)_ The type of eigensolver to use (default: 'krylovschur'). Possible values are:
|