mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-14 13:57:07 +01:00
Hadrons: modules remember their factory registration name
This commit is contained in:
@ -68,6 +68,8 @@ public:
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_NS(DWF, TDWF<FIMPL>, MAction);
|
||||
|
||||
/******************************************************************************
|
||||
* DWF template implementation *
|
||||
******************************************************************************/
|
||||
@ -109,9 +111,9 @@ template <typename FImpl>
|
||||
void TDWF<FImpl>::execute(void)
|
||||
{
|
||||
LOG(Message) << "Setting up domain wall fermion matrix with m= "
|
||||
<< par().mass << ", M5= " << par().M5 << " and Ls= "
|
||||
<< par().Ls << " using gauge field '" << par().gauge << "'"
|
||||
<< std::endl;
|
||||
<< par().mass << ", M5= " << par().M5 << " and Ls= "
|
||||
<< par().Ls << " using gauge field '" << par().gauge << "'"
|
||||
<< std::endl;
|
||||
env().createGrid(par().Ls);
|
||||
auto &U = *env().template getObject<LatticeGaugeField>(par().gauge);
|
||||
auto &g4 = *env().getGrid();
|
||||
@ -123,12 +125,8 @@ void TDWF<FImpl>::execute(void)
|
||||
env().setObject(getName(), fMatPt);
|
||||
}
|
||||
|
||||
typedef TDWF<FIMPL> DWF;
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
MODULE_REGISTER_NS(DWF, MAction);
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_DWF_hpp_
|
||||
|
@ -66,6 +66,8 @@ public:
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_NS(Wilson, TWilson<FIMPL>, MAction);
|
||||
|
||||
/******************************************************************************
|
||||
* TWilson template implementation *
|
||||
******************************************************************************/
|
||||
@ -98,7 +100,7 @@ void TWilson<FImpl>::setup(void)
|
||||
{
|
||||
unsigned int size;
|
||||
|
||||
size = 3*env().template lattice4dSize<typename FImpl::DoubledGaugeField>();
|
||||
size = 2*env().template lattice4dSize<typename FImpl::DoubledGaugeField>();
|
||||
env().registerObject(getName(), size);
|
||||
}
|
||||
|
||||
@ -115,12 +117,8 @@ void TWilson<FImpl>::execute()
|
||||
env().setObject(getName(), fMatPt);
|
||||
}
|
||||
|
||||
typedef TWilson<FIMPL> Wilson;
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
MODULE_REGISTER_NS(Wilson, MAction);
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_Wilson_hpp_
|
||||
|
Reference in New Issue
Block a user