Grid
0.7.0
Preconditioner.h
Go to the documentation of this file.
1
/*************************************************************************************
2
3
Grid physics library, www.github.com/paboyle/Grid
4
5
Source file: ./lib/algorithms/Preconditioner.h
6
7
Copyright (C) 2015
8
9
Author: Azusa Yamaguchi <ayamaguc@staffmail.ed.ac.uk>
10
11
This program is free software; you can redistribute it and/or modify
12
it under the terms of the GNU General Public License as published by
13
the Free Software Foundation; either version 2 of the License, or
14
(at your option) any later version.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
20
21
You should have received a copy of the GNU General Public License along
22
with this program; if not, write to the Free Software Foundation, Inc.,
23
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
25
See the full license in the file "LICENSE" in the top level distribution directory
26
*************************************************************************************/
27
/* END LEGAL */
28
#ifndef GRID_PRECONDITIONER_H
29
#define GRID_PRECONDITIONER_H
30
31
NAMESPACE_BEGIN
(
Grid
);
32
33
template
<
class
Field>
using
Preconditioner
=
LinearFunction<Field>
;
34
35
/*
36
template<class Field> class Preconditioner : public LinearFunction<Field> {
37
using LinearFunction<Field>::operator();
38
virtual void operator()(const Field &src, Field & psi)=0;
39
};
40
*/
41
42
template
<
class
Field>
class
TrivialPrecon
:
public
Preconditioner
<Field> {
43
public
:
44
using
Preconditioner
<Field>::operator();
45
virtual
void
operator()
(
const
Field &src, Field & psi){
46
psi = src;
47
}
48
TrivialPrecon
(
void
){};
49
};
50
51
NAMESPACE_END
(
Grid
);
52
#endif
NAMESPACE_BEGIN
#define NAMESPACE_BEGIN(A)
Definition
Namespace.h:35
NAMESPACE_END
#define NAMESPACE_END(A)
Definition
Namespace.h:36
Preconditioner
LinearFunction< Field > Preconditioner
Definition
Preconditioner.h:33
LinearFunction
Definition
LinearOperator.h:634
TrivialPrecon::operator()
virtual void operator()(const Field &src, Field &psi)
Definition
Preconditioner.h:45
TrivialPrecon::TrivialPrecon
TrivialPrecon(void)
Definition
Preconditioner.h:48
Grid
Definition
Deflation.h:31
Grid
algorithms
Preconditioner.h
Generated by
1.16.1