| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | PCG_CONVERGED | = | -1 | |
| integer, | public, | parameter | :: | PCG_OK | = | 0 | |
| integer, | public, | parameter | :: | PCG_NOT_INITIALIZED | = | 1 | |
| integer, | public, | parameter | :: | PCG_BAD_ARGUMENT | = | 2 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp) | :: | y(:) | ||||
| real(kind=dp) | :: | x(:) | ||||
| type(c_ptr) | :: | dat |
@brief PCG solver for equation Ax=b
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .false. | ||
| integer(kind=8), | public | :: | errcode | = | 0 | ||
| real(kind=dp), | public, | allocatable | :: | b(:) | |||
| real(kind=dp), | public, | allocatable | :: | x(:) | |||
| real(kind=dp), | public, | allocatable | :: | Ap(:) | |||
| real(kind=dp), | public, | allocatable | :: | p(:) | |||
| real(kind=dp), | public, | allocatable | :: | r(:) | |||
| real(kind=dp), | public, | allocatable | :: | y(:) | |||
| real(kind=dp), | public | :: | error | = | huge(1.0_dp) | ||
| real(kind=dp), | public | :: | tol | = | 0.0_dp | ||
| procedure(pcg_matvec), | public, | nopass, pointer | :: | precond | => | null() | |
| procedure(pcg_matvec), | public, | nopass, pointer | :: | update | => | null() | |
| type(c_ptr), | public | :: | dat | = | c_null_ptr |
| procedure, public :: init => pcg_init | |
| procedure, public :: clean => pcg_clean | |
| procedure, public :: step => pcg_step |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | b(:) | |||
| procedure(pcg_matvec) | :: | update | ||||
| procedure(pcg_matvec) | :: | precond | ||||
| type(*), | intent(in) | :: | dat | |||
| integer, | intent(in) | :: | mxit | |||
| real(kind=dp), | intent(in), | optional | :: | x0(:) | ||
| real(kind=dp), | intent(in) | :: | tol | |||
| real(kind=dp), | intent(out), | optional | :: | err | ||
| real(kind=dp), | intent(out), | optional | :: | cgiters |