From c7ceff6a214ee845a099583c08e744c163d01406 Mon Sep 17 00:00:00 2001 From: Michael Marshall Date: Mon, 28 Jan 2019 12:28:35 +0000 Subject: [PATCH] Switched to Gauge field (GIMPL) --- Hadrons/Modules/MDistil/LapEvec.cc | 2 +- Hadrons/Modules/MDistil/LapEvec.hpp | 52 ++++++++++++++--------------- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Hadrons/Modules/MDistil/LapEvec.cc b/Hadrons/Modules/MDistil/LapEvec.cc index 488eb48c..019af23c 100644 --- a/Hadrons/Modules/MDistil/LapEvec.cc +++ b/Hadrons/Modules/MDistil/LapEvec.cc @@ -34,4 +34,4 @@ using namespace Grid; using namespace Hadrons; using namespace MDistil; -template class Grid::Hadrons::MDistil::TLapEvec; +template class Grid::Hadrons::MDistil::TLapEvec; diff --git a/Hadrons/Modules/MDistil/LapEvec.hpp b/Hadrons/Modules/MDistil/LapEvec.hpp index 1a0b2b00..5254b02a 100644 --- a/Hadrons/Modules/MDistil/LapEvec.hpp +++ b/Hadrons/Modules/MDistil/LapEvec.hpp @@ -121,11 +121,11 @@ public: ******************************************************************************/ -template +template class TLapEvec: public Module { public: - GAUGE_TYPE_ALIASES(FImpl,); + GAUGE_TYPE_ALIASES(GImpl,); public: // constructor @@ -149,7 +149,7 @@ protected: void Cleanup(void); }; -MODULE_REGISTER_TMP(LapEvec, TLapEvec, MDistil); +MODULE_REGISTER_TMP(LapEvec, TLapEvec, MDistil); /****************************************************************************** TLapEvec implementation @@ -158,31 +158,31 @@ MODULE_REGISTER_TMP(LapEvec, TLapEvec, MDistil); //constexpr char szEigenPackSuffix[] = "_eigenPack"; // constructor ///////////////////////////////////////////////////////////////// -template -TLapEvec::TLapEvec(const std::string name) : gridLD{nullptr}, Module(name) +template +TLapEvec::TLapEvec(const std::string name) : gridLD{nullptr}, Module(name) { - LOG(Message) << "TLapEvec constructor : TLapEvec::TLapEvec(const std::string name)" << std::endl; + LOG(Message) << "TLapEvec constructor : TLapEvec::TLapEvec(const std::string name)" << std::endl; LOG(Message) << "this=" << this << ", gridLD=" << gridLD << std::endl; } // destructor ///////////////////////////////////////////////////////////////// -template -TLapEvec::~TLapEvec() +template +TLapEvec::~TLapEvec() { Cleanup(); } // dependencies/products /////////////////////////////////////////////////////// -template -std::vector TLapEvec::getInput(void) +template +std::vector TLapEvec::getInput(void) { std::vector in = {par().gauge}; return in; } -template -std::vector TLapEvec::getOutput(void) +template +std::vector TLapEvec::getOutput(void) { std::vector out = {getName()}; // This is the higher dimensional eigenpack @@ -190,8 +190,8 @@ std::vector TLapEvec::getOutput(void) } // setup /////////////////////////////////////////////////////////////////////// -template -void TLapEvec::setup(void) +template +void TLapEvec::setup(void) { Cleanup(); Environment & e{env()}; @@ -213,8 +213,8 @@ void TLapEvec::setup(void) } // clean up any temporaries created by setup (that aren't stored in the environment) -template -void TLapEvec::Cleanup(void) +template +void TLapEvec::Cleanup(void) { if( gridLD != nullptr ) { delete gridLD; @@ -228,8 +228,8 @@ void TLapEvec::Cleanup(void) ******************************************************************************/ // execution /////////////////////////////////////////////////////////////////// -template -void TLapEvec::execute(void) +template +void TLapEvec::execute(void) { LOG(Message) << "execute() : start for " << getName() << std::endl; @@ -258,17 +258,15 @@ void TLapEvec::execute(void) auto &Umu = envGet(GaugeField, par().gauge); envGetTmp(GaugeField, Umu_smear); if((0)) { - //const std::vector seeds({1, 2, 3, 4, 5}); - //GridParallelRNG pRNG4d(gridHD); - //pRNG4d.SeedFixedIntegers(seeds); - //std::cout << GridLogMessage << "now hot config" << std::endl; - //SU::HotConfiguration(pRNG4d, Umu); - //std::cout << GridLogMessage << "hot cfg done." << std::endl; + const std::vector seeds({1, 2, 3, 4, 5}); + GridParallelRNG pRNG4d(gridHD); + pRNG4d.SeedFixedIntegers(seeds); + std::cout << GridLogMessage << "now hot config" << std::endl; + SU::HotConfiguration(pRNG4d, Umu); + std::cout << GridLogMessage << "hot cfg done." << std::endl; // Set up the SAME gauge field on every time plane - // int Nt = grid4d->gDimensions()[Tdir]; Grid_unquiesce_nodes(); - Umu_smear = Umu; Lattice > coor(gridHD); LatticeCoordinate(coor,Tdir); @@ -376,7 +374,7 @@ void TLapEvec::execute(void) //std::cout << GridLogMessage << "Writing eigenvalues/vectors to " << pszEigenPack << std::endl; eig[t].record.operatorXml = DefaultOperatorXml; eig[t].record.solverXml = DefaultsolverXml; - eig[t].write(sEigenPackName,false,t); + eig[t].write("DistilEigen",false,t); //std::cout << GridLogMessage << "Written eigenvectors" << std::endl; } }