1
0
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:
2016-12-14 17:59:45 +00:00
parent 013e710c7d
commit 3af663e17b
17 changed files with 87 additions and 74 deletions

View File

@ -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_

View File

@ -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_