Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
Derived types and interfaces | Functions/Subroutines | Variables
sll_m_linear_solver_mgmres Module Reference

Description

module for a sequential gmres

Maintainer ARA Modified by Benedikt Perse Stability stable

Derived types and interfaces

type  sll_t_linear_solver_mgmres
 class for a sequential gmres linear solver More...
 

Functions/Subroutines

subroutine create_linear_solver_mgmres (self, linear_operator, pc_left, filename)
 creates a linear solver More...
 
subroutine initialize_linear_solver_mgmres (self, linear_operator, x_0)
 initializes the linear solver More...
 
subroutine set_guess_linear_solver_mgmres (self, x_0)
 sets the initial guess More...
 
subroutine check_convergence_linear_solver_mgmres (self, i_iteration, flag, r_err, arr_err)
 check the convergence of the current linear solver More...
 
subroutine read_from_file_linear_solver_mgmres (self, filename)
 read from file More...
 
subroutine set_verbose_linear_solver_mgmres (self, verbose)
 sets the verbose for the linear solver object More...
 
subroutine solve_real_linear_solver_mgmres (self, rhs, unknown)
 solves the linear system with real vectors More...
 
subroutine mgmres_linear_solver (self, x, rhs, itr_max, mr, tol_abs, tol_rel, itr_used, rho)
 
subroutine mult_givens (c, s, k, g)
 
subroutine print_info_linear_solver_mgmres (self)
 destroys a finite element cell More...
 
subroutine free_linear_solver_mgmres (self)
 destroys the current object More...
 

Variables

integer(kind=i32), parameter sll_solver_bool_false = 0
 code id for False More...
 
integer(kind=i32), parameter sll_solver_maxiter = 1000
 default maximum number of iterations for More...
 
real(kind=f64), parameter sll_solver_tolerance = 1.0d-9
 default tolerance for iterative solvers More...
 
integer(kind=i32), parameter sll_solver_restart = 30
 default number of restarts for gmres More...
 

Function/Subroutine Documentation

◆ check_convergence_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::check_convergence_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(in)  self,
integer(kind=i32), intent(in)  i_iteration,
logical, intent(inout)  flag,
real(kind=f64), intent(in), optional  r_err,
real(kind=f64), dimension(:), intent(in), optional  arr_err 
)
private

check the convergence of the current linear solver

Parameters
[in,out]selfthe current object
[in]i_iterationthe checking iteration
[in]flagthe verbose flag
[in]r_err[optional] the error
[in]arr_err[optional] the array of error

Definition at line 151 of file sll_m_linear_solver_mgmres.F90.

◆ create_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::create_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
class(sll_t_linear_operator_abstract), intent(in), target  linear_operator,
class(sll_t_linear_solver_abstract), intent(in), optional, target  pc_left,
character(len=*), intent(in), optional  filename 
)
private

creates a linear solver

Parameters
[in,out]selfthe current object
[in]linear_operatora linear operator
[in]pc_lefta left preconditioner. This should be a solver too. [optional]
[in]pc_righta right preconditioner. This should be a solver too. [optional]
[in]filenameparameter filename [optional]

Definition at line 67 of file sll_m_linear_solver_mgmres.F90.

◆ free_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::free_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self)
private

destroys the current object

Parameters
[in,out]selfthe current object

Definition at line 675 of file sll_m_linear_solver_mgmres.F90.

◆ initialize_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::initialize_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
class(sll_t_linear_operator_abstract), intent(in), target  linear_operator,
real(kind=f64), dimension(:), intent(in), optional  x_0 
)
private

initializes the linear solver

Parameters
[in,out]selfthe current object
[in]linear_operatora linear operator
[in]x_0[optional] the initial guess, defalut value: 0

Definition at line 104 of file sll_m_linear_solver_mgmres.F90.

◆ mgmres_linear_solver()

subroutine sll_m_linear_solver_mgmres::mgmres_linear_solver ( class(sll_t_linear_solver_mgmres), intent(in)  self,
real(kind=f64), dimension(1:self%n_total_rows)  x,
real(kind=f64), dimension(1:self%n_total_rows)  rhs,
integer(kind=i32)  itr_max,
integer(kind=i32)  mr,
real(kind=f64)  tol_abs,
real(kind=f64)  tol_rel,
integer(kind=i32)  itr_used,
real(kind=f64)  rho 
)
private

Definition at line 305 of file sll_m_linear_solver_mgmres.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mult_givens()

subroutine sll_m_linear_solver_mgmres::mult_givens ( real(kind=f64)  c,
real(kind=f64)  s,
integer(kind=i32)  k,
real(kind=f64), dimension(1:k+1)  g 
)
private

Definition at line 571 of file sll_m_linear_solver_mgmres.F90.

Here is the caller graph for this function:

◆ print_info_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::print_info_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(in)  self)
private

destroys a finite element cell

Parameters
[in,out]selfthe current object

Definition at line 654 of file sll_m_linear_solver_mgmres.F90.

◆ read_from_file_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::read_from_file_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
character(len=*), intent(in)  filename 
)
private

read from file

Parameters
[in,out]selfthe current object
[in]filename[optional] name of the output file

Definition at line 179 of file sll_m_linear_solver_mgmres.F90.

◆ set_guess_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::set_guess_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
real(kind=f64), dimension(:), intent(in)  x_0 
)
private

sets the initial guess

Parameters
[in,out]selfthe current object
[in]x_0the initial guess

Definition at line 132 of file sll_m_linear_solver_mgmres.F90.

◆ set_verbose_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::set_verbose_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
logical, intent(in)  verbose 
)
private

sets the verbose for the linear solver object

Parameters
[in,out]selfthe current object
[in]verboseverbose flag

Definition at line 239 of file sll_m_linear_solver_mgmres.F90.

◆ solve_real_linear_solver_mgmres()

subroutine sll_m_linear_solver_mgmres::solve_real_linear_solver_mgmres ( class(sll_t_linear_solver_mgmres), intent(inout)  self,
real(kind=f64), dimension(:), intent(in)  rhs,
real(kind=f64), dimension(:), intent(out)  unknown 
)
private

solves the linear system with real vectors

Parameters
[in,out]selfthe current object
[in]rhsthe right hand side
[in,out]unknownthe solution

Definition at line 257 of file sll_m_linear_solver_mgmres.F90.

Here is the call graph for this function:

Variable Documentation

◆ sll_solver_bool_false

integer(kind=i32), parameter sll_solver_bool_false = 0
private

code id for False

Definition at line 31 of file sll_m_linear_solver_mgmres.F90.

◆ sll_solver_maxiter

integer(kind=i32), parameter sll_solver_maxiter = 1000
private

default maximum number of iterations for

Definition at line 32 of file sll_m_linear_solver_mgmres.F90.

◆ sll_solver_restart

integer(kind=i32), parameter sll_solver_restart = 30
private

default number of restarts for gmres

Definition at line 34 of file sll_m_linear_solver_mgmres.F90.

◆ sll_solver_tolerance

real(kind=f64), parameter sll_solver_tolerance = 1.0d-9
private

default tolerance for iterative solvers

Definition at line 33 of file sll_m_linear_solver_mgmres.F90.

    Report Typos and Errors