diff --git a/lib/qcd/LatticeTheories.h b/lib/qcd/LatticeTheories.h index 981c7577..74c68d83 100644 --- a/lib/qcd/LatticeTheories.h +++ b/lib/qcd/LatticeTheories.h @@ -1,10 +1,10 @@ - /************************************************************************************* +/************************************************************************************* - Grid physics library, www.github.com/paboyle/Grid +Grid physics library, www.github.com/paboyle/Grid - Source file: ./lib/qcd/QCD.h +Source file: ./lib/qcd/QCD.h - Copyright (C) 2015 +Copyright (C) 2015 Author: Azusa Yamaguchi Author: Peter Boyle @@ -12,28 +12,30 @@ Author: Peter Boyle Author: neo Author: paboyle - 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 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. +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. +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 */ +See the full license in the file "LICENSE" in the top level distribution +directory +*************************************************************************************/ +/* END LEGAL */ #ifndef GRID_LT_H #define GRID_LT_H namespace Grid{ // First steps in the complete generalization of the Physics part +// Design not final namespace LatticeTheories { template @@ -50,7 +52,7 @@ struct LatticeGaugeTheory : public LatticeTheory { static const int Nd = Dimensions; static const int Nc = Colours; - template + template using iColourMatrix = iScalar > >; template using iLorentzColourMatrix = iVector >, Nd>; @@ -82,6 +84,13 @@ struct FermionicLatticeGaugeTheory using iHalfSpinVector = iScalar, Nhs> >; template using iHalfSpinColourVector = iScalar, Nhs> >; + + //tests + typedef iColourMatrix ColourMatrix; + typedef iColourMatrix ColourMatrixF; + typedef iColourMatrix ColourMatrixD; + + }; // Examples, not complete now. @@ -97,10 +106,6 @@ struct QCD : public FermionicLatticeGaugeTheory<4, 3, 4> { typedef FermionicLatticeGaugeTheory FLGT; - typedef FLGT::iColourMatrix ColourMatrix; - typedef FLGT::iColourMatrix ColourMatrixF; - typedef FLGT::iColourMatrix ColourMatrixD; - typedef FLGT::iSpinMatrix SpinMatrix; typedef FLGT::iSpinMatrix SpinMatrixF; typedef FLGT::iSpinMatrix SpinMatrixD; diff --git a/lib/qcd/QCD.h b/lib/qcd/QCD.h index e08c3dc8..0d8c28bc 100644 --- a/lib/qcd/QCD.h +++ b/lib/qcd/QCD.h @@ -46,7 +46,7 @@ namespace QCD { static const int Nc=3; static const int Ns=4; - static const int Nd=4; + static const int Nd=5; static const int Nhs=2; // half spinor static const int Nds=8; // double stored gauge field static const int Ngp=2; // gparity index range diff --git a/lib/qcd/action/gauge/WilsonGaugeAction.h b/lib/qcd/action/gauge/WilsonGaugeAction.h index 686c5470..059fcc58 100644 --- a/lib/qcd/action/gauge/WilsonGaugeAction.h +++ b/lib/qcd/action/gauge/WilsonGaugeAction.h @@ -76,7 +76,7 @@ class WilsonGaugeAction : public Action { // Staple in direction mu WilsonLoops::Staple(dSdU_mu, U, mu); dSdU_mu = Ta(Umu * dSdU_mu) * factor; - + PokeIndex(dSdU, dSdU_mu, mu); } }; @@ -88,57 +88,70 @@ class VariableWilsonGaugeAction : public Action { INHERIT_GIMPL_TYPES(Gimpl); private: - std::vector b_bulk;// bulk couplings - std::vector b_xdim;//extra dimension couplings + std::vector b_bulk; // bulk couplings + std::vector b_xdim; // extra dimension couplings GridBase *grid; LatticeComplex beta_xdim; LatticeComplex beta_xdim_shifted; LatticeComplex beta_bulk; + int bulk_volume; + public: VariableWilsonGaugeAction(std::vector bulk, std::vector xdim, - GridBase *_grid) + GridBase *_grid, bool openBC = false) : b_bulk(bulk), b_xdim(xdim), grid(_grid), beta_xdim(grid), beta_xdim_shifted(grid), - beta_bulk(grid) - { - //check that the grid is ok - //todo - int Ndim = Nd;//change later + beta_bulk(grid) { + // check that the grid is ok + // todo + int Ndim = Nd; // change later - LatticeComplex temp(grid); + std::vector FullDim = grid->GlobalDimensions(); + bulk_volume = 1; + for (int s = 0; s < Ndim - 1; s++) bulk_volume *= FullDim[s]; - Lattice > coor(grid); + LatticeComplex temp(grid); - LatticeCoordinate(coor, Ndim - 1); + Lattice > coor(grid); - int Nex = grid->_fdimensions[Ndim - 1]; - assert(b_bulk.size() == Nex); - assert(b_xdim.size() == Nex); + LatticeCoordinate(coor, Ndim - 1); - beta_xdim = zero; - for (int tau = 0; tau < Nex; tau++) { - temp = b_xdim[tau]; - beta_xdim = where(coor == tau, temp, beta_xdim); - } + int Nex = FullDim[Ndim - 1]; + assert(b_bulk.size() == Nex); + assert(b_xdim.size() == Nex); - beta_xdim_shifted = Cshift(beta_xdim, Ndim - 1, -1); + beta_xdim = zero; + for (int tau = 0; tau < Nex - 1; tau++) { + temp = b_xdim[tau]; + beta_xdim = where(coor == tau, temp, beta_xdim); + } - beta_bulk = zero; - for (int tau = 0; tau < Nex; tau++) { - temp = b_bulk[tau]; - beta_bulk = where(coor == tau, temp, beta_bulk); - } - }; + if (!openBC) { + temp = b_xdim[Nex - 1]; + beta_xdim = where(coor == Nex - 1, temp, beta_xdim); + } + + beta_xdim_shifted = Cshift(beta_xdim, Ndim - 1, -1); + + beta_bulk = zero; + for (int tau = 0; tau < Nex; tau++) { + temp = b_bulk[tau]; + beta_bulk = where(coor == tau, temp, beta_bulk); + } + + std::cout << beta_xdim << std::endl; + std::cout << beta_xdim_shifted << std::endl; + }; virtual void refresh(const GaugeField &U, GridParallelRNG &pRNG){}; // noop as no pseudoferms virtual RealD S(const GaugeField &Umu) { - int Ndim = Nd; // change later for generality + int Ndim = Nd; // change later for generality conformable(grid, Umu._grid); std::vector U(Ndim, grid); @@ -150,19 +163,34 @@ class VariableWilsonGaugeAction : public Action { LatticeComplex dirPlaq(grid); LatticeComplex Plaq(grid); + LatticeComplex SumdirPlaq(grid); + RealD OneOnNc = 1.0 / Real(Nc); ///////////// // Lower dim plaquettes ///////////// Plaq = zero; + SumdirPlaq = zero; for (int mu = 1; mu < Ndim - 1; mu++) { for (int nu = 0; nu < mu; nu++) { WilsonLoops::traceDirPlaquette(dirPlaq, U, mu, nu); + SumdirPlaq += dirPlaq; Plaq = Plaq + (1.0 - dirPlaq * OneOnNc) * beta_bulk; } } + double faces = (1.0 * (Nd - 1) * (Nd - 2)) / 2.0; + SumdirPlaq *= OneOnNc / (RealD(bulk_volume) * faces); + + // print slices in the extra dimension + int Nex = grid->_fdimensions[Ndim - 1]; + std::vector plaq_ex(Nex); + sliceSum(SumdirPlaq, plaq_ex, Ndim - 1); + for (int ex = 0; ex < Nex; ex++) + std::cout << GridLogMessage << "Bulk plaq[" << ex + << "] = " << TensorRemove(plaq_ex[ex]).real() << std::endl; + ///////////// // Extra dimension ///////////// @@ -186,74 +214,66 @@ class VariableWilsonGaugeAction : public Action { // for the higher dimension plaquettes take the upper plaq of the // 4d slice and multiply by beta[s] and the lower and multiply by beta[s-1] - // todo // derivative of links mu = 0, ... Nd-1 inside plaq (mu,5) // for these I need upper and lower staples separated // each multiplied with their own beta // derivative of links mu = 5 // living on the same slice, share the same beta + conformable(grid, U._grid); + int Ndim = Nd; // change later + RealD factor = 0.5 / RealD(Nc); -conformable(grid,U._grid); -int Ndim = Nd; // change later -RealD factor = 0.5 / RealD(Nc); + GaugeLinkField Umu(grid); + GaugeLinkField dSdU_mu(grid); + GaugeLinkField staple(grid); -GaugeLinkField Umu(grid); -GaugeLinkField dSdU_mu(grid); -GaugeLinkField staple(grid); + for (int mu = 0; mu < Ndim; mu++) { + Umu = PeekIndex(U, mu); + dSdU_mu = zero; -for (int mu = 0; mu < Ndim; mu++) { - Umu = PeekIndex(U, mu); - dSdU_mu = zero; + for (int nu = 0; nu < Ndim; nu++) { + if (nu != mu) { + if ((mu < (Ndim - 1)) && (nu < (Ndim - 1))) { + // Spacelike case apply beta space + WilsonLoops::Staple(staple, U, mu, nu); + staple = staple * beta_bulk; + dSdU_mu += staple; - for (int nu = 0; nu < Ndim; nu++) { - if (nu != mu) { - if ((mu < (Ndim - 1)) && (nu < (Ndim - 1))) { - // Spacelike case apply beta space - WilsonLoops::Staple(staple, U, mu, nu); - staple = staple * beta_bulk; - dSdU_mu += staple; + } else if (mu == (Ndim - 1)) { + // nu space; mu time link + assert(nu < (Ndim - 1)); + assert(mu == (Ndim - 1)); - } else if (mu == (Ndim - 1)) { - // nu space; mu time link - assert(nu < (Ndim - 1)); - assert(mu == (Ndim - 1)); + // mu==tau dir link deriv, nu spatial + WilsonLoops::Staple(staple, U, mu, nu); + staple = staple * beta_xdim; + dSdU_mu += staple; - // mu==tau dir link deriv, nu spatial - WilsonLoops::Staple(staple, U, mu, nu); - staple = staple * beta_xdim; - dSdU_mu += staple; + } else { + assert(mu < (Ndim - 1)); + assert(nu == (Ndim - 1)); - } else { - assert(mu < (Ndim - 1)); - assert(nu == (Ndim - 1)); + // nu time; mu space link - // nu time; mu space link + // staple forwards in tau + WilsonLoops::StapleUpper(staple, U, mu, nu); + staple = staple * beta_xdim; + dSdU_mu += staple; - // staple forwards in tau - WilsonLoops::StapleUpper(staple, U, mu, nu); - staple = staple * beta_xdim; - dSdU_mu += staple; - - // staple backwards in tau - WilsonLoops::StapleLower(staple, U, mu, nu); - staple = staple * beta_xdim_shifted; - dSdU_mu += staple; + // staple backwards in tau + WilsonLoops::StapleLower(staple, U, mu, nu); + staple = staple * beta_xdim_shifted; + dSdU_mu += staple; + } + } } + + dSdU_mu = Ta(Umu * dSdU_mu) * factor; + PokeIndex(dSdU, dSdU_mu, mu); } - } - - dSdU_mu = Ta(Umu * dSdU_mu) * factor; - PokeIndex(dSdU, dSdU_mu, mu); - } - - - }; }; - - - } } diff --git a/lib/qcd/hmc/GenericHMCrunner.h b/lib/qcd/hmc/GenericHMCrunner.h index bad3b9cf..047b9c9e 100644 --- a/lib/qcd/hmc/GenericHMCrunner.h +++ b/lib/qcd/hmc/GenericHMCrunner.h @@ -23,9 +23,9 @@ 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 -*************************************************************************************/ + See the full license in the file "LICENSE" in the top level distribution + directory + *************************************************************************************/ /* END LEGAL */ #ifndef GENERIC_HMC_RUNNER #define GENERIC_HMC_RUNNER @@ -33,165 +33,169 @@ directory namespace Grid { namespace QCD { -// Virtual Class for HMC specific for gauge theories -// implement a specific theory by defining the BuildTheAction -template -class BinaryHmcRunnerTemplate { - public: - INHERIT_FIELD_TYPES(Implementation); - typedef Implementation ImplPolicy; + // Virtual Class for HMC specific for gauge theories + // implement a specific theory by defining the BuildTheAction + template + class BinaryHmcRunnerTemplate { + public: + INHERIT_FIELD_TYPES(Implementation); + typedef Implementation ImplPolicy; - enum StartType_t { ColdStart, HotStart, TepidStart, CheckpointStart }; + enum StartType_t { ColdStart, + HotStart, + TepidStart, + CheckpointStart }; - ActionSet TheAction; - - // A vector of HmcObservable - // that can be injected from outside - std::vector< HmcObservable* > ObservablesList; + ActionSet TheAction; - IntegratorParameters MDparameters; + // A vector of HmcObservable + // that can be injected from outside + std::vector *> + ObservablesList; - GridCartesian *UGrid; - GridCartesian *FGrid; - GridRedBlackCartesian *UrbGrid; - GridRedBlackCartesian *FrbGrid; + IntegratorParameters MDparameters; - std::vector SerialSeed; - std::vector ParallelSeed; + GridCartesian * UGrid; + GridCartesian * FGrid; + GridRedBlackCartesian *UrbGrid; + GridRedBlackCartesian *FrbGrid; - void RNGSeeds(std::vector S, std::vector P){ - SerialSeed = S; - ParallelSeed = P; - } + std::vector SerialSeed; + std::vector ParallelSeed; - virtual void BuildTheAction(int argc, char **argv) = 0; // necessary? + void RNGSeeds(std::vector S, std::vector P) { + SerialSeed = S; + ParallelSeed = P; + } - // A couple of wrapper classes - template - void Run(int argc, char **argv, IOCheckpointer &Checkpoint) { - NoSmearing S; - Runner(argc, argv, Checkpoint, S); - } + virtual void BuildTheAction(int argc, char **argv) = 0; // necessary? - template - void Run(int argc, char **argv, IOCheckpointer &CP, SmearingPolicy &S) { - Runner(argc, argv, CP, S); - } - ////////////////////////////// + // A couple of wrapper classes + template + void Run(int argc, char **argv, IOCheckpointer &Checkpoint) { + NoSmearing S; + Runner(argc, argv, Checkpoint, S); + } - template - void Runner(int argc, char **argv, IOCheckpointer &Checkpoint, - SmearingPolicy &Smearing) { - StartType_t StartType = HotStart; + template + void Run(int argc, char **argv, IOCheckpointer &CP, SmearingPolicy &S) { + Runner(argc, argv, CP, S); + } + ////////////////////////////// - std::string arg; + template + void Runner(int argc, + char ** argv, + IOCheckpointer &Checkpoint, + SmearingPolicy &Smearing) { + StartType_t StartType = HotStart; - if (GridCmdOptionExists(argv, argv + argc, "--StartType")) { - arg = GridCmdOptionPayload(argv, argv + argc, "--StartType"); - if (arg == "HotStart") { - StartType = HotStart; - } else if (arg == "ColdStart") { - StartType = ColdStart; - } else if (arg == "TepidStart") { - StartType = TepidStart; - } else if (arg == "CheckpointStart") { - StartType = CheckpointStart; - } else { - std::cout << GridLogError << "Unrecognized option in --StartType\n"; - std::cout - << GridLogError - << "Valid [HotStart, ColdStart, TepidStart, CheckpointStart]\n"; - assert(0); + std::string arg; + + if (GridCmdOptionExists(argv, argv + argc, "--StartType")) { + arg = GridCmdOptionPayload(argv, argv + argc, "--StartType"); + if (arg == "HotStart") { + StartType = HotStart; + } else if (arg == "ColdStart") { + StartType = ColdStart; + } else if (arg == "TepidStart") { + StartType = TepidStart; + } else if (arg == "CheckpointStart") { + StartType = CheckpointStart; + } else { + std::cout << GridLogError << "Unrecognized option in --StartType\n"; + std::cout + << GridLogError + << "Valid [HotStart, ColdStart, TepidStart, CheckpointStart]\n"; + assert(0); + } } + + int StartTraj = 0; + if (GridCmdOptionExists(argv, argv + argc, "--StartTrajectory")) { + arg = GridCmdOptionPayload(argv, argv + argc, "--StartTrajectory"); + std::vector ivec(0); + GridCmdOptionIntVector(arg, ivec); + StartTraj = ivec[0]; + } + + int NumTraj = 1; + if (GridCmdOptionExists(argv, argv + argc, "--Trajectories")) { + arg = GridCmdOptionPayload(argv, argv + argc, "--Trajectories"); + std::vector ivec(0); + GridCmdOptionIntVector(arg, ivec); + NumTraj = ivec[0]; + } + + int NumThermalizations = 10; + if (GridCmdOptionExists(argv, argv + argc, "--Thermalizations")) { + arg = GridCmdOptionPayload(argv, argv + argc, "--Thermalizations"); + std::vector ivec(0); + GridCmdOptionIntVector(arg, ivec); + NumThermalizations = ivec[0]; + } + + GridSerialRNG sRNG; + GridParallelRNG pRNG(UGrid); + Field U(UGrid); + + typedef MinimumNorm2 + IntegratorType; // change here to change the algorithm + IntegratorType MDynamics(UGrid, MDparameters, TheAction, Smearing); + + HMCparameters HMCpar; + HMCpar.StartTrajectory = StartTraj; + HMCpar.Trajectories = NumTraj; + HMCpar.NoMetropolisUntil = NumThermalizations; + + if (StartType == HotStart) { + // Hot start + HMCpar.MetropolisTest = true; + sRNG.SeedFixedIntegers(SerialSeed); + pRNG.SeedFixedIntegers(ParallelSeed); + Implementation::HotConfiguration(pRNG, U); + } else if (StartType == ColdStart) { + // Cold start + HMCpar.MetropolisTest = true; + sRNG.SeedFixedIntegers(SerialSeed); + pRNG.SeedFixedIntegers(ParallelSeed); + Implementation::ColdConfiguration(pRNG, U); + } else if (StartType == TepidStart) { + // Tepid start + HMCpar.MetropolisTest = true; + sRNG.SeedFixedIntegers(SerialSeed); + pRNG.SeedFixedIntegers(ParallelSeed); + Implementation::TepidConfiguration(pRNG, U); + } else if (StartType == CheckpointStart) { + HMCpar.MetropolisTest = true; + // CheckpointRestart + Checkpoint.CheckpointRestore(StartTraj, U, sRNG, pRNG); + } + + Smearing.set_Field(U); + + HybridMonteCarlo HMC(HMCpar, MDynamics, sRNG, pRNG, U); + + for (int obs = 0; obs < ObservablesList.size(); obs++) + HMC.AddObservable(ObservablesList[obs]); + + // Run it + HMC.evolve(); } + }; - int StartTraj = 0; - if (GridCmdOptionExists(argv, argv + argc, "--StartTrajectory")) { - arg = GridCmdOptionPayload(argv, argv + argc, "--StartTrajectory"); - std::vector ivec(0); - GridCmdOptionIntVector(arg, ivec); - StartTraj = ivec[0]; - } + // These are for gauge fields + typedef BinaryHmcRunnerTemplate BinaryHmcRunner; + typedef BinaryHmcRunnerTemplate BinaryHmcRunnerF; + typedef BinaryHmcRunnerTemplate BinaryHmcRunnerD; - int NumTraj = 1; - if (GridCmdOptionExists(argv, argv + argc, "--Trajectories")) { - arg = GridCmdOptionPayload(argv, argv + argc, "--Trajectories"); - std::vector ivec(0); - GridCmdOptionIntVector(arg, ivec); - NumTraj = ivec[0]; - } + template + using BinaryHmcRunnerTemplateHirep = BinaryHmcRunnerTemplate; - int NumThermalizations = 10; - if (GridCmdOptionExists(argv, argv + argc, "--Thermalizations")) { - arg = GridCmdOptionPayload(argv, argv + argc, "--Thermalizations"); - std::vector ivec(0); - GridCmdOptionIntVector(arg, ivec); - NumThermalizations = ivec[0]; - } - - GridSerialRNG sRNG; - GridParallelRNG pRNG(UGrid); - Field U(UGrid); - - typedef MinimumNorm2 - IntegratorType; // change here to change the algorithm - IntegratorType MDynamics(UGrid, MDparameters, TheAction, Smearing); - - HMCparameters HMCpar; - HMCpar.StartTrajectory = StartTraj; - HMCpar.Trajectories = NumTraj; - HMCpar.NoMetropolisUntil = NumThermalizations; - - if (StartType == HotStart) { - // Hot start - HMCpar.MetropolisTest = true; - sRNG.SeedFixedIntegers(SerialSeed); - pRNG.SeedFixedIntegers(ParallelSeed); - Implementation::HotConfiguration(pRNG, U); - } else if (StartType == ColdStart) { - // Cold start - HMCpar.MetropolisTest = true; - sRNG.SeedFixedIntegers(SerialSeed); - pRNG.SeedFixedIntegers(ParallelSeed); - Implementation::ColdConfiguration(pRNG, U); - } else if (StartType == TepidStart) { - // Tepid start - HMCpar.MetropolisTest = true; - sRNG.SeedFixedIntegers(SerialSeed); - pRNG.SeedFixedIntegers(ParallelSeed); - Implementation::TepidConfiguration(pRNG, U); - } else if (StartType == CheckpointStart) { - HMCpar.MetropolisTest = true; - // CheckpointRestart - Checkpoint.CheckpointRestore(StartTraj, U, sRNG, pRNG); - } - - Smearing.set_Field(U); - - HybridMonteCarlo HMC(HMCpar, MDynamics, sRNG, pRNG, U); - - for (int obs = 0; obs < ObservablesList.size(); obs++) - HMC.AddObservable(ObservablesList[obs]); - - // Run it - HMC.evolve(); - } -}; - -// These are for gauge fields -typedef BinaryHmcRunnerTemplate BinaryHmcRunner; -typedef BinaryHmcRunnerTemplate BinaryHmcRunnerF; -typedef BinaryHmcRunnerTemplate BinaryHmcRunnerD; - -template -using BinaryHmcRunnerTemplateHirep = - BinaryHmcRunnerTemplate; - - - - typedef BinaryHmcRunnerTemplate ScalarBinaryHmcRunner; + typedef BinaryHmcRunnerTemplate + ScalarBinaryHmcRunner; } } #endif diff --git a/lib/qcd/hmc/HMC.h b/lib/qcd/hmc/HMC.h index a30242d3..e39faae0 100644 --- a/lib/qcd/hmc/HMC.h +++ b/lib/qcd/hmc/HMC.h @@ -34,7 +34,6 @@ directory * @brief Classes for Hybrid Monte Carlo update * * @author Guido Cossu - * Time-stamp: <2015-07-30 16:58:26 neo> */ //-------------------------------------------------------------------- #ifndef HMC_INCLUDED diff --git a/lib/qcd/hmc/integrators/Integrator.h b/lib/qcd/hmc/integrators/Integrator.h index 43974f48..ec3d31fe 100644 --- a/lib/qcd/hmc/integrators/Integrator.h +++ b/lib/qcd/hmc/integrators/Integrator.h @@ -29,14 +29,6 @@ directory *************************************************************************************/ /* END LEGAL */ //-------------------------------------------------------------------- -/*! @file Integrator.h - * @brief Classes for the Molecular Dynamics integrator - * - * @author Guido Cossu - * Time-stamp: <2015-07-30 16:21:29 neo> - */ -//-------------------------------------------------------------------- - #ifndef INTEGRATOR_INCLUDED #define INTEGRATOR_INCLUDED diff --git a/lib/qcd/utils/WilsonLoops.h b/lib/qcd/utils/WilsonLoops.h index 3051f830..e47040ee 100644 --- a/lib/qcd/utils/WilsonLoops.h +++ b/lib/qcd/utils/WilsonLoops.h @@ -235,7 +235,7 @@ public: std::vector U(Nd, grid); for (int d = 0; d < Nd; d++) { - U[d] = PeekIndex(Umu, d); + U[d] = PeekIndex(Umu, d);// some redundant copies } // mu @@ -268,7 +268,7 @@ public: std::vector U(Nd, grid); for (int d = 0; d < Nd; d++) { - U[d] = PeekIndex(Umu, d); + U[d] = PeekIndex(Umu, d);// some redundant copies } // mu diff --git a/tests/hmc/Test_hmc_WilsonGauge_Binary.cc b/tests/hmc/Test_hmc_WilsonGauge_Binary.cc index 098e23e4..9a9c3e8e 100644 --- a/tests/hmc/Test_hmc_WilsonGauge_Binary.cc +++ b/tests/hmc/Test_hmc_WilsonGauge_Binary.cc @@ -79,12 +79,16 @@ class HmcRunner : public BinaryHmcRunner { // Gauge action int Ls = UGrid->_gdimensions[Nd - 1]; - std::vector betat(Ls,5); + std::vector betat(Ls); std::vector betas(Ls); - betas={5,6,6,5}; - //std:cout << "Betas:" << betas << std::endl; - //VariableWilsonGaugeActionR Waction(betas, betat, UGrid); - WilsonGaugeActionR Waction(5.6); + //betat={5,6,6,6,6,6,6,5}; + betat={1,1,1,0,1,1,1,1}; + //betas={5.2,5.5,5.8,6,6,5.8,5.5,5.2}; + betas={0,0,0,0,0,0,0,0}; + bool openBC = false; + std:cout << GridLogMessage << "Betas: " << betas << std::endl; + VariableWilsonGaugeActionR Waction(betas, betat, UGrid, openBC); + //WilsonGaugeActionR Waction(5.6); // Collect actions ActionLevel Level1(1);