ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
|
Core routines and parameters of ddX software. More...
Data Types | |
interface | matvec_interface |
interface | matvec_interface_external |
interface | norm_interface |
Functions/Subroutines | |
subroutine | jacobi_diis (params, constants, workspace, tol, rhs, x, niter, x_rel_diff, matvec, dm1vec, norm_func, ddx_error) |
Jacobi iterative solver. More... | |
subroutine | diis (n, nmat, ndiis, x, e, b, xnew) |
DIIS helper routine. More... | |
subroutine | makeb (n, nmat, ndiis, e, b) |
DIIS helper routine. More... | |
subroutine | jacobi_diis_external (params, constants, workspace, n, tol, rhs, x, n_iter, x_rel_diff, matvec, dm1vec, norm_func, ddx_error) |
jacobi_diis_solver_external WARNING: code duplication is bad, but here it makes a very specific sense. in ddLPB, we are solving a linear system with Jacobi DIIS also to apply the preconditioner. As calling a solver recursively is a terrible idea, we create a copy of jacobi_diis that: More... | |
Core routines and parameters of ddX software.
subroutine ddx_solvers::jacobi_diis | ( | type(ddx_params_type), intent(in) | params, |
type(ddx_constants_type), intent(in) | constants, | ||
type(ddx_workspace_type), intent(inout) | workspace, | ||
real(dp), intent(in) | tol, | ||
real(dp), dimension(constants % n), intent(in) | rhs, | ||
real(dp), dimension(constants % n), intent(inout) | x, | ||
integer, intent(inout) | niter, | ||
real(dp), dimension(niter), intent(out) | x_rel_diff, | ||
procedure(matvec_interface) | matvec, | ||
procedure(matvec_interface) | dm1vec, | ||
procedure(norm_interface) | norm_func, | ||
type(ddx_error_type), intent(inout) | ddx_error | ||
) |
Jacobi iterative solver.
[in] | params | User input parameters for the ddX. |
[in] | constants | Precomputed constants for the ddX. |
[in,out] | workspace | Temporary workspace for the ddX. |
[in] | tol | Relative error threshold to stop iterations. |
[in] | rhs | Right hand side. |
[in,out] | x | On input, containts an initial guess to a solution. On exit, returns |
[in,out] | niter | Maximal number of iterations on input. On exit, contains a number of actually performed matrix-vector products. |
[out] | x_rel_diff | Relative difference between old and new values of the solution on each iteration. |
[in] | matvec | Routine that performs |
[in] | dm1vec | |
[in] | norm_func | |
[in,out] | ddx_error | ddX error |
Definition at line 84 of file ddx_solvers.f90.
subroutine ddx_solvers::diis | ( | integer, intent(in) | n, |
integer, intent(inout) | nmat, | ||
integer, intent(in) | ndiis, | ||
real(dp), dimension(n,ndiis), intent(inout) | x, | ||
real(dp), dimension(n,ndiis), intent(inout) | e, | ||
real(dp), dimension(ndiis+1,ndiis+1), intent(inout) | b, | ||
real(dp), dimension(n), intent(inout) | xnew | ||
) |
DIIS helper routine.
Definition at line 162 of file ddx_solvers.f90.
subroutine ddx_solvers::makeb | ( | integer, intent(in) | n, |
integer, intent(in) | nmat, | ||
integer, intent(in) | ndiis, | ||
real(dp), dimension(n,ndiis), intent(in) | e, | ||
real(dp), dimension(ndiis+1,ndiis+1), intent(inout) | b | ||
) |
DIIS helper routine.
Definition at line 214 of file ddx_solvers.f90.
subroutine ddx_solvers::jacobi_diis_external | ( | type(ddx_params_type), intent(in) | params, |
type(ddx_constants_type), intent(inout) | constants, | ||
type(ddx_workspace_type), intent(inout) | workspace, | ||
integer, intent(in) | n, | ||
real(dp), intent(in) | tol, | ||
real(dp), dimension(n), intent(in) | rhs, | ||
real(dp), dimension(n), intent(inout) | x, | ||
integer, intent(inout) | n_iter, | ||
real(dp), dimension(n_iter), intent(out) | x_rel_diff, | ||
external | matvec, | ||
external | dm1vec, | ||
procedure(norm_interface) | norm_func, | ||
type(ddx_error_type), intent(inout) | ddx_error | ||
) |
jacobi_diis_solver_external WARNING: code duplication is bad, but here it makes a very specific sense. in ddLPB, we are solving a linear system with Jacobi DIIS also to apply the preconditioner. As calling a solver recursively is a terrible idea, we create a copy of jacobi_diis that:
Definition at line 263 of file ddx_solvers.f90.