mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Switched to Gauge field (GIMPL)
This commit is contained in:
parent
5580b3a7d1
commit
c7ceff6a21
@ -34,4 +34,4 @@ using namespace Grid;
|
|||||||
using namespace Hadrons;
|
using namespace Hadrons;
|
||||||
using namespace MDistil;
|
using namespace MDistil;
|
||||||
|
|
||||||
template class Grid::Hadrons::MDistil::TLapEvec<FIMPL>;
|
template class Grid::Hadrons::MDistil::TLapEvec<GIMPL>;
|
||||||
|
@ -121,11 +121,11 @@ public:
|
|||||||
|
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
class TLapEvec: public Module<LapEvecPar>
|
class TLapEvec: public Module<LapEvecPar>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GAUGE_TYPE_ALIASES(FImpl,);
|
GAUGE_TYPE_ALIASES(GImpl,);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// constructor
|
// constructor
|
||||||
@ -149,7 +149,7 @@ protected:
|
|||||||
void Cleanup(void);
|
void Cleanup(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_REGISTER_TMP(LapEvec, TLapEvec<FIMPL>, MDistil);
|
MODULE_REGISTER_TMP(LapEvec, TLapEvec<GIMPL>, MDistil);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
TLapEvec implementation
|
TLapEvec implementation
|
||||||
@ -158,31 +158,31 @@ MODULE_REGISTER_TMP(LapEvec, TLapEvec<FIMPL>, MDistil);
|
|||||||
//constexpr char szEigenPackSuffix[] = "_eigenPack";
|
//constexpr char szEigenPackSuffix[] = "_eigenPack";
|
||||||
|
|
||||||
// constructor /////////////////////////////////////////////////////////////////
|
// constructor /////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
TLapEvec<FImpl>::TLapEvec(const std::string name) : gridLD{nullptr}, Module<LapEvecPar>(name)
|
TLapEvec<GImpl>::TLapEvec(const std::string name) : gridLD{nullptr}, Module<LapEvecPar>(name)
|
||||||
{
|
{
|
||||||
LOG(Message) << "TLapEvec constructor : TLapEvec<FImpl>::TLapEvec(const std::string name)" << std::endl;
|
LOG(Message) << "TLapEvec constructor : TLapEvec<GImpl>::TLapEvec(const std::string name)" << std::endl;
|
||||||
LOG(Message) << "this=" << this << ", gridLD=" << gridLD << std::endl;
|
LOG(Message) << "this=" << this << ", gridLD=" << gridLD << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor /////////////////////////////////////////////////////////////////
|
// destructor /////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
TLapEvec<FImpl>::~TLapEvec()
|
TLapEvec<GImpl>::~TLapEvec()
|
||||||
{
|
{
|
||||||
Cleanup();
|
Cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
// dependencies/products ///////////////////////////////////////////////////////
|
// dependencies/products ///////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
std::vector<std::string> TLapEvec<FImpl>::getInput(void)
|
std::vector<std::string> TLapEvec<GImpl>::getInput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> in = {par().gauge};
|
std::vector<std::string> in = {par().gauge};
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
std::vector<std::string> TLapEvec<FImpl>::getOutput(void)
|
std::vector<std::string> TLapEvec<GImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()}; // This is the higher dimensional eigenpack
|
std::vector<std::string> out = {getName()}; // This is the higher dimensional eigenpack
|
||||||
|
|
||||||
@ -190,8 +190,8 @@ std::vector<std::string> TLapEvec<FImpl>::getOutput(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
void TLapEvec<FImpl>::setup(void)
|
void TLapEvec<GImpl>::setup(void)
|
||||||
{
|
{
|
||||||
Cleanup();
|
Cleanup();
|
||||||
Environment & e{env()};
|
Environment & e{env()};
|
||||||
@ -213,8 +213,8 @@ void TLapEvec<FImpl>::setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clean up any temporaries created by setup (that aren't stored in the environment)
|
// clean up any temporaries created by setup (that aren't stored in the environment)
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
void TLapEvec<FImpl>::Cleanup(void)
|
void TLapEvec<GImpl>::Cleanup(void)
|
||||||
{
|
{
|
||||||
if( gridLD != nullptr ) {
|
if( gridLD != nullptr ) {
|
||||||
delete gridLD;
|
delete gridLD;
|
||||||
@ -228,8 +228,8 @@ void TLapEvec<FImpl>::Cleanup(void)
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename GImpl>
|
||||||
void TLapEvec<FImpl>::execute(void)
|
void TLapEvec<GImpl>::execute(void)
|
||||||
{
|
{
|
||||||
LOG(Message) << "execute() : start for " << getName() << std::endl;
|
LOG(Message) << "execute() : start for " << getName() << std::endl;
|
||||||
|
|
||||||
@ -258,17 +258,15 @@ void TLapEvec<FImpl>::execute(void)
|
|||||||
auto &Umu = envGet(GaugeField, par().gauge);
|
auto &Umu = envGet(GaugeField, par().gauge);
|
||||||
envGetTmp(GaugeField, Umu_smear);
|
envGetTmp(GaugeField, Umu_smear);
|
||||||
if((0)) {
|
if((0)) {
|
||||||
//const std::vector<int> seeds({1, 2, 3, 4, 5});
|
const std::vector<int> seeds({1, 2, 3, 4, 5});
|
||||||
//GridParallelRNG pRNG4d(gridHD);
|
GridParallelRNG pRNG4d(gridHD);
|
||||||
//pRNG4d.SeedFixedIntegers(seeds);
|
pRNG4d.SeedFixedIntegers(seeds);
|
||||||
//std::cout << GridLogMessage << "now hot config" << std::endl;
|
std::cout << GridLogMessage << "now hot config" << std::endl;
|
||||||
//SU<Nc>::HotConfiguration(pRNG4d, Umu);
|
SU<Nc>::HotConfiguration(pRNG4d, Umu);
|
||||||
//std::cout << GridLogMessage << "hot cfg done." << std::endl;
|
std::cout << GridLogMessage << "hot cfg done." << std::endl;
|
||||||
|
|
||||||
// Set up the SAME gauge field on every time plane
|
// Set up the SAME gauge field on every time plane
|
||||||
// int Nt = grid4d->gDimensions()[Tdir];
|
|
||||||
Grid_unquiesce_nodes();
|
Grid_unquiesce_nodes();
|
||||||
|
|
||||||
Umu_smear = Umu;
|
Umu_smear = Umu;
|
||||||
Lattice<iScalar<vInteger> > coor(gridHD);
|
Lattice<iScalar<vInteger> > coor(gridHD);
|
||||||
LatticeCoordinate(coor,Tdir);
|
LatticeCoordinate(coor,Tdir);
|
||||||
@ -376,7 +374,7 @@ void TLapEvec<FImpl>::execute(void)
|
|||||||
//std::cout << GridLogMessage << "Writing eigenvalues/vectors to " << pszEigenPack << std::endl;
|
//std::cout << GridLogMessage << "Writing eigenvalues/vectors to " << pszEigenPack << std::endl;
|
||||||
eig[t].record.operatorXml = DefaultOperatorXml;
|
eig[t].record.operatorXml = DefaultOperatorXml;
|
||||||
eig[t].record.solverXml = DefaultsolverXml;
|
eig[t].record.solverXml = DefaultsolverXml;
|
||||||
eig[t].write(sEigenPackName,false,t);
|
eig[t].write("DistilEigen",false,t);
|
||||||
//std::cout << GridLogMessage << "Written eigenvectors" << std::endl;
|
//std::cout << GridLogMessage << "Written eigenvectors" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user