From 60f11bfd72f2c74cfdb0b91eaa9f44d80dd9946c Mon Sep 17 00:00:00 2001 From: Lanny91 Date: Wed, 7 Jun 2017 12:34:47 +0100 Subject: [PATCH] Removed redundant test module --- extras/Hadrons/Modules.hpp | 1 - .../Modules/MContraction/WardIdentitySeq.hpp | 145 ------------------ extras/Hadrons/modules.inc | 1 - 3 files changed, 147 deletions(-) delete mode 100644 extras/Hadrons/Modules/MContraction/WardIdentitySeq.hpp diff --git a/extras/Hadrons/Modules.hpp b/extras/Hadrons/Modules.hpp index dd6a6010..53ec346c 100644 --- a/extras/Hadrons/Modules.hpp +++ b/extras/Hadrons/Modules.hpp @@ -33,7 +33,6 @@ See the full license in the file "LICENSE" in the top level distribution directo #include #include #include -#include #include #include #include diff --git a/extras/Hadrons/Modules/MContraction/WardIdentitySeq.hpp b/extras/Hadrons/Modules/MContraction/WardIdentitySeq.hpp deleted file mode 100644 index 31409925..00000000 --- a/extras/Hadrons/Modules/MContraction/WardIdentitySeq.hpp +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************************* - -Grid physics library, www.github.com/paboyle/Grid - -Source file: extras/Hadrons/Modules/MContraction/WardIdentitySeq.hpp - -Copyright (C) 2017 - -Author: Andrew Lawson - -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_WardIdentitySeq_hpp_ -#define Hadrons_WardIdentitySeq_hpp_ - -#include -#include -#include - -BEGIN_HADRONS_NAMESPACE - -/* - Ward Identity contractions using sequential propagators. - ----------------------------- - - * options: - - q_x: propagator, mu = x current insertion (string). - - q_y: propagator, mu = y current insertion (string). - - q_z: propagator, mu = z current insertion (string). - - q_t: propagator, mu = t current insertion (string). -*/ - -/****************************************************************************** - * WardIdentitySeq * - ******************************************************************************/ -BEGIN_MODULE_NAMESPACE(MContraction) - -class WardIdentitySeqPar: Serializable -{ -public: - GRID_SERIALIZABLE_CLASS_MEMBERS(WardIdentitySeqPar, - std::string, q_x, - std::string, q_y, - std::string, q_z, - std::string, q_t); -}; - -template -class TWardIdentitySeq: public Module -{ -public: - TYPE_ALIASES(FImpl,); -public: - // constructor - TWardIdentitySeq(const std::string name); - // destructor - virtual ~TWardIdentitySeq(void) = default; - // dependency relation - virtual std::vector getInput(void); - virtual std::vector getOutput(void); - // setup - virtual void setup(void); - // execution - virtual void execute(void); -}; - -MODULE_REGISTER_NS(WardIdentitySeq, TWardIdentitySeq, MContraction); - -/****************************************************************************** - * TWardIdentitySeq implementation * - ******************************************************************************/ -// constructor ///////////////////////////////////////////////////////////////// -template -TWardIdentitySeq::TWardIdentitySeq(const std::string name) -: Module(name) -{} - -// dependencies/products /////////////////////////////////////////////////////// -template -std::vector TWardIdentitySeq::getInput(void) -{ - std::vector in = {par().q_x, par().q_y, par().q_z, par().q_t}; - - return in; -} - -template -std::vector TWardIdentitySeq::getOutput(void) -{ - std::vector out = {getName()}; - - return out; -} - -// setup /////////////////////////////////////////////////////////////////////// -template -void TWardIdentitySeq::setup(void) -{ - -} - -// execution /////////////////////////////////////////////////////////////////// -template -void TWardIdentitySeq::execute(void) -{ - LatticeComplex vector_WI(env().getGrid()), c(env().getGrid()); - PropagatorField q_x = *env().template getObject(par().q_x); - PropagatorField q_y = *env().template getObject(par().q_y); - PropagatorField q_z = *env().template getObject(par().q_z); - PropagatorField q_t = *env().template getObject(par().q_t); - PropagatorField *q[Nd] = {&q_x, &q_y, &q_z, &q_t}; - Gamma g5(Gamma::Algebra::Gamma5); - - // Check D_mu V_mu = 0 - for (unsigned int mu = 0; mu < Nd; ++mu) - { - c = trace(g5*(*q[mu])); - vector_WI += c - Cshift(c, mu, -1); - } - - LOG(Message) << "Ward Identity checks for sequential vector current " - << "insertion = " << norm2(vector_WI) << std::endl; -} - -END_MODULE_NAMESPACE - -END_HADRONS_NAMESPACE - -#endif // Hadrons_WardIdentitySeq_hpp_ diff --git a/extras/Hadrons/modules.inc b/extras/Hadrons/modules.inc index 0364502a..b57aa577 100644 --- a/extras/Hadrons/modules.inc +++ b/extras/Hadrons/modules.inc @@ -14,7 +14,6 @@ modules_hpp =\ Modules/MContraction/Gamma3pt.hpp \ Modules/MContraction/Meson.hpp \ Modules/MContraction/WardIdentity.hpp \ - Modules/MContraction/WardIdentitySeq.hpp \ Modules/MContraction/WeakHamiltonian.hpp \ Modules/MContraction/WeakHamiltonianEye.hpp \ Modules/MContraction/WeakHamiltonianNonEye.hpp \