Grid 0.7.0
MobiusZolotarevFermion.h
Go to the documentation of this file.
1/*************************************************************************************
2
3 Grid physics library, www.github.com/paboyle/Grid
4
5 Source file: ./lib/qcd/action/fermion/MobiusZolotarevFermion.h
6
7 Copyright (C) 2015
8
9Author: Peter Boyle <pabobyle@ph.ed.ac.uk>
10Author: Peter Boyle <paboyle@ph.ed.ac.uk>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License along
23 with this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25
26 See the full license in the file "LICENSE" in the top level distribution directory
27*************************************************************************************/
28/* END LEGAL */
29#ifndef GRID_QCD_MOBIUS_ZOLOTAREV_FERMION_H
30#define GRID_QCD_MOBIUS_ZOLOTAREV_FERMION_H
31
33
35
36template<class Impl>
38{
39public:
41public:
42
43 virtual void Instantiatable(void) {};
44 // Constructors
45 MobiusZolotarevFermion(GaugeField &_Umu,
46 GridCartesian &FiveDimGrid,
47 GridRedBlackCartesian &FiveDimRedBlackGrid,
48 GridCartesian &FourDimGrid,
49 GridRedBlackCartesian &FourDimRedBlackGrid,
50 RealD _mass,RealD _M5,
51 RealD b, RealD c,
52 RealD lo, RealD hi,const ImplParams &p= ImplParams()) :
53
54 CayleyFermion5D<Impl>(_Umu,
55 FiveDimGrid,
56 FiveDimRedBlackGrid,
57 FourDimGrid,
58 FourDimRedBlackGrid,_mass,_M5,p)
59
60 {
61 RealD eps = lo/hi;
62
63 Approx::zolotarev_data *zdata = Approx::zolotarev(eps,this->Ls,0);
64 assert(zdata->n==this->Ls);
65
66 std::cout<<GridLogMessage << "MobiusZolotarevFermion (b="<<b<<",c="<<c<<") with Ls= "<<this->Ls<<" Zolotarev range ["<<lo<<","<<hi<<"]"<<std::endl;
67
68 // Call base setter
69 this->SetCoefficientsZolotarev(hi,zdata,b,c);
70
71 Approx::zolotarev_free(zdata);
72 }
73
74};
75
77
78#endif
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
#define NAMESPACE_BEGIN(A)
Definition Namespace.h:35
#define NAMESPACE_END(A)
Definition Namespace.h:36
double RealD
Definition Simd.h:61
CayleyFermion5D(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mass, RealD _M5, const ImplParams &p=ImplParams())
virtual void SetCoefficientsZolotarev(RealD zolohi, Approx::zolotarev_data *zdata, RealD b, RealD c)
MobiusZolotarevFermion(GaugeField &_Umu, GridCartesian &FiveDimGrid, GridRedBlackCartesian &FiveDimRedBlackGrid, GridCartesian &FourDimGrid, GridRedBlackCartesian &FourDimRedBlackGrid, RealD _mass, RealD _M5, RealD b, RealD c, RealD lo, RealD hi, const ImplParams &p=ImplParams())
virtual void Instantiatable(void)