mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 04:37:05 +01:00
Merge remote-tracking branch 'upstream/develop' into feature/kl2QED
Conflicts: Hadrons/Modules.hpp Hadrons/modules.inc
This commit is contained in:
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/A2AMatrix.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/A2AVectors.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: fionnoh <fionnoh@gmail.com>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Application.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -48,28 +48,32 @@ Application::Application(void)
|
||||
{
|
||||
initLogger();
|
||||
auto dim = GridDefaultLatt(), mpi = GridDefaultMpi(), loc(dim);
|
||||
locVol_ = 1;
|
||||
for (unsigned int d = 0; d < dim.size(); ++d)
|
||||
|
||||
if (dim.size())
|
||||
{
|
||||
loc[d] /= mpi[d];
|
||||
locVol_ *= loc[d];
|
||||
locVol_ = 1;
|
||||
for (unsigned int d = 0; d < dim.size(); ++d)
|
||||
{
|
||||
loc[d] /= mpi[d];
|
||||
locVol_ *= loc[d];
|
||||
}
|
||||
LOG(Message) << "====== HADRONS APPLICATION INITIALISATION ======" << std::endl;
|
||||
LOG(Message) << "** Dimensions" << std::endl;
|
||||
LOG(Message) << "Global lattice: " << dim << std::endl;
|
||||
LOG(Message) << "MPI partition : " << mpi << std::endl;
|
||||
LOG(Message) << "Local lattice : " << loc << std::endl;
|
||||
LOG(Message) << std::endl;
|
||||
LOG(Message) << "** Default parameters (and associated C macros)" << std::endl;
|
||||
LOG(Message) << "ASCII output precision : " << MACOUT(DEFAULT_ASCII_PREC) << std::endl;
|
||||
LOG(Message) << "Fermion implementation : " << MACOUTS(FIMPLBASE) << std::endl;
|
||||
LOG(Message) << "z-Fermion implementation: " << MACOUTS(ZFIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Scalar implementation : " << MACOUTS(SIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Gauge implementation : " << MACOUTS(GIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Eigenvector base size : "
|
||||
<< MACOUT(HADRONS_DEFAULT_LANCZOS_NBASIS) << std::endl;
|
||||
LOG(Message) << "Schur decomposition : " << MACOUTS(HADRONS_DEFAULT_SCHUR) << std::endl;
|
||||
LOG(Message) << std::endl;
|
||||
}
|
||||
LOG(Message) << "====== HADRONS APPLICATION INITIALISATION ======" << std::endl;
|
||||
LOG(Message) << "** Dimensions" << std::endl;
|
||||
LOG(Message) << "Global lattice: " << dim << std::endl;
|
||||
LOG(Message) << "MPI partition : " << mpi << std::endl;
|
||||
LOG(Message) << "Local lattice : " << loc << std::endl;
|
||||
LOG(Message) << std::endl;
|
||||
LOG(Message) << "** Default parameters (and associated C macros)" << std::endl;
|
||||
LOG(Message) << "ASCII output precision : " << MACOUT(DEFAULT_ASCII_PREC) << std::endl;
|
||||
LOG(Message) << "Fermion implementation : " << MACOUTS(FIMPLBASE) << std::endl;
|
||||
LOG(Message) << "z-Fermion implementation: " << MACOUTS(ZFIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Scalar implementation : " << MACOUTS(SIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Gauge implementation : " << MACOUTS(GIMPLBASE) << std::endl;
|
||||
LOG(Message) << "Eigenvector base size : "
|
||||
<< MACOUT(HADRONS_DEFAULT_LANCZOS_NBASIS) << std::endl;
|
||||
LOG(Message) << "Schur decomposition : " << MACOUTS(HADRONS_DEFAULT_SCHUR) << std::endl;
|
||||
LOG(Message) << std::endl;
|
||||
}
|
||||
|
||||
Application::Application(const Application::GlobalPar &par)
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Application.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MScalar/ScalarVP.cc
|
||||
Source file: Hadrons/Archive/Modules/ScalarVP.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MScalar/ScalarVP.hpp
|
||||
Source file: Hadrons/Archive/Modules/ScalarVP.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MUtilities/TestSeqConserved.cc
|
||||
Source file: Hadrons/Archive/Modules/TestSeqConserved.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MUtilities/TestSeqConserved.hpp
|
||||
Source file: Hadrons/Archive/Modules/TestSeqConserved.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MUtilities/TestSeqGamma.cc
|
||||
Source file: Hadrons/Archive/Modules/TestSeqGamma.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MUtilities/TestSeqGamma.hpp
|
||||
Source file: Hadrons/Archive/Modules/TestSeqGamma.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MScalar/VPCounterTerms.cc
|
||||
Source file: Hadrons/Archive/Modules/VPCounterTerms.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MScalar/VPCounterTerms.hpp
|
||||
Source file: Hadrons/Archive/Modules/VPCounterTerms.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WardIdentity.cc
|
||||
Source file: Hadrons/Archive/Modules/WardIdentity.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WardIdentity.hpp
|
||||
Source file: Hadrons/Archive/Modules/WardIdentity.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakHamiltonian.hpp
|
||||
Source file: Hadrons/Archive/Modules/WeakHamiltonian.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakHamiltonianEye.cc
|
||||
Source file: Hadrons/Archive/Modules/WeakHamiltonianEye.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp
|
||||
Source file: Hadrons/Archive/Modules/WeakHamiltonianEye.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakHamiltonianNonEye.cc
|
||||
Source file: Hadrons/Archive/Modules/WeakHamiltonianNonEye.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp
|
||||
Source file: Hadrons/Archive/Modules/WeakHamiltonianNonEye.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakNeutral4ptDisc.cc
|
||||
Source file: Hadrons/Archive/Modules/WeakNeutral4ptDisc.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp
|
||||
Source file: Hadrons/Archive/Modules/WeakNeutral4ptDisc.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
@ -4,10 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/DilutedNoise.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Vera Guelpers <Vera.Guelpers@ed.ac.uk>
|
||||
Author: Vera Guelpers <vmg1n14@soton.ac.uk>
|
||||
|
||||
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
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/DiskVector.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/EigenPack.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -308,7 +308,9 @@ template <typename FineF, typename CoarseF,
|
||||
class CoarseEigenPack: public EigenPack<FineF, FineFIo>
|
||||
{
|
||||
public:
|
||||
typedef CoarseF CoarseField;
|
||||
typedef CoarseF CoarseField;
|
||||
typedef CoarseFIo CoarseFieldIo;
|
||||
public:
|
||||
std::vector<CoarseF> evecCoarse;
|
||||
std::vector<RealD> evalCoarse;
|
||||
public:
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Environment.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -43,15 +43,13 @@ HADRONS_ERROR_REF(ObjectDefinition, "no object with address " + std::to_string(a
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
Environment::Environment(void)
|
||||
{
|
||||
dim_ = GridDefaultLatt();
|
||||
nd_ = dim_.size();
|
||||
createGrid<vComplex>(1);
|
||||
dim_ = GridDefaultLatt();
|
||||
nd_ = dim_.size();
|
||||
vol_ = 1.;
|
||||
for (auto d: dim_)
|
||||
{
|
||||
vol_ *= d;
|
||||
}
|
||||
rng4d_.reset(new GridParallelRNG(getGrid()));
|
||||
}
|
||||
|
||||
// grids ///////////////////////////////////////////////////////////////////////
|
||||
@ -76,8 +74,13 @@ double Environment::getVolume(void) const
|
||||
}
|
||||
|
||||
// random number generator /////////////////////////////////////////////////////
|
||||
GridParallelRNG * Environment::get4dRng(void) const
|
||||
GridParallelRNG * Environment::get4dRng(void)
|
||||
{
|
||||
if (rng4d_ == nullptr)
|
||||
{
|
||||
rng4d_.reset(new GridParallelRNG(getGrid()));
|
||||
}
|
||||
|
||||
return rng4d_.get();
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Environment.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
unsigned int getNd(void) const;
|
||||
double getVolume(void) const;
|
||||
// random number generator
|
||||
GridParallelRNG * get4dRng(void) const;
|
||||
GridParallelRNG * get4dRng(void);
|
||||
// general memory management
|
||||
void addObject(const std::string name,
|
||||
const int moduleAddress = -1);
|
||||
@ -182,7 +182,7 @@ private:
|
||||
std::map<CoarseGridKey, GridPt> gridCoarse5d_;
|
||||
unsigned int nd_;
|
||||
// random number generator
|
||||
RngPt rng4d_;
|
||||
RngPt rng4d_{nullptr};
|
||||
// object store
|
||||
std::vector<ObjInfo> object_;
|
||||
std::map<std::string, unsigned int> objectAddress_;
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Exceptions.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Exceptions.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Factory.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/GeneticScheduler.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Global.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Global.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
@ -44,6 +44,8 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
#define DEFAULT_ASCII_PREC 16
|
||||
#endif
|
||||
|
||||
#define ARG(...) __VA_ARGS__
|
||||
|
||||
/* the 'using Grid::operator<<;' statement prevents a very nasty compilation
|
||||
* error with GCC 5 (clang & GCC 6 compile fine without it).
|
||||
*/
|
||||
@ -101,15 +103,16 @@ BEGIN_HADRONS_NAMESPACE
|
||||
typedef typename Impl::Field ScalarField##suffix;\
|
||||
typedef typename Impl::PropagatorField PropagatorField##suffix;\
|
||||
typedef typename Impl::SitePropagator::scalar_object SitePropagator##suffix;\
|
||||
typedef std::vector<SitePropagator##suffix> SlicedPropagator##suffix;
|
||||
typedef typename Impl::ComplexField ComplexField##suffix;\
|
||||
typedef std::vector<SitePropagator##suffix> SlicedPropagator##suffix;\
|
||||
typedef std::vector<typename ComplexField##suffix::vector_object::scalar_object> SlicedComplex##suffix;
|
||||
|
||||
#define FERM_TYPE_ALIASES(FImpl, suffix)\
|
||||
BASIC_TYPE_ALIASES(FImpl, suffix);\
|
||||
typedef FermionOperator<FImpl> FMat##suffix;\
|
||||
typedef typename FImpl::FermionField FermionField##suffix;\
|
||||
typedef typename FImpl::GaugeField GaugeField##suffix;\
|
||||
typedef typename FImpl::DoubledGaugeField DoubledGaugeField##suffix;\
|
||||
typedef typename FImpl::ComplexField ComplexField##suffix;
|
||||
typedef typename FImpl::DoubledGaugeField DoubledGaugeField##suffix;
|
||||
|
||||
#define GAUGE_TYPE_ALIASES(GImpl, suffix)\
|
||||
typedef typename GImpl::GaugeField GaugeField##suffix;
|
||||
@ -263,6 +266,15 @@ void tokenReplace(std::string &str, const std::string token,
|
||||
}
|
||||
}
|
||||
|
||||
// generic correlator class
|
||||
template <typename Metadata, typename Scalar = Complex>
|
||||
struct Correlator: Serializable
|
||||
{
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(ARG(Correlator<Metadata, Scalar>),
|
||||
Metadata, info,
|
||||
std::vector<Complex>, corr);
|
||||
};
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#include <Hadrons/Exceptions.hpp>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Graph.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Module.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Module.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -65,7 +65,6 @@ static ns##mod##ModuleRegistrar ns##mod##ModuleRegistrarInstance;
|
||||
extern template class base;\
|
||||
MODULE_REGISTER(mod, ARG(base), ns);
|
||||
|
||||
#define ARG(...) __VA_ARGS__
|
||||
#define HADRONS_MACRO_REDIRECT_12(arg1, arg2, macro, ...) macro
|
||||
#define HADRONS_MACRO_REDIRECT_23(arg1, arg2, arg3, macro, ...) macro
|
||||
|
||||
@ -78,6 +77,15 @@ env().template getGrid<typename latticeType::vector_type>(Ls)
|
||||
#define envGetGrid(...)\
|
||||
HADRONS_MACRO_REDIRECT_12(__VA_ARGS__, envGetGrid5, envGetGrid4)(__VA_ARGS__)
|
||||
|
||||
#define envGetCoarseGrid4(latticeType, blockSize)\
|
||||
env().template getCoarseGrid<typename latticeType::vector_type>(blockSize)
|
||||
|
||||
#define envGetCoarseGrid5(latticeType, blockSize, Ls)\
|
||||
env().template getCoarseGrid<typename latticeType::vector_type>(blockSize, Ls)
|
||||
|
||||
#define envGetCoarseGrid(...)\
|
||||
HADRONS_MACRO_REDIRECT_23(__VA_ARGS__, envGetCoarseGrid5, envGetCoarseGrid4)(__VA_ARGS__)
|
||||
|
||||
#define envGetRbGrid4(latticeType)\
|
||||
env().template getRbGrid<typename latticeType::vector_type>()
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/ModuleFactory.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
#include <Hadrons/Modules/MContraction/WeakEye3pt.hpp>
|
||||
#include <Hadrons/Modules/MContraction/Baryon.hpp>
|
||||
#include <Hadrons/Modules/MContraction/A2AAslashField.hpp>
|
||||
#include <Hadrons/Modules/MContraction/A2ALoop.hpp>
|
||||
#include <Hadrons/Modules/MContraction/A2AMesonField.hpp>
|
||||
#include <Hadrons/Modules/MContraction/Meson.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakHamiltonian.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp>
|
||||
#include <Hadrons/Modules/MContraction/DiscLoop.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp>
|
||||
#include <Hadrons/Modules/MContraction/Gamma3pt.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WardIdentity.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakMesonDecayKl2.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakNonEye3pt.hpp>
|
||||
#include <Hadrons/Modules/MFermion/FreeProp.hpp>
|
||||
#include <Hadrons/Modules/MFermion/GaugeProp.hpp>
|
||||
#include <Hadrons/Modules/MSource/SeqGamma.hpp>
|
||||
@ -23,28 +21,23 @@
|
||||
#include <Hadrons/Modules/MSink/Point.hpp>
|
||||
#include <Hadrons/Modules/MSolver/MixedPrecisionRBPrecCG.hpp>
|
||||
#include <Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp>
|
||||
#include <Hadrons/Modules/MSolver/A2AAslashVectors.hpp>
|
||||
#include <Hadrons/Modules/MSolver/Guesser.hpp>
|
||||
#include <Hadrons/Modules/MSolver/RBPrecCG.hpp>
|
||||
#include <Hadrons/Modules/MSolver/A2AVectors.hpp>
|
||||
#include <Hadrons/Modules/MSolver/A2AAslashVectors.hpp>
|
||||
#include <Hadrons/Modules/MGauge/UnitEm.hpp>
|
||||
#include <Hadrons/Modules/MGauge/StoutSmearing.hpp>
|
||||
#include <Hadrons/Modules/MGauge/Unit.hpp>
|
||||
#include <Hadrons/Modules/MGauge/Electrify.hpp>
|
||||
#include <Hadrons/Modules/MGauge/Random.hpp>
|
||||
#include <Hadrons/Modules/MGauge/GaugeFix.hpp>
|
||||
#include <Hadrons/Modules/MGauge/FundtoHirep.hpp>
|
||||
#include <Hadrons/Modules/MGauge/StochEm.hpp>
|
||||
#include <Hadrons/Modules/MGauge/Electrify.hpp>
|
||||
#include <Hadrons/Modules/MNoise/TimeDilutedSpinColorDiagonal.hpp>
|
||||
#include <Hadrons/Modules/MNoise/FullVolumeSpinColorDiagonal.hpp>
|
||||
#include <Hadrons/Modules/MUtilities/PrecisionCast.hpp>
|
||||
#include <Hadrons/Modules/MUtilities/RandomVectors.hpp>
|
||||
#include <Hadrons/Modules/MUtilities/TestSeqGamma.hpp>
|
||||
#include <Hadrons/Modules/MUtilities/TestSeqConserved.hpp>
|
||||
#include <Hadrons/Modules/MLoop/NoiseLoop.hpp>
|
||||
#include <Hadrons/Modules/MScalar/FreeProp.hpp>
|
||||
#include <Hadrons/Modules/MScalar/VPCounterTerms.hpp>
|
||||
#include <Hadrons/Modules/MScalar/ScalarVP.hpp>
|
||||
#include <Hadrons/Modules/MScalar/Scalar.hpp>
|
||||
#include <Hadrons/Modules/MScalar/ChargedProp.hpp>
|
||||
#include <Hadrons/Modules/MNPR/Bilinear.hpp>
|
||||
@ -58,7 +51,6 @@
|
||||
#include <Hadrons/Modules/MAction/ScaledDWF.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/StochFreeField.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/TwoPointNPR.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/ShiftProbe.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/Div.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/TrMag.hpp>
|
||||
#include <Hadrons/Modules/MScalarSUN/EMT.hpp>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/DWF.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/DWF.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
@ -112,8 +112,6 @@ void TDWF<FImpl>::setup(void)
|
||||
<< par().mass << ", M5= " << par().M5 << " and Ls= "
|
||||
<< par().Ls << " using gauge field '" << par().gauge << "'"
|
||||
<< std::endl;
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &g4 = *envGetGrid(FermionField);
|
||||
@ -121,8 +119,26 @@ void TDWF<FImpl>::setup(void)
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
typename DomainWallFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, DomainWallFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, implParams);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/MobiusDWF.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/MobiusDWF.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -112,17 +112,33 @@ void TMobiusDWF<FImpl>::setup(void)
|
||||
<< ", b= " << par().b << ", c= " << par().c
|
||||
<< " using gauge field '" << par().gauge << "'"
|
||||
<< std::endl;
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
|
||||
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &g4 = *envGetGrid(FermionField);
|
||||
auto &grb4 = *envGetRbGrid(FermionField);
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
typename MobiusFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, MobiusFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, par().b, par().c,
|
||||
implParams);
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/ScaledDWF.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/ScaledDWF.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -111,8 +111,6 @@ void TScaledDWF<FImpl>::setup(void)
|
||||
<< ", scale= " << par().scale
|
||||
<< " using gauge field '" << par().gauge << "'"
|
||||
<< std::endl;
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &g4 = *envGetGrid(FermionField);
|
||||
@ -120,8 +118,26 @@ void TScaledDWF<FImpl>::setup(void)
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
typename ScaledShamirFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, ScaledShamirFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, par().scale,
|
||||
implParams);
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/Wilson.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/Wilson.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
@ -109,15 +109,31 @@ void TWilson<FImpl>::setup(void)
|
||||
{
|
||||
LOG(Message) << "Setting up Wilson fermion matrix with m= " << par().mass
|
||||
<< " using gauge field '" << par().gauge << "'" << std::endl;
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &grid = *envGetGrid(FermionField);
|
||||
auto &gridRb = *envGetRbGrid(FermionField);
|
||||
typename WilsonFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, WilsonFermion<FImpl>, getName(), 1, U, grid, gridRb,
|
||||
par().mass, implParams);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/WilsonClover.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/WilsonClover.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Guido Cossu <guido.cossu@ed.ac.uk>
|
||||
@ -112,17 +112,34 @@ void TWilsonClover<FImpl>::setup(void)
|
||||
{
|
||||
LOG(Message) << "Setting up Wilson clover fermion matrix with m= " << par().mass
|
||||
<< " using gauge field '" << par().gauge << "'" << std::endl;
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
LOG(Message) << "Clover term csw_r: " << par().csw_r
|
||||
<< " csw_t: " << par().csw_t
|
||||
<< std::endl;
|
||||
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &grid = *envGetGrid(FermionField);
|
||||
auto &gridRb = *envGetRbGrid(FermionField);
|
||||
typename WilsonCloverFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, WilsonCloverFermion<FImpl>, getName(), 1, U, grid,
|
||||
gridRb, par().mass, par().csw_r, par().csw_t,
|
||||
par().clover_anisotropy, implParams);
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/ZMobiusDWF.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MAction/ZMobiusDWF.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -118,10 +118,7 @@ void TZMobiusDWF<FImpl>::setup(void)
|
||||
{
|
||||
LOG(Message) << " omega[" << i << "]= " << par().omega[i] << std::endl;
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||
<< std::endl;
|
||||
|
||||
env().createGrid(par().Ls);
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &g4 = *envGetGrid(FermionField);
|
||||
auto &grb4 = *envGetRbGrid(FermionField);
|
||||
@ -129,8 +126,26 @@ void TZMobiusDWF<FImpl>::setup(void)
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
auto omega = par().omega;
|
||||
typename ZMobiusFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
if (!par().boundary.empty())
|
||||
{
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
}
|
||||
if (!par().twist.empty())
|
||||
{
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
}
|
||||
LOG(Message) << "Fermion boundary conditions: " << implParams.boundary_phases
|
||||
<< std::endl;
|
||||
LOG(Message) << "Twists: " << implParams.twist_n_2pi_L
|
||||
<< std::endl;
|
||||
if (implParams.boundary_phases.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of boundary phase");
|
||||
}
|
||||
if (implParams.twist_n_2pi_L.size() != env().getNd())
|
||||
{
|
||||
HADRONS_ERROR(Size, "Wrong number of twist");
|
||||
}
|
||||
envCreateDerived(FMat, ZMobiusFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, omega,
|
||||
par().b, par().c, implParams);
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/A2AAslashField.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/A2AAslashField.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MLoop/NoiseLoop.cc
|
||||
Source file: Hadrons/Modules/MContraction/A2ALoop.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -25,11 +25,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Hadrons/Modules/MLoop/NoiseLoop.hpp>
|
||||
#include <Hadrons/Modules/MContraction/A2ALoop.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace Hadrons;
|
||||
using namespace MLoop;
|
||||
|
||||
template class Grid::Hadrons::MLoop::TNoiseLoop<FIMPL>;
|
||||
using namespace MContraction;
|
||||
|
||||
template class Grid::Hadrons::MContraction::TA2ALoop<FIMPL>;
|
@ -2,12 +2,11 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MLoop/NoiseLoop.hpp
|
||||
Source file: Hadrons/Modules/MContraction/A2ALoop.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
||||
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
|
||||
@ -26,9 +25,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
|
||||
#ifndef Hadrons_MLoop_NoiseLoop_hpp_
|
||||
#define Hadrons_MLoop_NoiseLoop_hpp_
|
||||
#ifndef Hadrons_MContraction_A2ALoop_hpp_
|
||||
#define Hadrons_MContraction_A2ALoop_hpp_
|
||||
|
||||
#include <Hadrons/Global.hpp>
|
||||
#include <Hadrons/Module.hpp>
|
||||
@ -36,99 +34,90 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
||||
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
/*
|
||||
|
||||
Noise loop propagator
|
||||
-----------------------------
|
||||
* loop_x = q_x * adj(eta_x)
|
||||
|
||||
* options:
|
||||
- q = Result of inversion on noise source.
|
||||
- eta = noise source.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* NoiseLoop *
|
||||
* From closed loop from all-to-all vectors *
|
||||
******************************************************************************/
|
||||
BEGIN_MODULE_NAMESPACE(MLoop)
|
||||
BEGIN_MODULE_NAMESPACE(MContraction)
|
||||
|
||||
class NoiseLoopPar: Serializable
|
||||
class A2ALoopPar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(NoiseLoopPar,
|
||||
std::string, q,
|
||||
std::string, eta);
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(A2ALoopPar,
|
||||
std::string, left,
|
||||
std::string, right);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
class TNoiseLoop: public Module<NoiseLoopPar>
|
||||
class TA2ALoop: public Module<A2ALoopPar>
|
||||
{
|
||||
public:
|
||||
FERM_TYPE_ALIASES(FImpl,);
|
||||
public:
|
||||
// constructor
|
||||
TNoiseLoop(const std::string name);
|
||||
TA2ALoop(const std::string name);
|
||||
// destructor
|
||||
virtual ~TNoiseLoop(void) {};
|
||||
virtual ~TA2ALoop(void) {};
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
protected:
|
||||
// setup
|
||||
virtual void setup(void);
|
||||
// execution
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_TMP(NoiseLoop, TNoiseLoop<FIMPL>, MLoop);
|
||||
MODULE_REGISTER_TMP(A2ALoop, TA2ALoop<FIMPL>, MContraction);
|
||||
|
||||
/******************************************************************************
|
||||
* TNoiseLoop implementation *
|
||||
* TA2ALoop implementation *
|
||||
******************************************************************************/
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
TNoiseLoop<FImpl>::TNoiseLoop(const std::string name)
|
||||
: Module<NoiseLoopPar>(name)
|
||||
TA2ALoop<FImpl>::TA2ALoop(const std::string name)
|
||||
: Module<A2ALoopPar>(name)
|
||||
{}
|
||||
|
||||
// dependencies/products ///////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TNoiseLoop<FImpl>::getInput(void)
|
||||
std::vector<std::string> TA2ALoop<FImpl>::getInput(void)
|
||||
{
|
||||
std::vector<std::string> in = {par().q, par().eta};
|
||||
std::vector<std::string> in = {par().left, par().right};
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TNoiseLoop<FImpl>::getOutput(void)
|
||||
std::vector<std::string> TA2ALoop<FImpl>::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {getName()};
|
||||
std::vector<std::string> out = {};
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// setup ///////////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TNoiseLoop<FImpl>::setup(void)
|
||||
void TA2ALoop<FImpl>::setup(void)
|
||||
{
|
||||
envCreateLat(PropagatorField, getName());
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TNoiseLoop<FImpl>::execute(void)
|
||||
void TA2ALoop<FImpl>::execute(void)
|
||||
{
|
||||
auto &loop = envGet(PropagatorField, getName());
|
||||
auto &q = envGet(PropagatorField, par().q);
|
||||
auto &eta = envGet(PropagatorField, par().eta);
|
||||
loop = q*adj(eta);
|
||||
auto &loop = envGet(PropagatorField, getName());
|
||||
auto &left = envGet(std::vector<FermionField>, par().left);
|
||||
auto &right = envGet(std::vector<FermionField>, par().right);
|
||||
|
||||
loop = zero;
|
||||
for (unsigned int i = 0; i < left.size(); ++i)
|
||||
{
|
||||
loop += outerProduct(adj(left[i]), right[i]);
|
||||
}
|
||||
}
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_MLoop_NoiseLoop_hpp_
|
||||
#endif // Hadrons_MContraction_A2ALoop_hpp_
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/A2AMesonField.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/A2AMesonField.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Baryon.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Baryon.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/DiscLoop.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/DiscLoop.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Gamma3pt.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Gamma3pt.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Meson.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/Meson.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MScalarSUN/ShiftProbe.cc
|
||||
Source file: Hadrons/Modules/MContraction/WeakEye3pt.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -25,15 +25,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Hadrons/Modules/MScalarSUN/ShiftProbe.hpp>
|
||||
#include <Hadrons/Modules/MContraction/WeakEye3pt.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace Hadrons;
|
||||
using namespace MScalarSUN;
|
||||
|
||||
template class Grid::Hadrons::MScalarSUN::TShiftProbe<ScalarNxNAdjImplR<2>>;
|
||||
template class Grid::Hadrons::MScalarSUN::TShiftProbe<ScalarNxNAdjImplR<3>>;
|
||||
template class Grid::Hadrons::MScalarSUN::TShiftProbe<ScalarNxNAdjImplR<4>>;
|
||||
template class Grid::Hadrons::MScalarSUN::TShiftProbe<ScalarNxNAdjImplR<5>>;
|
||||
template class Grid::Hadrons::MScalarSUN::TShiftProbe<ScalarNxNAdjImplR<6>>;
|
||||
using namespace MContraction;
|
||||
|
||||
template class Grid::Hadrons::MContraction::TWeakEye3pt<FIMPL>;
|
200
Hadrons/Modules/MContraction/WeakEye3pt.hpp
Normal file
200
Hadrons/Modules/MContraction/WeakEye3pt.hpp
Normal file
@ -0,0 +1,200 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakEye3pt.hpp
|
||||
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
||||
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_MContraction_WeakEye3pt_hpp_
|
||||
#define Hadrons_MContraction_WeakEye3pt_hpp_
|
||||
|
||||
#include <Hadrons/Global.hpp>
|
||||
#include <Hadrons/Module.hpp>
|
||||
#include <Hadrons/ModuleFactory.hpp>
|
||||
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
/*
|
||||
* Weak Hamiltonian meson 3-pt diagrams, eye topologies.
|
||||
*
|
||||
* Schematics: loop |
|
||||
* /-<-¬ |
|
||||
* / \ | qbl G qbr
|
||||
* \ / | /----<------*------<----¬
|
||||
* qbl \ / qbr | / /-*-¬ \
|
||||
* /-----<-----* *-----<----¬ | / / G \ \
|
||||
* gIn * G G * gOut | gIn * \ / loop * gOut
|
||||
* \ / | \ \->-/ /
|
||||
* \ / | \ /
|
||||
* \---------->---------/ | \----------->----------/
|
||||
* qs | qs
|
||||
* |
|
||||
* one trace | two traces
|
||||
*
|
||||
* one trace : tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut)
|
||||
* two traces: tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G)*tr(loop*G)
|
||||
*
|
||||
*/
|
||||
|
||||
BEGIN_MODULE_NAMESPACE(MContraction)
|
||||
|
||||
class WeakEye3ptPar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(WeakEye3ptPar,
|
||||
std::string, qBarLeft,
|
||||
std::string, qBarRight,
|
||||
std::string, qSpectator,
|
||||
std::string, loop,
|
||||
unsigned int, tOut,
|
||||
Gamma::Algebra, gammaIn,
|
||||
Gamma::Algebra, gammaOut,
|
||||
std::string, output);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
class TWeakEye3pt: public Module<WeakEye3ptPar>
|
||||
{
|
||||
public:
|
||||
FERM_TYPE_ALIASES(FImpl,);
|
||||
class Metadata: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(Metadata,
|
||||
Gamma::Algebra, in,
|
||||
Gamma::Algebra, out,
|
||||
Gamma::Algebra, op,
|
||||
unsigned int, trace);
|
||||
};
|
||||
typedef Correlator<Metadata> Result;
|
||||
public:
|
||||
// constructor
|
||||
TWeakEye3pt(const std::string name);
|
||||
// destructor
|
||||
virtual ~TWeakEye3pt(void) {};
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
// setup
|
||||
virtual void setup(void);
|
||||
// execution
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_TMP(WeakEye3pt, TWeakEye3pt<FIMPL>, MContraction);
|
||||
|
||||
/******************************************************************************
|
||||
* TWeakEye3pt implementation *
|
||||
******************************************************************************/
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
TWeakEye3pt<FImpl>::TWeakEye3pt(const std::string name)
|
||||
: Module<WeakEye3ptPar>(name)
|
||||
{}
|
||||
|
||||
// dependencies/products ///////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWeakEye3pt<FImpl>::getInput(void)
|
||||
{
|
||||
std::vector<std::string> in = {par().qBarLeft, par().qBarRight,
|
||||
par().qSpectator};
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWeakEye3pt<FImpl>::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {};
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// setup ///////////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TWeakEye3pt<FImpl>::setup(void)
|
||||
{
|
||||
envTmpLat(ComplexField, "corr");
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TWeakEye3pt<FImpl>::execute(void)
|
||||
{
|
||||
LOG(Message) << "Computing mesonic weak 3pt contractions, eye topologies" << std::endl;
|
||||
LOG(Message) << "gIn : " << par().gammaIn << std::endl;
|
||||
LOG(Message) << "gOut: " << par().gammaIn << std::endl;
|
||||
LOG(Message) << "tOut: " << par().tOut << std::endl;
|
||||
LOG(Message) << "qbl : " << par().qBarLeft << std::endl;
|
||||
LOG(Message) << "qbr : " << par().qBarRight << std::endl;
|
||||
LOG(Message) << "qs : " << par().qSpectator << std::endl;
|
||||
LOG(Message) << "loop: " << par().loop << std::endl;
|
||||
|
||||
std::vector<Result> result;
|
||||
Result r;
|
||||
auto &qbl = envGet(PropagatorField, par().qBarLeft);
|
||||
auto &qbr = envGet(PropagatorField, par().qBarRight);
|
||||
auto &loop = envGet(PropagatorField, par().loop);
|
||||
auto &qs = envGet(SlicedPropagator, par().qSpectator);
|
||||
auto qst = qs[par().tOut];
|
||||
Gamma gIn(par().gammaIn), gOut(par().gammaOut);
|
||||
Gamma g5(Gamma::Algebra::Gamma5);
|
||||
|
||||
envGetTmp(ComplexField, corr);
|
||||
r.info.in = par().gammaIn;
|
||||
r.info.out = par().gammaOut;
|
||||
for (auto &G: Gamma::gall)
|
||||
{
|
||||
SlicedComplex buf;
|
||||
|
||||
r.info.op = G.g;
|
||||
// one trace
|
||||
corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut);
|
||||
sliceSum(corr, buf, Tp);
|
||||
r.corr.clear();
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
{
|
||||
r.corr.push_back(TensorRemove(buf[t]));
|
||||
}
|
||||
r.info.trace = 1;
|
||||
result.push_back(r);
|
||||
// two traces
|
||||
corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G)*trace(loop*G);
|
||||
sliceSum(corr, buf, Tp);
|
||||
r.corr.clear();
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
{
|
||||
r.corr.push_back(TensorRemove(buf[t]));
|
||||
}
|
||||
r.info.trace = 2;
|
||||
result.push_back(r);
|
||||
}
|
||||
saveResult(par().output, "weakEye3pt", result);
|
||||
}
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_MContraction_WeakEye3pt_hpp_
|
34
Hadrons/Modules/MContraction/WeakNonEye3pt.cc
Normal file
34
Hadrons/Modules/MContraction/WeakNonEye3pt.cc
Normal file
@ -0,0 +1,34 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakNonEye3pt.cc
|
||||
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
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 <Hadrons/Modules/MContraction/WeakNonEye3pt.hpp>
|
||||
|
||||
using namespace Grid;
|
||||
using namespace Hadrons;
|
||||
using namespace MContraction;
|
||||
|
||||
template class Grid::Hadrons::MContraction::TWeakNonEye3pt<FIMPL>;
|
198
Hadrons/Modules/MContraction/WeakNonEye3pt.hpp
Normal file
198
Hadrons/Modules/MContraction/WeakNonEye3pt.hpp
Normal file
@ -0,0 +1,198 @@
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MContraction/WeakNonEye3pt.hpp
|
||||
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Lanny91 <andrew.lawson@gmail.com>
|
||||
|
||||
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_MContraction_WeakNonEye3pt_hpp_
|
||||
#define Hadrons_MContraction_WeakNonEye3pt_hpp_
|
||||
|
||||
#include <Hadrons/Global.hpp>
|
||||
#include <Hadrons/Module.hpp>
|
||||
#include <Hadrons/ModuleFactory.hpp>
|
||||
|
||||
BEGIN_HADRONS_NAMESPACE
|
||||
|
||||
/*
|
||||
* Weak Hamiltonian meson 3-pt diagrams, non-eye topologies.
|
||||
*
|
||||
* Schematic:
|
||||
* qbl qbr | qbl qbr
|
||||
* /--<--¬ /--<--¬ | /--<--¬ /--<--¬
|
||||
* / \ / \ | / \ / \
|
||||
* / \ / \ | / \ / \
|
||||
* / \ / \ | / \ / \
|
||||
* gIn * * G * gOut | gIn * G * * G * gOut
|
||||
* \ * G | | \ / \ /
|
||||
* \ / \ / | \ / \ /
|
||||
* \ / \ / | \ / \ /
|
||||
* \ / \ / | \-->--/ \-->--/
|
||||
* \-->--/ \-->--/ | ql qr
|
||||
* ql qr |
|
||||
* one trace | two traces
|
||||
*
|
||||
* one trace : tr(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G)
|
||||
* two traces: tr(ql*adj(gIn)*g5*adj(qbl)*g5*G)*tr(qbr*gOut*g5*adj(qr)*g5*G)
|
||||
*
|
||||
*/
|
||||
|
||||
BEGIN_MODULE_NAMESPACE(MContraction)
|
||||
|
||||
class WeakNonEye3ptPar: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(WeakNonEye3ptPar,
|
||||
std::string, qLeft,
|
||||
std::string, qBarLeft,
|
||||
std::string, qRight,
|
||||
std::string, qBarRight,
|
||||
Gamma::Algebra, gammaIn,
|
||||
Gamma::Algebra, gammaOut,
|
||||
std::string, output);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
class TWeakNonEye3pt: public Module<WeakNonEye3ptPar>
|
||||
{
|
||||
public:
|
||||
FERM_TYPE_ALIASES(FImpl,);
|
||||
class Metadata: Serializable
|
||||
{
|
||||
public:
|
||||
GRID_SERIALIZABLE_CLASS_MEMBERS(Metadata,
|
||||
Gamma::Algebra, in,
|
||||
Gamma::Algebra, out,
|
||||
Gamma::Algebra, op,
|
||||
unsigned int, trace);
|
||||
};
|
||||
typedef Correlator<Metadata> Result;
|
||||
public:
|
||||
// constructor
|
||||
TWeakNonEye3pt(const std::string name);
|
||||
// destructor
|
||||
virtual ~TWeakNonEye3pt(void) {};
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
// setup
|
||||
virtual void setup(void);
|
||||
// execution
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_TMP(WeakNonEye3pt, TWeakNonEye3pt<FIMPL>, MContraction);
|
||||
|
||||
/******************************************************************************
|
||||
* TWeakNonEye3pt implementation *
|
||||
******************************************************************************/
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
TWeakNonEye3pt<FImpl>::TWeakNonEye3pt(const std::string name)
|
||||
: Module<WeakNonEye3ptPar>(name)
|
||||
{}
|
||||
|
||||
// dependencies/products ///////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWeakNonEye3pt<FImpl>::getInput(void)
|
||||
{
|
||||
std::vector<std::string> in = {par().qLeft, par().qBarLeft,
|
||||
par().qRight, par().qBarRight};
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWeakNonEye3pt<FImpl>::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {};
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// setup ///////////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TWeakNonEye3pt<FImpl>::setup(void)
|
||||
{
|
||||
envTmpLat(ComplexField, "corr");
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TWeakNonEye3pt<FImpl>::execute(void)
|
||||
{
|
||||
LOG(Message) << "Computing mesonic weak 3pt contractions, non-eye topologies" << std::endl;
|
||||
LOG(Message) << "gIn : " << par().gammaIn << std::endl;
|
||||
LOG(Message) << "gOut: " << par().gammaIn << std::endl;
|
||||
LOG(Message) << "ql : " << par().qLeft << std::endl;
|
||||
LOG(Message) << "qbl : " << par().qBarLeft << std::endl;
|
||||
LOG(Message) << "qr : " << par().qRight << std::endl;
|
||||
LOG(Message) << "qbr : " << par().qBarRight << std::endl;
|
||||
|
||||
std::vector<Result> result;
|
||||
Result r;
|
||||
auto &ql = envGet(PropagatorField, par().qLeft);
|
||||
auto &qbl = envGet(PropagatorField, par().qBarLeft);
|
||||
auto &qr = envGet(PropagatorField, par().qRight);
|
||||
auto &qbr = envGet(PropagatorField, par().qBarRight);
|
||||
Gamma gIn(par().gammaIn), gOut(par().gammaOut);
|
||||
Gamma g5(Gamma::Algebra::Gamma5);
|
||||
|
||||
envGetTmp(ComplexField, corr);
|
||||
r.info.in = par().gammaIn;
|
||||
r.info.out = par().gammaOut;
|
||||
for (auto &G: Gamma::gall)
|
||||
{
|
||||
SlicedComplex buf;
|
||||
|
||||
r.info.op = G.g;
|
||||
// one trace
|
||||
corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G*qbr*gOut*g5*adj(qr)*g5*G);
|
||||
sliceSum(corr, buf, Tp);
|
||||
r.corr.clear();
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
{
|
||||
r.corr.push_back(TensorRemove(buf[t]));
|
||||
}
|
||||
r.info.trace = 1;
|
||||
result.push_back(r);
|
||||
// two traces
|
||||
corr = trace(ql*adj(gIn)*g5*adj(qbl)*g5*G)*trace(qbr*gOut*g5*adj(qr)*g5*G);
|
||||
sliceSum(corr, buf, Tp);
|
||||
r.corr.clear();
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
{
|
||||
r.corr.push_back(TensorRemove(buf[t]));
|
||||
}
|
||||
r.info.trace = 2;
|
||||
result.push_back(r);
|
||||
}
|
||||
saveResult(par().output, "weakNonEye3pt", result);
|
||||
}
|
||||
|
||||
END_MODULE_NAMESPACE
|
||||
|
||||
END_HADRONS_NAMESPACE
|
||||
|
||||
#endif // Hadrons_MContraction_WeakNonEye3pt_hpp_
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MFermion/FreeProp.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Vera Guelpers <vmg1n14@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MFermion/FreeProp.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Vera Guelpers <vmg1n14@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MFermion/GaugeProp.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MFermion/GaugeProp.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Guido Cossu <guido.cossu@ed.ac.uk>
|
||||
|
@ -4,9 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Electrify.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Vera Guelpers <Vera.Guelpers@ed.ac.uk>
|
||||
Author: Vera Guelpers <vmg1n14@soton.ac.uk>
|
||||
|
||||
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
|
||||
|
@ -4,9 +4,11 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Electrify.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Vera Guelpers <Vera.Guelpers@ed.ac.uk>
|
||||
Author: Vera Guelpers <vmg1n14@soton.ac.uk>
|
||||
|
||||
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
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/FundtoHirep.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Guido Cossu <guido.cossu@ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/FundtoHirep.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: pretidav <david.preti@csic.es>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/GaugeFix.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/GaugeFix.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Random.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Random.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/StochEm.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/StochEm.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/StoutSmearing.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/StoutSmearing.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Unit.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/Unit.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/UnitEm.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MGauge/UnitEm.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: James Harrison <jch1g10@soton.ac.uk>
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadA2AVectors.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadA2AVectors.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadBinary.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadBinary.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadCoarseEigenPack.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -32,4 +32,6 @@ using namespace Hadrons;
|
||||
using namespace MIO;
|
||||
|
||||
template class Grid::Hadrons::MIO::TLoadCoarseEigenPack<CoarseFermionEigenPack<FIMPL,HADRONS_DEFAULT_LANCZOS_NBASIS>>;
|
||||
|
||||
#ifdef GRID_DEFAULT_PRECISION_DOUBLE
|
||||
template class Grid::Hadrons::MIO::TLoadCoarseEigenPack<CoarseFermionEigenPack<FIMPL,HADRONS_DEFAULT_LANCZOS_NBASIS, FIMPLF>>;
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadCoarseEigenPack.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
@ -56,7 +56,11 @@ template <typename Pack>
|
||||
class TLoadCoarseEigenPack: public Module<LoadCoarseEigenPackPar>
|
||||
{
|
||||
public:
|
||||
typedef CoarseEigenPack<typename Pack::Field, typename Pack::CoarseField> BasePack;
|
||||
typedef typename Pack::Field Field;
|
||||
typedef typename Pack::FieldIo FieldIo;
|
||||
typedef typename Pack::CoarseField CoarseField;
|
||||
typedef typename Pack::CoarseFieldIo CoarseFieldIo;
|
||||
typedef CoarseEigenPack<Field, CoarseField, FieldIo, CoarseFieldIo> BasePack;
|
||||
template <typename vtype>
|
||||
using iImplScalar = iScalar<iScalar<iScalar<vtype>>>;
|
||||
typedef iImplScalar<typename Pack::Field::vector_type> SiteComplex;
|
||||
@ -74,7 +78,12 @@ public:
|
||||
virtual void execute(void);
|
||||
};
|
||||
|
||||
MODULE_REGISTER_TMP(LoadCoarseFermionEigenPack, ARG(TLoadCoarseEigenPack<CoarseFermionEigenPack<FIMPL, HADRONS_DEFAULT_LANCZOS_NBASIS>>), MIO);
|
||||
MODULE_REGISTER_TMP(LoadCoarseFermionEigenPack,
|
||||
ARG(TLoadCoarseEigenPack<CoarseFermionEigenPack<FIMPL, HADRONS_DEFAULT_LANCZOS_NBASIS>>), MIO);
|
||||
#ifdef GRID_DEFAULT_PRECISION_DOUBLE
|
||||
MODULE_REGISTER_TMP(LoadCoarseFermionEigenPackIo32,
|
||||
ARG(TLoadCoarseEigenPack<CoarseFermionEigenPack<FIMPL, HADRONS_DEFAULT_LANCZOS_NBASIS, FIMPLF>>), MIO);
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* TLoadCoarseEigenPack implementation *
|
||||
@ -106,18 +115,27 @@ std::vector<std::string> TLoadCoarseEigenPack<Pack>::getOutput(void)
|
||||
template <typename Pack>
|
||||
void TLoadCoarseEigenPack<Pack>::setup(void)
|
||||
{
|
||||
env().createGrid(par().Ls);
|
||||
env().createCoarseGrid(par().blockSize, par().Ls);
|
||||
GridBase *gridIo = nullptr, *gridCoarseIo = nullptr;
|
||||
|
||||
if (typeHash<Field>() != typeHash<FieldIo>())
|
||||
{
|
||||
gridIo = envGetRbGrid(FieldIo, par().Ls);
|
||||
}
|
||||
if (typeHash<CoarseField>() != typeHash<CoarseFieldIo>())
|
||||
{
|
||||
gridCoarseIo = envGetCoarseGrid(CoarseFieldIo, par().blockSize, par().Ls);
|
||||
}
|
||||
envCreateDerived(BasePack, Pack, getName(), par().Ls, par().sizeFine,
|
||||
par().sizeCoarse, env().getRbGrid(par().Ls),
|
||||
env().getCoarseGrid(par().blockSize, par().Ls));
|
||||
par().sizeCoarse, envGetRbGrid(Field, par().Ls),
|
||||
envGetCoarseGrid(CoarseField, par().blockSize, par().Ls),
|
||||
gridIo, gridCoarseIo);
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
template <typename Pack>
|
||||
void TLoadCoarseEigenPack<Pack>::execute(void)
|
||||
{
|
||||
auto cg = env().getCoarseGrid(par().blockSize, par().Ls);
|
||||
auto cg = envGetCoarseGrid(CoarseField, par().blockSize, par().Ls);
|
||||
auto &epack = envGetDerived(BasePack, Pack, getName());
|
||||
Lattice<SiteComplex> dummy(cg);
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadCosmHol.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadCosmHol.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadEigenPack.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadEigenPack.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadNersc.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MIO/LoadNersc.hpp
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
|
||||
|
@ -4,7 +4,7 @@ Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
Source file: Hadrons/Modules/MNPR/Amputate.cc
|
||||
|
||||
Copyright (C) 2015-2018
|
||||
Copyright (C) 2015-2019
|
||||
|
||||
Author: Antonin Portelli <antonin.portelli@me.com>
|
||||
Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user