3D solvers, involving MPI communication
Initialisation of 3d solver
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_t), | intent(inout) | :: | self |
Instance of class |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| character(len=*), | intent(in) | :: | krylov_method |
Krylov method to be used |
||
| integer, | intent(in) | :: | ndim_loc |
Local dimension (on rank) of matrix |
||
| real(kind=FP), | intent(in) | :: | resmax |
Maximum allowed residual of solution |
||
| procedure(matvec_interface) | :: | matvec |
Routine performing matrix vector multiplication |
|||
| procedure(precond_interface), | optional | :: | precondl |
Routine performing left preconditioning |
||
| procedure(precond_interface), | optional | :: | precondr |
Routine performing right preconditioning |
||
| integer, | intent(in), | optional | :: | maxiter |
Maximum number of outer iterations (default=10) |
|
| integer, | intent(in), | optional | :: | nrestart |
Number of iterations before restart (default=10) |
|
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Solves 3d problem
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_t), | intent(inout) | :: | self |
Instance of class |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| real(kind=FP), | intent(in), | dimension(self%ndim_loc) | :: | rhs |
Right hand side |
|
| real(kind=FP), | intent(inout), | dimension(self%ndim_loc) | :: | sol |
Solution on output, on input initial guess |
|
| real(kind=FP), | intent(out) | :: | res |
Relative pseudo-residuum after solve |
||
| integer, | intent(out) | :: | info |
Info parameter, successful solve if >= 0 |
||
| real(kind=FP), | intent(out), | optional | :: | res_true |
True relative residuum after solve |
Initialisation of 3d solver
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_PIM_t), | intent(inout) | :: | self |
PIM solver |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| character(len=*), | intent(in) | :: | krylov_method |
Krylov method to be used, available options are (see PIM manual): - CG - RGMRES - BICGSTAB - RBICGSTAB |
||
| integer, | intent(in) | :: | ndim_loc |
Local dimension (on rank) of matrix |
||
| real(kind=FP), | intent(in) | :: | resmax |
Maximum allowed tolerance of solution x on normalised residual |
||
| procedure(matvec_interface) | :: | matvec |
Routine performing matrix vector multiplication |
|||
| procedure(precond_interface), | optional | :: | precondl |
Routine performing left preconditioning |
||
| procedure(precond_interface), | optional | :: | precondr |
Routine performing right preconditioning |
||
| integer, | intent(in), | optional | :: | maxiter |
Maximum number of outer iterations (default=10) |
|
| integer, | intent(in), | optional | :: | nrestart |
Number of iterations before restart (default=10) |
|
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Solves 3d problem
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_PIM_t), | intent(inout) | :: | self |
PIM solver |
||
| integer, | intent(in) | :: | comm |
Not used, only the communicator from the create_PIM routine is used |
||
| real(kind=FP), | intent(in), | dimension(self%ndim_loc) | :: | rhs |
Right hand side |
|
| real(kind=FP), | intent(inout), | dimension(self%ndim_loc) | :: | sol |
Solution on output, on input initial guess |
|
| real(kind=FP), | intent(out) | :: | res |
Relative pseudo-residuum after solve see PIM manual table 2 |
||
| integer, | intent(out) | :: | info |
On succesful solve (info>0) the number of iterations/restarts, for negative numbers see PIM manual |
||
| real(kind=FP), | intent(out), | optional | :: | res_true |
True relative residuum after solve |
Clears solver
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver3d_PIM_t), | intent(inout) | :: | self |
PIM solver |
Initialisation of 3d solver
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_CERFACS_t), | intent(inout) | :: | self |
CERFACS solver |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| character(len=*), | intent(in) | :: | krylov_method |
Krylov method to be used, available options are: - RGMRES |
||
| integer, | intent(in) | :: | ndim_loc |
Local dimension (on rank) of matrix |
||
| real(kind=FP), | intent(in) | :: | resmax |
Maximum allowed tolerance of solution x on normalised residual |
||
| procedure(matvec_interface) | :: | matvec |
Routine performing matrix vector multiplication |
|||
| procedure(precond_interface), | optional | :: | precondl |
Routine performing left preconditioning |
||
| procedure(precond_interface), | optional | :: | precondr |
Routine performing right preconditioning |
||
| integer, | intent(in), | optional | :: | maxiter |
TODO |
|
| integer, | intent(in), | optional | :: | nrestart |
TODO |
|
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Solves 3d problem
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(solver3d_CERFACS_t), | intent(inout) | :: | self |
CERFACS solver |
||
| integer, | intent(in) | :: | comm |
TODO |
||
| real(kind=FP), | intent(in), | dimension(self%ndim_loc) | :: | rhs |
Right hand side |
|
| real(kind=FP), | intent(inout), | dimension(self%ndim_loc) | :: | sol |
Solution on output, on input initial guess |
|
| real(kind=FP), | intent(out) | :: | res |
Residuum of preconditioned system |
||
| integer, | intent(out) | :: | info |
On succesful solve (info>0) the number of iterations |
||
| real(kind=FP), | intent(out), | optional | :: | res_true |
Residuum of unpreconditioned system |
Clears solver
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver3d_CERFACS_t), | intent(inout) | :: | self |
PIM solver |
Interface for matrix vector multiplication v = A*u
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=FP), | dimension(*) | :: | u | |||
| real(kind=FP), | dimension(*) | :: | v | |||
| integer | :: | ipar(*) |
Interface for preconditioner
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=FP), | dimension(*) | :: | u | |||
| real(kind=FP), | dimension(*) | :: | v | |||
| integer | :: | ipar(*) |
Abstract class for 3D solver
| procedure(create_abstract), public, deferred :: create | |
| procedure(solve_abstract), public, deferred :: solve |
Iterative 3D solver based on PIM library
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | dimension(13) | :: | ipar |
Integer parameters of PIM solver |
| final :: destructor_PIM |
| procedure, public :: create => create_PIM | |
| procedure, public :: solve => solve_PIM |
Iterative 3D solver based on CERFACS library
| final :: destructor_CERFACS |
| procedure, public :: create => create_CERFACS | |
| procedure, public :: solve => solve_CERFACS |