Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
module for conjugate gradient method in pure form
a linear solver using the conjugate gradient method This is a modification of linear_solver_cg
Maintainer ARA, Katharina Kormann Modified by Benedikt Perse Stability stable
Derived types and interfaces | |
type | sll_t_linear_solver_cg |
class for the cg linear solver More... | |
Functions/Subroutines | |
subroutine | create_linear_solver_cg (self, linear_operator, pc_left, filename) |
creates a linear solver More... | |
subroutine | initialize_linear_solver_cg (self, linear_operator, x_0) |
initializes the linear solver More... | |
subroutine | set_guess_linear_solver_cg (self, x_0) |
sets the initial guess More... | |
subroutine | check_convergence_linear_solver_cg (self, i_iteration, flag, r_err, arr_err) |
check the convergence of the current linear solver More... | |
subroutine | read_from_file_linear_solver_cg (self, filename) |
read from file More... | |
subroutine | solve_real_linear_solver_cg (self, rhs, unknown) |
af solves the linear system with real vectors More... | |
subroutine | cg_linear_solver (self, x, b, niterx, res) |
cg interface More... | |
subroutine | set_verbose_linear_solver_cg (self, verbose) |
sets the verbose for the linear solver object More... | |
subroutine | print_info_linear_solver_cg (self) |
destroys a finite element cell More... | |
subroutine | free_linear_solver_cg (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... | |
|
private |
cg interface
[in,out] | self | the current object |
[in] | b | the right hand side |
[out] | u | the solution |
[out] | niterx | number of iteration for convergence |
[out] | res | final residual error |
Definition at line 275 of file sll_m_linear_solver_cg.F90.
|
private |
check the convergence of the current linear solver
[in,out] | self | the current object |
[in] | i_iteration | the checking iteration |
[in] | flag | the verbose flag |
[in] | r_err | [optional] the error |
[in] | arr_err | [optional] the array of error |
Definition at line 145 of file sll_m_linear_solver_cg.F90.
|
private |
creates a linear solver
[in,out] | self | the current object |
[in] | linear_operator | a linear operator |
[in] | filename | parameter filename [optional] |
Definition at line 60 of file sll_m_linear_solver_cg.F90.
|
private |
destroys the current object
[in,out] | self | the current object |
Definition at line 397 of file sll_m_linear_solver_cg.F90.
|
private |
initializes the linear solver
[in,out] | self | the current object |
[in] | linear_operator | a linear operator |
[in] | x_0 | [optional] the init guess, defalut value: 0 |
Definition at line 97 of file sll_m_linear_solver_cg.F90.
|
private |
destroys a finite element cell
[in,out] | self | the current object |
Definition at line 378 of file sll_m_linear_solver_cg.F90.
|
private |
read from file
[in,out] | self | the current object |
[in] | filename | [optional] name of the output file |
Definition at line 174 of file sll_m_linear_solver_cg.F90.
|
private |
sets the initial guess
[in,out] | self | the current object |
[in] | x_guess | initial guess |
Definition at line 126 of file sll_m_linear_solver_cg.F90.
|
private |
sets the verbose for the linear solver object
[in,out] | self | the current object |
[in] | verbose | verbose flag |
Definition at line 362 of file sll_m_linear_solver_cg.F90.
|
private |
af solves the linear system with real vectors
[in,out] | self | the current object |
[in] | rhs | the right hand side |
[in,out] | unknown | the solution |
Definition at line 228 of file sll_m_linear_solver_cg.F90.
|
private |
code id for False
Definition at line 31 of file sll_m_linear_solver_cg.F90.
|
private |
default maximum number of iterations for
Definition at line 32 of file sll_m_linear_solver_cg.F90.
|
private |
default tolerance for iterative solvers
Definition at line 33 of file sll_m_linear_solver_cg.F90.