Neko 0.9.99
A portable framework for high-order spectral element flow simulations
|
Base abstract type for a canonical Krylov method, solving \( Ax = f \). More...
Public Member Functions | |
procedure, pass(this) | ksp_init (this, max_iter, rel_tol, abs_tol, m, monitor) |
Base type constructor. | |
procedure, pass(this) | ksp_free (this) |
Base type destructor. | |
procedure, pass(this) | set_pc (this, m) |
Set preconditioner. | |
procedure(ksp_method), deferred, pass | solve (this, ax, x, f, n, coef, blst, gs_h, niter) |
Solve the system. | |
procedure(ksp_method_coupled), deferred, pass | solve_coupled (this, ax, x, y, z, fx, fy, fz, n, coef, blstx, blsty, blstz, gs_h, niter) |
Solve the system (coupled version). | |
procedure, pass(this) | monitor_start (this, name) |
Monitor start. | |
procedure, pass(this) | monitor_stop (this) |
Monitor stop. | |
procedure, pass(this) | monitor_iter (this, iter, rnorm) |
Monitor iteration. | |
procedure, pass(this) | is_converged (this, iter, residual) |
Check for convergence. | |
procedure(ksp_t_free), deferred, pass | free (this) |
Destructor. | |
Public Attributes | |
class(pc_t), pointer | m => null() |
Preconditioner. | |
real(kind=rp) | rel_tol |
Relative tolerance. | |
real(kind=rp) | abs_tol |
Absolute tolerance. | |
integer | max_iter |
Maximum number of iterations. | |
class(pc_t), allocatable | m_ident |
Internal preconditioner (Identity) | |
logical | monitor |
Turn on/off monitoring. | |
Definition at line 68 of file krylov.f90.
|
pure virtual |
Definition at line 95 of file krylov.f90.
procedure, pass(this) krylov::ksp_t::is_converged | ( | class(ksp_t), intent(in) | this, |
integer, intent(in) | iter, | ||
real(kind=rp), intent(in) | residual | ||
) |
This function checks if the Krylov solver has converged. The solver is considered converged if the residual is less than the absolute tolerance.
residual | Residual |
iter | Iteration number |
Definition at line 93 of file krylov.f90.
Definition at line 79 of file krylov.f90.
procedure, pass(this) krylov::ksp_t::ksp_init | ( | class(ksp_t), intent(inout), target | this, |
integer, intent(in) | max_iter, | ||
real(kind=rp), intent(in), optional | rel_tol, | ||
real(kind=rp), intent(in), optional | abs_tol, | ||
class(pc_t), intent(in), optional, target | m, | ||
logical, intent(in), optional | monitor | ||
) |
object | The object to be allocated. |
n | Size of the vectors the solver operates on. |
type_name | The name of the solver type. |
max_iter | The maximum number of iterations |
abstol | The absolute tolerance, optional. |
M | The preconditioner, optional. |
monitor | Enable/disable monitoring, optional. Destroy an iterative Krylov type_name Constructor for the base type. |
max_iter | Maximum number of iterations. |
rel_tol | Relative tolarance for converence. |
rel_tol | Absolute tolarance for converence. |
M | The preconditioner. |
Definition at line 77 of file krylov.f90.
procedure, pass(this) krylov::ksp_t::monitor_iter | ( | class(ksp_t), intent(in) | this, |
integer, intent(in) | iter, | ||
real(kind=rp), intent(in) | rnorm | ||
) |
Definition at line 91 of file krylov.f90.
procedure, pass(this) krylov::ksp_t::monitor_start | ( | class(ksp_t), intent(in) | this, |
character(len=*) | name | ||
) |
Definition at line 87 of file krylov.f90.
Definition at line 89 of file krylov.f90.
procedure, pass(this) krylov::ksp_t::set_pc | ( | class(ksp_t), intent(inout) | this, |
class(pc_t), intent(in), target | m | ||
) |
M | The preconditioner. |
Definition at line 81 of file krylov.f90.
|
pure virtual |
Definition at line 83 of file krylov.f90.
|
pure virtual |
Definition at line 85 of file krylov.f90.
Definition at line 71 of file krylov.f90.
class(pc_t), allocatable krylov::ksp_t::m_ident |
Definition at line 73 of file krylov.f90.
integer krylov::ksp_t::max_iter |
Definition at line 72 of file krylov.f90.
logical krylov::ksp_t::monitor |
Definition at line 74 of file krylov.f90.
Definition at line 70 of file krylov.f90.