mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Namespace
This commit is contained in:
parent
c978c88521
commit
d29fa23ebc
@ -25,11 +25,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
See the full license in the file "LICENSE" in the top level distribution
|
See the full license in the file "LICENSE" in the top level distribution
|
||||||
directory
|
directory
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
#ifndef FERMIONOPERATOR_MODULES_H
|
#ifndef FERMIONOPERATOR_MODULES_H
|
||||||
#define FERMIONOPERATOR_MODULES_H
|
#define FERMIONOPERATOR_MODULES_H
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// Fermion operators
|
// Fermion operators
|
||||||
@ -42,13 +42,13 @@ public:
|
|||||||
|
|
||||||
template <template <typename> class FOType, class FermionImpl, class FOPar>
|
template <template <typename> class FOType, class FermionImpl, class FOPar>
|
||||||
class FermionOperatorModule
|
class FermionOperatorModule
|
||||||
: public Parametrized<FOPar>,
|
: public Parametrized<FOPar>,
|
||||||
public FermionOperatorModuleBase<QCD::FermionOperator<FermionImpl> > {
|
public FermionOperatorModuleBase<QCD::FermionOperator<FermionImpl> > {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_ptr< FOType<FermionImpl> > FOPtr;
|
std::unique_ptr< FOType<FermionImpl> > FOPtr;
|
||||||
std::vector< QCD::GridModule* > GridRefs;
|
std::vector< QCD::GridModule* > GridRefs;
|
||||||
public:
|
public:
|
||||||
typedef HMCModuleBase< QCD::FermionOperator<FermionImpl> > Base;
|
typedef HMCModuleBase< QCD::FermionOperator<FermionImpl> > Base;
|
||||||
typedef typename Base::Product Product;
|
typedef typename Base::Product Product;
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ protected:
|
|||||||
return FOPtr.get();
|
return FOPtr.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void initialize() = 0;
|
virtual void initialize() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -94,8 +94,8 @@ protected:
|
|||||||
// Factory
|
// Factory
|
||||||
template <char const *str, class FermionImpl, class ReaderClass >
|
template <char const *str, class FermionImpl, class ReaderClass >
|
||||||
class HMC_FermionOperatorModuleFactory
|
class HMC_FermionOperatorModuleFactory
|
||||||
: public Factory < FermionOperatorModuleBase<QCD::FermionOperator<FermionImpl> > , Reader<ReaderClass> > {
|
: public Factory < FermionOperatorModuleBase<QCD::FermionOperator<FermionImpl> > , Reader<ReaderClass> > {
|
||||||
public:
|
public:
|
||||||
// use SINGLETON FUNCTOR MACRO HERE
|
// use SINGLETON FUNCTOR MACRO HERE
|
||||||
typedef Reader<ReaderClass> TheReader;
|
typedef Reader<ReaderClass> TheReader;
|
||||||
|
|
||||||
@ -106,10 +106,10 @@ class HMC_FermionOperatorModuleFactory
|
|||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HMC_FermionOperatorModuleFactory(void) = default;
|
HMC_FermionOperatorModuleFactory(void) = default;
|
||||||
std::string obj_type() const {
|
std::string obj_type() const {
|
||||||
return std::string(str);
|
return std::string(str);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,13 +117,13 @@ class HMC_FermionOperatorModuleFactory
|
|||||||
|
|
||||||
|
|
||||||
extern char fermionop_string[];
|
extern char fermionop_string[];
|
||||||
namespace QCD{
|
|
||||||
|
|
||||||
// Modules
|
// Modules
|
||||||
class WilsonFermionParameters : Serializable {
|
class WilsonFermionParameters : Serializable {
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(WilsonFermionParameters,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(WilsonFermionParameters,
|
||||||
RealD, mass);
|
RealD, mass);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -143,13 +143,13 @@ class WilsonFermionModule: public FermionOperatorModule<WilsonFermion, FermionIm
|
|||||||
|
|
||||||
|
|
||||||
class MobiusFermionParameters : Serializable {
|
class MobiusFermionParameters : Serializable {
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(MobiusFermionParameters,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(MobiusFermionParameters,
|
||||||
RealD, mass,
|
RealD, mass,
|
||||||
RealD, M5,
|
RealD, M5,
|
||||||
RealD, b,
|
RealD, b,
|
||||||
RealD, c,
|
RealD, c,
|
||||||
unsigned int, Ls);
|
unsigned int, Ls);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class FermionImpl >
|
template <class FermionImpl >
|
||||||
@ -174,11 +174,11 @@ class MobiusFermionModule: public FermionOperatorModule<MobiusFermion, FermionIm
|
|||||||
|
|
||||||
|
|
||||||
class DomainWallFermionParameters : Serializable {
|
class DomainWallFermionParameters : Serializable {
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(DomainWallFermionParameters,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(DomainWallFermionParameters,
|
||||||
RealD, mass,
|
RealD, mass,
|
||||||
RealD, M5,
|
RealD, M5,
|
||||||
unsigned int, Ls);
|
unsigned int, Ls);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class FermionImpl >
|
template <class FermionImpl >
|
||||||
@ -196,22 +196,22 @@ class DomainWallFermionModule: public FermionOperatorModule<DomainWallFermion, F
|
|||||||
auto GridMod5d = this->GridRefs[1];
|
auto GridMod5d = this->GridRefs[1];
|
||||||
typename FermionImpl::GaugeField U(GridMod->get_full());
|
typename FermionImpl::GaugeField U(GridMod->get_full());
|
||||||
this->FOPtr.reset(new DomainWallFermion<FermionImpl>( U, *(GridMod->get_full()), *(GridMod->get_rb()),
|
this->FOPtr.reset(new DomainWallFermion<FermionImpl>( U, *(GridMod->get_full()), *(GridMod->get_rb()),
|
||||||
*(GridMod5d->get_full()), *(GridMod5d->get_rb()),
|
*(GridMod5d->get_full()), *(GridMod5d->get_rb()),
|
||||||
this->Par_.mass, this->Par_.M5));
|
this->Par_.mass, this->Par_.M5));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class DomainWallEOFAFermionParameters : Serializable {
|
class DomainWallEOFAFermionParameters : Serializable {
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(DomainWallEOFAFermionParameters,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(DomainWallEOFAFermionParameters,
|
||||||
RealD, mq1,
|
RealD, mq1,
|
||||||
RealD, mq2,
|
RealD, mq2,
|
||||||
RealD, mq3,
|
RealD, mq3,
|
||||||
RealD, shift,
|
RealD, shift,
|
||||||
int, pm,
|
int, pm,
|
||||||
RealD, M5,
|
RealD, M5,
|
||||||
unsigned int, Ls);
|
unsigned int, Ls);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class FermionImpl >
|
template <class FermionImpl >
|
||||||
@ -229,15 +229,12 @@ class DomainWallEOFAFermionModule: public FermionOperatorModule<DomainWallEOFAFe
|
|||||||
auto GridMod5d = this->GridRefs[1];
|
auto GridMod5d = this->GridRefs[1];
|
||||||
typename FermionImpl::GaugeField U(GridMod->get_full());
|
typename FermionImpl::GaugeField U(GridMod->get_full());
|
||||||
this->FOPtr.reset(new DomainWallEOFAFermion<FermionImpl>( U, *(GridMod->get_full()), *(GridMod->get_rb()),
|
this->FOPtr.reset(new DomainWallEOFAFermion<FermionImpl>( U, *(GridMod->get_full()), *(GridMod->get_rb()),
|
||||||
*(GridMod5d->get_full()), *(GridMod5d->get_rb()),
|
*(GridMod5d->get_full()), *(GridMod5d->get_rb()),
|
||||||
this->Par_.mq1, this->Par_.mq2, this->Par_.mq3,
|
this->Par_.mq1, this->Par_.mq2, this->Par_.mq3,
|
||||||
this->Par_.shift, this->Par_.pm, this->Par_.M5));
|
this->Par_.shift, this->Par_.pm, this->Par_.M5));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
} // QCD
|
|
||||||
} // Grid
|
|
||||||
|
|
||||||
|
|
||||||
#endif //FERMIONOPERATOR_MODULES_H
|
#endif //FERMIONOPERATOR_MODULES_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user