Base abstract type for a canonical Krylov method, solving \( Ax = f \).  
 More...
 | 
| procedure(ksp_init_intrf), deferred, pass(this)  | init (this, n, max_iter, m, rel_tol, abs_tol, monitor) | 
|   | Constructor.  
  | 
|   | 
| 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.  
  | 
|   | 
Definition at line 73 of file krylov.f90.
 
◆ free()
◆ init()
  
  
      
        
          | procedure(ksp_init_intrf), deferred, pass(this) krylov::ksp_t::init  | 
          ( | 
          class(ksp_t), intent(inout), target  | 
          this,  | 
         
        
           | 
           | 
          integer, intent(in)  | 
          n,  | 
         
        
           | 
           | 
          integer, intent(in)  | 
          max_iter,  | 
         
        
           | 
           | 
          class(pc_t), intent(in), optional, target  | 
          m,  | 
         
        
           | 
           | 
          real(kind=rp), intent(in), optional  | 
          rel_tol,  | 
         
        
           | 
           | 
          real(kind=rp), intent(in), optional  | 
          abs_tol,  | 
         
        
           | 
           | 
          logical, intent(in), optional  | 
          monitor  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
◆ is_converged()
This function checks if the Krylov solver has converged. The solver is considered converged if the residual is less than the absolute tolerance.
- Parameters
 - 
  
    | residual | Residual  | 
    | iter | Iteration number  | 
  
   
Definition at line 100 of file krylov.f90.
 
 
◆ ksp_free()
◆ ksp_init()
      
        
          | 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  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
- Parameters
 - 
  
    | 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. 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 84 of file krylov.f90.
 
 
◆ monitor_iter()
◆ monitor_start()
◆ monitor_stop()
◆ set_pc()
◆ solve()
  
  
      
        
          | procedure(ksp_method), deferred, pass krylov::ksp_t::solve  | 
          ( | 
          class(ksp_t), intent(inout)  | 
          this,  | 
         
        
           | 
           | 
          class(ax_t), intent(in)  | 
          ax,  | 
         
        
           | 
           | 
          type(field_t), intent(inout)  | 
          x,  | 
         
        
           | 
           | 
          real(kind=rp), dimension(n), intent(in)  | 
          f,  | 
         
        
           | 
           | 
          integer, intent(in)  | 
          n,  | 
         
        
           | 
           | 
          type(coef_t), intent(inout)  | 
          coef,  | 
         
        
           | 
           | 
          type(bc_list_t), intent(inout)  | 
          blst,  | 
         
        
           | 
           | 
          type(gs_t), intent(inout)  | 
          gs_h,  | 
         
        
           | 
           | 
          integer, intent(in), optional  | 
          niter  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
◆ solve_coupled()
  
  
      
        
          | procedure(ksp_method_coupled), deferred, pass krylov::ksp_t::solve_coupled  | 
          ( | 
          class(ksp_t), intent(inout)  | 
          this,  | 
         
        
           | 
           | 
          class(ax_t), intent(in)  | 
          ax,  | 
         
        
           | 
           | 
          type(field_t), intent(inout)  | 
          x,  | 
         
        
           | 
           | 
          type(field_t), intent(inout)  | 
          y,  | 
         
        
           | 
           | 
          type(field_t), intent(inout)  | 
          z,  | 
         
        
           | 
           | 
          real(kind=rp), dimension(n), intent(in)  | 
          fx,  | 
         
        
           | 
           | 
          real(kind=rp), dimension(n), intent(in)  | 
          fy,  | 
         
        
           | 
           | 
          real(kind=rp), dimension(n), intent(in)  | 
          fz,  | 
         
        
           | 
           | 
          integer, intent(in)  | 
          n,  | 
         
        
           | 
           | 
          type(coef_t), intent(inout)  | 
          coef,  | 
         
        
           | 
           | 
          type(bc_list_t), intent(inout)  | 
          blstx,  | 
         
        
           | 
           | 
          type(bc_list_t), intent(inout)  | 
          blsty,  | 
         
        
           | 
           | 
          type(bc_list_t), intent(inout)  | 
          blstz,  | 
         
        
           | 
           | 
          type(gs_t), intent(inout)  | 
          gs_h,  | 
         
        
           | 
           | 
          integer, intent(in), optional  | 
          niter  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
◆ abs_tol
◆ m_ident
◆ max_iter
◆ monitor
◆ rel_tol
The documentation for this type was generated from the following file: