Octopus
solvers.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
22module solvers_oct_m
23 use blas_oct_m
24 use debug_oct_m
25 use global_oct_m
26 use, intrinsic :: iso_fortran_env
28 use loct_oct_m
31
32 implicit none
33
34 private
35 public :: &
42 didrs, &
43 zidrs
44
45 abstract interface
46 subroutine doperator_i(x, y)
47 import real64
48 implicit none
49 real(real64), contiguous, intent(in) :: x(:)
50 real(real64), contiguous, intent(out) :: y(:)
51 end subroutine doperator_i
52 subroutine zoperator_i(x, y)
53 import real64
54 implicit none
55 complex(real64), contiguous, intent(in) :: x(:)
56 complex(real64), contiguous, intent(out) :: y(:)
57 end subroutine zoperator_i
58 function ddotp_i(x, y)
59 import real64
60 implicit none
61 real(real64) :: ddotp_i
62 real(real64), intent(in) :: x(:)
63 real(real64), intent(in) :: y(:)
64 end function ddotp_i
65 function dnrm_i(x)
66 import real64
67 implicit none
68 real(real64), intent(in) :: x(:)
69 real(real64) :: dnrm_i
70 end function dnrm_i
71 function zdotp_i(x, y)
72 import real64
73 implicit none
74 complex(real64), intent(in) :: x(:)
75 complex(real64), intent(in) :: y(:)
76 complex(real64) :: zdotp_i
77 end function zdotp_i
78 function znrm_i(x)
79 import real64
80 implicit none
81 complex(real64), intent(in) :: x(:)
82 real(real64) :: znrm_i
83 end function znrm_i
84 end interface
85
86
94
100
101 interface dconjugate_gradients
103 end interface dconjugate_gradients
104
105 interface zconjugate_gradients
107 end interface zconjugate_gradients
108
109contains
110
111#include "undef.F90"
112#include "complex.F90"
113#include "solvers_inc.F90"
114
115#include "undef.F90"
116#include "real.F90"
117#include "solvers_inc.F90"
118
119end module solvers_oct_m
120
121!! Local Variables:
122!! mode: f90
123!! coding: utf-8
124!! End:
This module contains interfaces for BLAS routines You should not use these routines directly....
Definition: blas.F90:118
This module is intended to contain "only mathematical" functions and procedures.
Definition: solvers.F90:115
subroutine zsym_conjugate_gradients(np, x, b, op, dotp, iter, residue, threshold)
The two following subroutines, sym_conjugate_gradients, and bi_conjugate_gradients,...
Definition: solvers.F90:331
subroutine, public zqmr_gen_dotu(np, x, b, op, opt, dotu, nrm2, prec, prect, iter, residue, threshold, showprogress, converged)
for general complex matrices taken from 'An Implementation of the QMR Method based on Coupled Two-Ter...
Definition: solvers.F90:712
subroutine dbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold)
Definition: solvers.F90:1629
complex(real64) function, dimension(size(b, 1), size(b, 2)), public zidrs(b, s, preconditioner, matrixvector, ddotprod, zdotprod, tolerance, maximum_iterations, variant, flag, relres, iterations, x0, U0, omega, resvec, H)
This is the "Induced Dimension Reduction", IDR(s) (for s=4). IDR(s) is a robust and efficient short r...
Definition: solvers.F90:930
subroutine, public dqmr_sym_gen_dotu(np, x, b, op, dotu, nrm2, prec, iter, residue, threshold, showprogress, converged, use_initial_guess)
for complex symmetric matrices W Chen and B Poirier, J Comput Phys 219, 198-209 (2006)
Definition: solvers.F90:1717
real(real64) function, dimension(size(b, 1), size(b, 2)), public didrs(b, s, preconditioner, matrixvector, ddotprod, zdotprod, tolerance, maximum_iterations, variant, flag, relres, iterations, x0, U0, omega, resvec, H)
This is the "Induced Dimension Reduction", IDR(s) (for s=4). IDR(s) is a robust and efficient short r...
Definition: solvers.F90:2159
subroutine zbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold)
Definition: solvers.F90:400
subroutine dsym_conjugate_gradients(np, x, b, op, dotp, iter, residue, threshold)
The two following subroutines, sym_conjugate_gradients, and bi_conjugate_gradients,...
Definition: solvers.F90:1560
subroutine, public dqmr_gen_dotu(np, x, b, op, opt, dotu, nrm2, prec, prect, iter, residue, threshold, showprogress, converged)
for general complex matrices taken from 'An Implementation of the QMR Method based on Coupled Two-Ter...
Definition: solvers.F90:1941
subroutine, public zqmr_sym_gen_dotu(np, x, b, op, dotu, nrm2, prec, iter, residue, threshold, showprogress, converged, use_initial_guess)
for complex symmetric matrices W Chen and B Poirier, J Comput Phys 219, 198-209 (2006)
Definition: solvers.F90:488