From 6b46834af8c9e52d92c147dfd42b5b0ec2868449 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Mon, 4 Feb 2019 21:23:30 +0000 Subject: [PATCH] Hadrons: archiving unmaintained or exotic modules --- .../MScalar => Archive/Modules}/ScalarVP.cc | 0 .../MScalar => Archive/Modules}/ScalarVP.hpp | 0 .../Modules}/TestSeqConserved.cc | 0 .../Modules}/TestSeqConserved.hpp | 0 .../Modules}/TestSeqGamma.cc | 0 .../Modules}/TestSeqGamma.hpp | 0 .../Modules}/VPCounterTerms.cc | 0 .../Modules}/VPCounterTerms.hpp | 0 .../Modules}/WardIdentity.cc | 0 .../Modules}/WardIdentity.hpp | 0 .../Modules}/WeakHamiltonian.hpp | 0 .../Modules}/WeakHamiltonianEye.cc | 0 .../Modules}/WeakHamiltonianEye.hpp | 0 .../Modules}/WeakHamiltonianNonEye.cc | 0 .../Modules}/WeakHamiltonianNonEye.hpp | 0 .../Modules}/WeakNeutral4ptDisc.cc | 0 .../Modules}/WeakNeutral4ptDisc.hpp | 0 Hadrons/Modules.hpp | 14 +- Hadrons/Modules/MScalarSUN/ShiftProbe.cc | 39 ---- Hadrons/Modules/MScalarSUN/ShiftProbe.hpp | 177 ------------------ Hadrons/modules.inc | 28 +-- 21 files changed, 7 insertions(+), 251 deletions(-) rename Hadrons/{Modules/MScalar => Archive/Modules}/ScalarVP.cc (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/ScalarVP.hpp (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqConserved.cc (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqConserved.hpp (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqGamma.cc (100%) rename Hadrons/{Modules/MUtilities => Archive/Modules}/TestSeqGamma.hpp (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/VPCounterTerms.cc (100%) rename Hadrons/{Modules/MScalar => Archive/Modules}/VPCounterTerms.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WardIdentity.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WardIdentity.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonian.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianEye.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianEye.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianNonEye.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakHamiltonianNonEye.hpp (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakNeutral4ptDisc.cc (100%) rename Hadrons/{Modules/MContraction => Archive/Modules}/WeakNeutral4ptDisc.hpp (100%) delete mode 100644 Hadrons/Modules/MScalarSUN/ShiftProbe.cc delete mode 100644 Hadrons/Modules/MScalarSUN/ShiftProbe.hpp diff --git a/Hadrons/Modules/MScalar/ScalarVP.cc b/Hadrons/Archive/Modules/ScalarVP.cc similarity index 100% rename from Hadrons/Modules/MScalar/ScalarVP.cc rename to Hadrons/Archive/Modules/ScalarVP.cc diff --git a/Hadrons/Modules/MScalar/ScalarVP.hpp b/Hadrons/Archive/Modules/ScalarVP.hpp similarity index 100% rename from Hadrons/Modules/MScalar/ScalarVP.hpp rename to Hadrons/Archive/Modules/ScalarVP.hpp diff --git a/Hadrons/Modules/MUtilities/TestSeqConserved.cc b/Hadrons/Archive/Modules/TestSeqConserved.cc similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqConserved.cc rename to Hadrons/Archive/Modules/TestSeqConserved.cc diff --git a/Hadrons/Modules/MUtilities/TestSeqConserved.hpp b/Hadrons/Archive/Modules/TestSeqConserved.hpp similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqConserved.hpp rename to Hadrons/Archive/Modules/TestSeqConserved.hpp diff --git a/Hadrons/Modules/MUtilities/TestSeqGamma.cc b/Hadrons/Archive/Modules/TestSeqGamma.cc similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqGamma.cc rename to Hadrons/Archive/Modules/TestSeqGamma.cc diff --git a/Hadrons/Modules/MUtilities/TestSeqGamma.hpp b/Hadrons/Archive/Modules/TestSeqGamma.hpp similarity index 100% rename from Hadrons/Modules/MUtilities/TestSeqGamma.hpp rename to Hadrons/Archive/Modules/TestSeqGamma.hpp diff --git a/Hadrons/Modules/MScalar/VPCounterTerms.cc b/Hadrons/Archive/Modules/VPCounterTerms.cc similarity index 100% rename from Hadrons/Modules/MScalar/VPCounterTerms.cc rename to Hadrons/Archive/Modules/VPCounterTerms.cc diff --git a/Hadrons/Modules/MScalar/VPCounterTerms.hpp b/Hadrons/Archive/Modules/VPCounterTerms.hpp similarity index 100% rename from Hadrons/Modules/MScalar/VPCounterTerms.hpp rename to Hadrons/Archive/Modules/VPCounterTerms.hpp diff --git a/Hadrons/Modules/MContraction/WardIdentity.cc b/Hadrons/Archive/Modules/WardIdentity.cc similarity index 100% rename from Hadrons/Modules/MContraction/WardIdentity.cc rename to Hadrons/Archive/Modules/WardIdentity.cc diff --git a/Hadrons/Modules/MContraction/WardIdentity.hpp b/Hadrons/Archive/Modules/WardIdentity.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WardIdentity.hpp rename to Hadrons/Archive/Modules/WardIdentity.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonian.hpp b/Hadrons/Archive/Modules/WeakHamiltonian.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonian.hpp rename to Hadrons/Archive/Modules/WeakHamiltonian.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianEye.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianEye.cc rename to Hadrons/Archive/Modules/WeakHamiltonianEye.cc diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianEye.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp rename to Hadrons/Archive/Modules/WeakHamiltonianEye.hpp diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc rename to Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc diff --git a/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp b/Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp rename to Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp diff --git a/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc similarity index 100% rename from Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc rename to Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc diff --git a/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp b/Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp similarity index 100% rename from Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp rename to Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp diff --git a/Hadrons/Modules.hpp b/Hadrons/Modules.hpp index 787fecea..0dc5fda9 100644 --- a/Hadrons/Modules.hpp +++ b/Hadrons/Modules.hpp @@ -2,13 +2,8 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include @@ -21,28 +16,24 @@ #include #include #include +#include #include #include #include -#include #include #include #include -#include #include #include #include #include +#include #include #include #include #include -#include -#include #include #include -#include -#include #include #include #include @@ -56,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/Hadrons/Modules/MScalarSUN/ShiftProbe.cc b/Hadrons/Modules/MScalarSUN/ShiftProbe.cc deleted file mode 100644 index 83454941..00000000 --- a/Hadrons/Modules/MScalarSUN/ShiftProbe.cc +++ /dev/null @@ -1,39 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MScalarSUN/ShiftProbe.cc - -Copyright (C) 2015-2018 - -Author: Antonin Portelli - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ -#include - -using namespace Grid; -using namespace Hadrons; -using namespace MScalarSUN; - -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; -template class Grid::Hadrons::MScalarSUN::TShiftProbe>; - diff --git a/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp b/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp deleted file mode 100644 index dcd56252..00000000 --- a/Hadrons/Modules/MScalarSUN/ShiftProbe.hpp +++ /dev/null @@ -1,177 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: Hadrons/Modules/MScalarSUN/ShiftProbe.hpp - -Copyright (C) 2015-2018 - -Author: Antonin Portelli - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -See the full license in the file "LICENSE" in the top level distribution directory -*************************************************************************************/ -/* END LEGAL */ -#ifndef Hadrons_MScalarSUN_ShiftProbe_hpp_ -#define Hadrons_MScalarSUN_ShiftProbe_hpp_ - -#include -#include -#include -#include - -BEGIN_HADRONS_NAMESPACE - -/****************************************************************************** - * Ward identity phi^n probe with fields at different positions * - ******************************************************************************/ -BEGIN_MODULE_NAMESPACE(MScalarSUN) - -typedef std::pair ShiftPair; - -class ShiftProbePar: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(ShiftProbePar, - std::string, field, - std::string, shifts, - std::string, output); -}; - -class ShiftProbeResult: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(ShiftProbeResult, - std::string, shifts, - Complex, value); -}; - -template -class TShiftProbe: public Module -{ -public: - typedef typename SImpl::Field Field; - typedef typename SImpl::ComplexField ComplexField; -public: - // constructor - TShiftProbe(const std::string name); - // destructor - virtual ~TShiftProbe(void) {}; - // dependency relation - virtual std::vector getInput(void); - virtual std::vector getOutput(void); - // setup - virtual void setup(void); - // execution - virtual void execute(void); -}; - -MODULE_REGISTER_TMP(ShiftProbeSU2, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU3, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU4, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU5, TShiftProbe>, MScalarSUN); -MODULE_REGISTER_TMP(ShiftProbeSU6, TShiftProbe>, MScalarSUN); - -/****************************************************************************** - * TShiftProbe implementation * - ******************************************************************************/ -// constructor ///////////////////////////////////////////////////////////////// -template -TShiftProbe::TShiftProbe(const std::string name) -: Module(name) -{} - -// dependencies/products /////////////////////////////////////////////////////// -template -std::vector TShiftProbe::getInput(void) -{ - std::vector in = {par().field}; - - return in; -} - -template -std::vector TShiftProbe::getOutput(void) -{ - std::vector out = {getName()}; - - return out; -} - -// setup /////////////////////////////////////////////////////////////////////// -template -void TShiftProbe::setup(void) -{ - envTmpLat(Field, "acc"); - envCreateLat(ComplexField, getName()); -} - -// execution /////////////////////////////////////////////////////////////////// -template -void TShiftProbe::execute(void) -{ - LOG(Message) << "Creating shift probe for shifts " << par().shifts - << std::endl; - - std::vector shift; - double sign; - auto &phi = envGet(Field, par().field); - auto &probe = envGet(ComplexField, getName()); - - shift = strToVec(par().shifts); - if (shift.size() % 2 != 0) - { - HADRONS_ERROR(Size, "the number of shifts is odd"); - } - sign = (shift.size() % 4 == 0) ? 1. : -1.; - for (auto &s: shift) - { - if (s.first >= env().getNd()) - { - HADRONS_ERROR(Size, "dimension to large for shift <" - + std::to_string(s.first) + " " - + std::to_string(s.second) + ">" ); - } - } - envGetTmp(Field, acc); - acc = 1.; - for (unsigned int i = 0; i < shift.size(); ++i) - { - if (shift[i].second == 0) - { - acc *= phi; - } - else - { - acc *= Cshift(phi, shift[i].first, shift[i].second); - } - } - probe = sign*trace(acc); - if (!par().output.empty()) - { - ShiftProbeResult r; - - r.shifts = par().shifts; - r.value = TensorRemove(sum(probe)); - saveResult(par().output, "probe", r); - } -} - -END_MODULE_NAMESPACE - -END_HADRONS_NAMESPACE - -#endif // Hadrons_MScalarSUN_ShiftProbe_hpp_ diff --git a/Hadrons/modules.inc b/Hadrons/modules.inc index 88cfea88..c620302f 100644 --- a/Hadrons/modules.inc +++ b/Hadrons/modules.inc @@ -1,11 +1,7 @@ modules_cc =\ - Modules/MContraction/WeakHamiltonianEye.cc \ Modules/MContraction/Baryon.cc \ Modules/MContraction/Meson.cc \ - Modules/MContraction/WeakNeutral4ptDisc.cc \ - Modules/MContraction/WeakHamiltonianNonEye.cc \ Modules/MContraction/A2AAslashField.cc \ - Modules/MContraction/WardIdentity.cc \ Modules/MContraction/A2AMesonField.cc \ Modules/MContraction/DiscLoop.cc \ Modules/MContraction/Gamma3pt.cc \ @@ -26,23 +22,19 @@ modules_cc =\ Modules/MSolver/LocalCoherenceLanczos.cc \ Modules/MGauge/StoutSmearing.cc \ Modules/MGauge/Unit.cc \ - Modules/MGauge/Electrify.cc \ Modules/MGauge/UnitEm.cc \ Modules/MGauge/StochEm.cc \ Modules/MGauge/Random.cc \ + Modules/MGauge/Electrify.cc \ Modules/MGauge/FundtoHirep.cc \ Modules/MGauge/GaugeFix.cc \ - Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \ Modules/MNoise/FullVolumeSpinColorDiagonal.cc \ + Modules/MNoise/TimeDilutedSpinColorDiagonal.cc \ Modules/MUtilities/RandomVectors.cc \ - Modules/MUtilities/TestSeqGamma.cc \ Modules/MUtilities/PrecisionCast.cc \ - Modules/MUtilities/TestSeqConserved.cc \ Modules/MLoop/NoiseLoop.cc \ Modules/MScalar/FreeProp.cc \ - Modules/MScalar/VPCounterTerms.cc \ Modules/MScalar/ChargedProp.cc \ - Modules/MScalar/ScalarVP.cc \ Modules/MNPR/Amputate.cc \ Modules/MNPR/Bilinear.cc \ Modules/MNPR/FourQuark.cc \ @@ -57,7 +49,6 @@ modules_cc =\ Modules/MScalarSUN/TrMag.cc \ Modules/MScalarSUN/TrKinetic.cc \ Modules/MScalarSUN/EMT.cc \ - Modules/MScalarSUN/ShiftProbe.cc \ Modules/MScalarSUN/TransProj.cc \ Modules/MScalarSUN/StochFreeField.cc \ Modules/MScalarSUN/TwoPoint.cc \ @@ -75,13 +66,9 @@ modules_hpp =\ Modules/MContraction/A2AAslashField.hpp \ Modules/MContraction/A2AMesonField.hpp \ Modules/MContraction/Meson.hpp \ - Modules/MContraction/WeakHamiltonian.hpp \ - Modules/MContraction/WeakHamiltonianNonEye.hpp \ Modules/MContraction/DiscLoop.hpp \ - Modules/MContraction/WeakNeutral4ptDisc.hpp \ Modules/MContraction/Gamma3pt.hpp \ - Modules/MContraction/WardIdentity.hpp \ - Modules/MContraction/WeakHamiltonianEye.hpp \ + Modules/MContraction/WeakNonEye3pt.hpp \ Modules/MFermion/FreeProp.hpp \ Modules/MFermion/GaugeProp.hpp \ Modules/MSource/SeqGamma.hpp \ @@ -94,28 +81,24 @@ modules_hpp =\ Modules/MSink/Point.hpp \ Modules/MSolver/MixedPrecisionRBPrecCG.hpp \ Modules/MSolver/LocalCoherenceLanczos.hpp \ + Modules/MSolver/A2AAslashVectors.hpp \ Modules/MSolver/Guesser.hpp \ Modules/MSolver/RBPrecCG.hpp \ Modules/MSolver/A2AVectors.hpp \ - Modules/MSolver/A2AAslashVectors.hpp \ Modules/MGauge/UnitEm.hpp \ Modules/MGauge/StoutSmearing.hpp \ Modules/MGauge/Unit.hpp \ - Modules/MGauge/Electrify.hpp \ Modules/MGauge/Random.hpp \ Modules/MGauge/GaugeFix.hpp \ Modules/MGauge/FundtoHirep.hpp \ Modules/MGauge/StochEm.hpp \ + Modules/MGauge/Electrify.hpp \ Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp \ Modules/MNoise/FullVolumeSpinColorDiagonal.hpp \ Modules/MUtilities/PrecisionCast.hpp \ Modules/MUtilities/RandomVectors.hpp \ - Modules/MUtilities/TestSeqGamma.hpp \ - Modules/MUtilities/TestSeqConserved.hpp \ Modules/MLoop/NoiseLoop.hpp \ Modules/MScalar/FreeProp.hpp \ - Modules/MScalar/VPCounterTerms.hpp \ - Modules/MScalar/ScalarVP.hpp \ Modules/MScalar/Scalar.hpp \ Modules/MScalar/ChargedProp.hpp \ Modules/MNPR/Bilinear.hpp \ @@ -129,7 +112,6 @@ modules_hpp =\ Modules/MAction/ScaledDWF.hpp \ Modules/MScalarSUN/StochFreeField.hpp \ Modules/MScalarSUN/TwoPointNPR.hpp \ - Modules/MScalarSUN/ShiftProbe.hpp \ Modules/MScalarSUN/Div.hpp \ Modules/MScalarSUN/TrMag.hpp \ Modules/MScalarSUN/EMT.hpp \