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
30 use math_oct_m
33
34 implicit none
35
36 private
37 public :: &
44 didrs, &
45 zidrs
46
47 abstract interface
48 subroutine doperator_i(x, y, userdata)
49 use, intrinsic :: iso_fortran_env
50 use, intrinsic :: iso_c_binding, only: c_ptr
51 implicit none
52 real(real64), contiguous, intent(in) :: x(:)
53 real(real64), contiguous, intent(out) :: y(:)
54 type(c_ptr), intent(in) :: userdata(:)
55 end subroutine doperator_i
56 subroutine zoperator_i(x, y, userdata)
57 use, intrinsic :: iso_fortran_env
58 use, intrinsic :: iso_c_binding, only: c_ptr
59 implicit none
60 complex(real64), contiguous, intent(in) :: x(:)
61 complex(real64), contiguous, intent(out) :: y(:)
62 type(c_ptr), intent(in) :: userdata(:)
63 end subroutine zoperator_i
64 function ddotp_i(x, y)
65 import real64
66 implicit none
67 real(real64) :: ddotp_i
68 real(real64), intent(in) :: x(:)
69 real(real64), intent(in) :: y(:)
70 end function ddotp_i
71 function dnrm_i(x)
72 import real64
73 implicit none
74 real(real64), intent(in) :: x(:)
75 real(real64) :: dnrm_i
76 end function dnrm_i
77 function zdotp_i(x, y)
78 import real64
79 implicit none
80 complex(real64), intent(in) :: x(:)
81 complex(real64), intent(in) :: y(:)
82 complex(real64) :: zdotp_i
83 end function zdotp_i
84 function znrm_i(x)
85 import real64
86 implicit none
87 complex(real64), intent(in) :: x(:)
88 real(real64) :: znrm_i
89 end function znrm_i
90 end interface
91
92
100
106
107 interface dconjugate_gradients
109 end interface dconjugate_gradients
110
111 interface zconjugate_gradients
113 end interface zconjugate_gradients
114
115contains
116
117#include "undef.F90"
118#include "complex.F90"
119#include "solvers_inc.F90"
120
121#include "undef.F90"
122#include "real.F90"
123#include "solvers_inc.F90"
124
125end module solvers_oct_m
126
127!! Local Variables:
128!! mode: f90
129!! coding: utf-8
130!! End:
This module contains interfaces for BLAS routines You should not use these routines directly....
Definition: blas.F90:120
System information (time, memory, sysname)
Definition: loct.F90:117
This module is intended to contain "only mathematical" functions and procedures.
Definition: math.F90:117
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:339
subroutine dbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold, userdata)
Definition: solvers.F90:1691
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:964
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:2219
subroutine, public dqmr_sym_gen_dotu(np, x, b, op, dotu, nrm2, prec, iter, userdata, 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:1775
subroutine, public zqmr_sym_gen_dotu(np, x, b, op, dotu, nrm2, prec, iter, userdata, 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:520
subroutine, public zqmr_gen_dotu(np, x, b, op, opt, dotu, nrm2, prec, prect, iter, userdata, 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
subroutine, public dqmr_gen_dotu(np, x, b, op, opt, dotu, nrm2, prec, prect, iter, userdata, residue, threshold, showprogress, converged)
for general complex matrices taken from 'An Implementation of the QMR Method based on Coupled Two-Ter...
Definition: solvers.F90:2000
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:1594
subroutine zbi_conjugate_gradients(np, x, b, op, opt, dotp, iter, residue, threshold, userdata)
Definition: solvers.F90:436