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 iso_c_binding
27 use, intrinsic :: iso_fortran_env
29 use loct_oct_m
32
33 implicit none
34
35 private
36 public :: &
43 didrs, &
44 zidrs
45
46 abstract interface
47 subroutine doperator_i(x, y)
48 import real64
49 implicit none
50 real(real64), contiguous, intent(in) :: x(:)
51 real(real64), contiguous, intent(out) :: y(:)
52 end subroutine doperator_i
53 subroutine zoperator_i(x, y)
54 import real64
55 implicit none
56 complex(real64), contiguous, intent(in) :: x(:)
57 complex(real64), contiguous, intent(out) :: y(:)
58 end subroutine zoperator_i
59 function ddotp_i(x, y)
60 import real64
61 implicit none
62 real(real64) :: ddotp_i
63 real(real64), intent(in) :: x(:)
64 real(real64), intent(in) :: y(:)
65 end function ddotp_i
66 function dnrm_i(x)
67 import real64
68 implicit none
69 real(real64), intent(in) :: x(:)
70 real(real64) :: dnrm_i
71 end function dnrm_i
72 function zdotp_i(x, y)
73 import real64
74 implicit none
75 complex(real64), intent(in) :: x(:)
76 complex(real64), intent(in) :: y(:)
77 complex(real64) :: zdotp_i
78 end function zdotp_i
79 function znrm_i(x)
80 import real64
81 implicit none
82 complex(real64), intent(in) :: x(:)
83 real(real64) :: znrm_i
84 end function znrm_i
85 end interface
86
87
95
101
102 interface dconjugate_gradients
104 end interface dconjugate_gradients
105
106 interface zconjugate_gradients
108 end interface zconjugate_gradients
109
110contains
111
112#include "undef.F90"
113#include "complex.F90"
114#include "solvers_inc.F90"
115
116#include "undef.F90"
117#include "real.F90"
118#include "solvers_inc.F90"
119
120end module solvers_oct_m
121
122!! Local Variables:
123!! mode: f90
124!! coding: utf-8
125!! End:
This module contains interfaces for BLAS routines You should not use these routines directly....
Definition: blas.F90:120
This module is intended to contain "only mathematical" functions and procedures.
Definition: solvers.F90:117
subroutine zsym_conjugate_gradients(np, x, b, op, dotp, iter, residue, threshold, userdata)
The two following subroutines, sym_conjugate_gradients, and bi_conjugate_gradients,...
Definition: solvers.F90:334
subroutine dbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold, userdata)
Definition: solvers.F90:1689
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:745
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:963
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:1780
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:2222
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:2004
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:521
subroutine dsym_conjugate_gradients(np, x, b, op, dotp, iter, residue, threshold, userdata)
The two following subroutines, sym_conjugate_gradients, and bi_conjugate_gradients,...
Definition: solvers.F90:1593
subroutine zbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold, userdata)
Definition: solvers.F90:430