mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-18 07:47:06 +01:00
Plaq, Rectangle, Iwasaki, Symanzik and DBW2 workign and HMC regresses to http://arxiv.org/pdf/hep-lat/0610075.pdf
This commit is contained in:
@ -166,7 +166,7 @@ void Grid_init(int *argc,char ***argv)
|
||||
std::cout<<GridLogMessage<<"--mpi n.n.n.n : default MPI decomposition"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"--omp n : default number of OMP threads"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"--grid n.n.n.n : default Grid size"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"--log list : comma separted list of streams from Error,Warning,Message,Performance,Iterative,Debug"<<std::endl;
|
||||
std::cout<<GridLogMessage<<"--log list : comma separted list of streams from Error,Warning,Message,Performance,Iterative,Integrator,Debug"<<std::endl;
|
||||
}
|
||||
|
||||
if( GridCmdOptionExists(*argv,*argv+*argc,"--log") ){
|
||||
|
@ -11,6 +11,7 @@ GridLogger GridLogMessage (1,"Message");
|
||||
GridLogger GridLogDebug (1,"Debug");
|
||||
GridLogger GridLogPerformance(1,"Performance");
|
||||
GridLogger GridLogIterative (1,"Iterative");
|
||||
GridLogger GridLogIntegrator (1,"Integrator");
|
||||
|
||||
void GridLogConfigure(std::vector<std::string> &logstreams)
|
||||
{
|
||||
@ -20,6 +21,7 @@ void GridLogConfigure(std::vector<std::string> &logstreams)
|
||||
GridLogIterative.Active(0);
|
||||
GridLogDebug.Active(0);
|
||||
GridLogPerformance.Active(0);
|
||||
GridLogIntegrator.Active(0);
|
||||
|
||||
for(int i=0;i<logstreams.size();i++){
|
||||
if ( logstreams[i]== std::string("Error") ) GridLogError.Active(1);
|
||||
@ -28,6 +30,7 @@ void GridLogConfigure(std::vector<std::string> &logstreams)
|
||||
if ( logstreams[i]== std::string("Iterative") ) GridLogIterative.Active(1);
|
||||
if ( logstreams[i]== std::string("Debug") ) GridLogDebug.Active(1);
|
||||
if ( logstreams[i]== std::string("Performance") ) GridLogPerformance.Active(1);
|
||||
if ( logstreams[i]== std::string("Integrator" ) ) GridLogIntegrator.Active(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,11 +55,6 @@ void Grid_unquiesce_nodes(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
std::ostream& operator<< (std::ostream& stream, const GridTime& time)
|
||||
{
|
||||
// stream << time.count()<<" ms";
|
||||
return stream;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ namespace Grid {
|
||||
|
||||
// Dress the output; use std::chrono for time stamping via the StopWatch class
|
||||
|
||||
std::ostream& operator<< (std::ostream& stream, const GridTime& time);
|
||||
|
||||
class Logger {
|
||||
protected:
|
||||
@ -49,6 +48,7 @@ extern GridLogger GridLogMessage;
|
||||
extern GridLogger GridLogDebug ;
|
||||
extern GridLogger GridLogPerformance;
|
||||
extern GridLogger GridLogIterative ;
|
||||
extern GridLogger GridLogIntegrator ;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
HFILES=./algorithms/approx/bigfloat.h ./algorithms/approx/bigfloat_double.h ./algorithms/approx/Chebyshev.h ./algorithms/approx/MultiShiftFunction.h ./algorithms/approx/Remez.h ./algorithms/approx/Zolotarev.h ./algorithms/CoarsenedMatrix.h ./algorithms/iterative/AdefGeneric.h ./algorithms/iterative/ConjugateGradient.h ./algorithms/iterative/ConjugateGradientMultiShift.h ./algorithms/iterative/ConjugateResidual.h ./algorithms/iterative/DenseMatrix.h ./algorithms/iterative/EigenSort.h ./algorithms/iterative/Francis.h ./algorithms/iterative/Householder.h ./algorithms/iterative/ImplicitlyRestartedLanczos.h ./algorithms/iterative/Matrix.h ./algorithms/iterative/MatrixUtils.h ./algorithms/iterative/NormalEquations.h ./algorithms/iterative/PrecConjugateResidual.h ./algorithms/iterative/PrecGeneralisedConjugateResidual.h ./algorithms/iterative/SchurRedBlack.h ./algorithms/LinearOperator.h ./algorithms/Preconditioner.h ./algorithms/SparseMatrix.h ./Algorithms.h ./AlignedAllocator.h ./cartesian/Cartesian_base.h ./cartesian/Cartesian_full.h ./cartesian/Cartesian_red_black.h ./Cartesian.h ./communicator/Communicator_base.h ./Communicator.h ./cshift/Cshift_common.h ./cshift/Cshift_mpi.h ./cshift/Cshift_none.h ./Cshift.h ./Grid.h ./Init.h ./lattice/Lattice_arith.h ./lattice/Lattice_base.h ./lattice/Lattice_comparison.h ./lattice/Lattice_comparison_utils.h ./lattice/Lattice_conformable.h ./lattice/Lattice_coordinate.h ./lattice/Lattice_ET.h ./lattice/Lattice_local.h ./lattice/Lattice_overload.h ./lattice/Lattice_peekpoke.h ./lattice/Lattice_reality.h ./lattice/Lattice_reduction.h ./lattice/Lattice_rng.h ./lattice/Lattice_trace.h ./lattice/Lattice_transfer.h ./lattice/Lattice_transpose.h ./lattice/Lattice_unary.h ./lattice/Lattice_where.h ./Lattice.h ./Log.h ./Old/Tensor_peek.h ./Old/Tensor_poke.h ./parallelIO/BinaryIO.h ./parallelIO/NerscIO.h ./PerfCount.h ./pugixml/pugixml.h ./qcd/action/ActionBase.h ./qcd/action/ActionParams.h ./qcd/action/Actions.h ./qcd/action/fermion/CayleyFermion5D.h ./qcd/action/fermion/ContinuedFractionFermion5D.h ./qcd/action/fermion/DomainWallFermion.h ./qcd/action/fermion/FermionOperator.h ./qcd/action/fermion/FermionOperatorImpl.h ./qcd/action/fermion/g5HermitianLinop.h ./qcd/action/fermion/MobiusFermion.h ./qcd/action/fermion/MobiusZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonCayleyTanhFermion.h ./qcd/action/fermion/OverlapWilsonCayleyZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonContfracTanhFermion.h ./qcd/action/fermion/OverlapWilsonContfracZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonPartialFractionTanhFermion.h ./qcd/action/fermion/OverlapWilsonPartialFractionZolotarevFermion.h ./qcd/action/fermion/PartialFractionFermion5D.h ./qcd/action/fermion/ScaledShamirFermion.h ./qcd/action/fermion/ShamirZolotarevFermion.h ./qcd/action/fermion/WilsonCompressor.h ./qcd/action/fermion/WilsonFermion.h ./qcd/action/fermion/WilsonFermion5D.h ./qcd/action/fermion/WilsonKernels.h ./qcd/action/fermion/WilsonTMFermion.h ./qcd/action/gauge/WilsonGaugeAction.h ./qcd/action/pseudofermion/EvenOddSchurDifferentiable.h ./qcd/action/pseudofermion/OneFlavourEvenOddRational.h ./qcd/action/pseudofermion/OneFlavourEvenOddRationalRatio.h ./qcd/action/pseudofermion/OneFlavourRational.h ./qcd/action/pseudofermion/OneFlavourRationalRatio.h ./qcd/action/pseudofermion/TwoFlavour.h ./qcd/action/pseudofermion/TwoFlavourEvenOdd.h ./qcd/action/pseudofermion/TwoFlavourEvenOddRatio.h ./qcd/action/pseudofermion/TwoFlavourRatio.h ./qcd/hmc/HMC.h ./qcd/hmc/integrators/Integrator.h ./qcd/hmc/integrators/Integrator_algorithm.h ./qcd/QCD.h ./qcd/spin/Dirac.h ./qcd/spin/TwoSpinor.h ./qcd/utils/CovariantCshift.h ./qcd/utils/LinalgUtils.h ./qcd/utils/SpaceTimeGrid.h ./qcd/utils/SUn.h ./qcd/utils/WilsonLoops.h ./serialisation/BaseIO.h ./serialisation/BinaryIO.h ./serialisation/MacroMagic.h ./serialisation/Serialisation.h ./serialisation/TextIO.h ./serialisation/XmlIO.h ./simd/Avx512Asm.h ./simd/Grid_avx.h ./simd/Grid_avx512.h ./simd/Grid_empty.h ./simd/Grid_imci.h ./simd/Grid_neon.h ./simd/Grid_qpx.h ./simd/Grid_sse4.h ./simd/Grid_vector_types.h ./simd/Grid_vector_unops.h ./Simd.h ./stencil/Lebesgue.h ./Stencil.h ./tensors/Tensor_arith.h ./tensors/Tensor_arith_add.h ./tensors/Tensor_arith_mac.h ./tensors/Tensor_arith_mul.h ./tensors/Tensor_arith_scalar.h ./tensors/Tensor_arith_sub.h ./tensors/Tensor_class.h ./tensors/Tensor_determinant.h ./tensors/Tensor_exp.h ./tensors/Tensor_extract_merge.h ./tensors/Tensor_index.h ./tensors/Tensor_inner.h ./tensors/Tensor_logical.h ./tensors/Tensor_outer.h ./tensors/Tensor_reality.h ./tensors/Tensor_Ta.h ./tensors/Tensor_trace.h ./tensors/Tensor_traits.h ./tensors/Tensor_transpose.h ./tensors/Tensor_unary.h ./Tensors.h ./Threads.h ./Timer.h
|
||||
HFILES=./algorithms/approx/bigfloat.h ./algorithms/approx/bigfloat_double.h ./algorithms/approx/Chebyshev.h ./algorithms/approx/MultiShiftFunction.h ./algorithms/approx/Remez.h ./algorithms/approx/Zolotarev.h ./algorithms/CoarsenedMatrix.h ./algorithms/iterative/AdefGeneric.h ./algorithms/iterative/ConjugateGradient.h ./algorithms/iterative/ConjugateGradientMultiShift.h ./algorithms/iterative/ConjugateResidual.h ./algorithms/iterative/DenseMatrix.h ./algorithms/iterative/EigenSort.h ./algorithms/iterative/Francis.h ./algorithms/iterative/Householder.h ./algorithms/iterative/ImplicitlyRestartedLanczos.h ./algorithms/iterative/Matrix.h ./algorithms/iterative/MatrixUtils.h ./algorithms/iterative/NormalEquations.h ./algorithms/iterative/PrecConjugateResidual.h ./algorithms/iterative/PrecGeneralisedConjugateResidual.h ./algorithms/iterative/SchurRedBlack.h ./algorithms/LinearOperator.h ./algorithms/Preconditioner.h ./algorithms/SparseMatrix.h ./Algorithms.h ./AlignedAllocator.h ./cartesian/Cartesian_base.h ./cartesian/Cartesian_full.h ./cartesian/Cartesian_red_black.h ./Cartesian.h ./communicator/Communicator_base.h ./Communicator.h ./cshift/Cshift_common.h ./cshift/Cshift_mpi.h ./cshift/Cshift_none.h ./Cshift.h ./Grid.h ./Init.h ./lattice/Lattice_arith.h ./lattice/Lattice_base.h ./lattice/Lattice_comparison.h ./lattice/Lattice_comparison_utils.h ./lattice/Lattice_conformable.h ./lattice/Lattice_coordinate.h ./lattice/Lattice_ET.h ./lattice/Lattice_local.h ./lattice/Lattice_overload.h ./lattice/Lattice_peekpoke.h ./lattice/Lattice_reality.h ./lattice/Lattice_reduction.h ./lattice/Lattice_rng.h ./lattice/Lattice_trace.h ./lattice/Lattice_transfer.h ./lattice/Lattice_transpose.h ./lattice/Lattice_unary.h ./lattice/Lattice_where.h ./Lattice.h ./Log.h ./Old/Tensor_peek.h ./Old/Tensor_poke.h ./parallelIO/BinaryIO.h ./parallelIO/NerscIO.h ./PerfCount.h ./pugixml/pugixml.h ./qcd/action/ActionBase.h ./qcd/action/ActionParams.h ./qcd/action/Actions.h ./qcd/action/fermion/CayleyFermion5D.h ./qcd/action/fermion/ContinuedFractionFermion5D.h ./qcd/action/fermion/DomainWallFermion.h ./qcd/action/fermion/FermionOperator.h ./qcd/action/fermion/FermionOperatorImpl.h ./qcd/action/fermion/g5HermitianLinop.h ./qcd/action/fermion/MobiusFermion.h ./qcd/action/fermion/MobiusZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonCayleyTanhFermion.h ./qcd/action/fermion/OverlapWilsonCayleyZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonContfracTanhFermion.h ./qcd/action/fermion/OverlapWilsonContfracZolotarevFermion.h ./qcd/action/fermion/OverlapWilsonPartialFractionTanhFermion.h ./qcd/action/fermion/OverlapWilsonPartialFractionZolotarevFermion.h ./qcd/action/fermion/PartialFractionFermion5D.h ./qcd/action/fermion/ScaledShamirFermion.h ./qcd/action/fermion/ShamirZolotarevFermion.h ./qcd/action/fermion/WilsonCompressor.h ./qcd/action/fermion/WilsonFermion.h ./qcd/action/fermion/WilsonFermion5D.h ./qcd/action/fermion/WilsonKernels.h ./qcd/action/fermion/WilsonTMFermion.h ./qcd/action/gauge/PlaqPlusRectangleAction.h ./qcd/action/gauge/WilsonGaugeAction.h ./qcd/action/pseudofermion/EvenOddSchurDifferentiable.h ./qcd/action/pseudofermion/OneFlavourEvenOddRational.h ./qcd/action/pseudofermion/OneFlavourEvenOddRationalRatio.h ./qcd/action/pseudofermion/OneFlavourRational.h ./qcd/action/pseudofermion/OneFlavourRationalRatio.h ./qcd/action/pseudofermion/TwoFlavour.h ./qcd/action/pseudofermion/TwoFlavourEvenOdd.h ./qcd/action/pseudofermion/TwoFlavourEvenOddRatio.h ./qcd/action/pseudofermion/TwoFlavourRatio.h ./qcd/hmc/HMC.h ./qcd/hmc/HmcRunner.h ./qcd/hmc/integrators/Integrator.h ./qcd/hmc/integrators/Integrator_algorithm.h ./qcd/hmc/NerscCheckpointer.h ./qcd/QCD.h ./qcd/spin/Dirac.h ./qcd/spin/TwoSpinor.h ./qcd/utils/CovariantCshift.h ./qcd/utils/LinalgUtils.h ./qcd/utils/SpaceTimeGrid.h ./qcd/utils/SUn.h ./qcd/utils/WilsonLoops.h ./serialisation/BaseIO.h ./serialisation/BinaryIO.h ./serialisation/MacroMagic.h ./serialisation/Serialisation.h ./serialisation/TextIO.h ./serialisation/XmlIO.h ./simd/Avx512Asm.h ./simd/Grid_avx.h ./simd/Grid_avx512.h ./simd/Grid_empty.h ./simd/Grid_imci.h ./simd/Grid_neon.h ./simd/Grid_qpx.h ./simd/Grid_sse4.h ./simd/Grid_vector_types.h ./simd/Grid_vector_unops.h ./Simd.h ./stencil/Lebesgue.h ./Stencil.h ./tensors/Tensor_arith.h ./tensors/Tensor_arith_add.h ./tensors/Tensor_arith_mac.h ./tensors/Tensor_arith_mul.h ./tensors/Tensor_arith_scalar.h ./tensors/Tensor_arith_sub.h ./tensors/Tensor_class.h ./tensors/Tensor_determinant.h ./tensors/Tensor_exp.h ./tensors/Tensor_extract_merge.h ./tensors/Tensor_index.h ./tensors/Tensor_inner.h ./tensors/Tensor_logical.h ./tensors/Tensor_outer.h ./tensors/Tensor_reality.h ./tensors/Tensor_Ta.h ./tensors/Tensor_trace.h ./tensors/Tensor_traits.h ./tensors/Tensor_transpose.h ./tensors/Tensor_unary.h ./Tensors.h ./Threads.h ./Timer.h
|
||||
|
||||
CCFILES=./algorithms/approx/MultiShiftFunction.cc ./algorithms/approx/Remez.cc ./algorithms/approx/Zolotarev.cc ./Init.cc ./Log.cc ./PerfCount.cc ./pugixml/pugixml.cc ./qcd/action/fermion/CayleyFermion5D.cc ./qcd/action/fermion/ContinuedFractionFermion5D.cc ./qcd/action/fermion/PartialFractionFermion5D.cc ./qcd/action/fermion/WilsonFermion.cc ./qcd/action/fermion/WilsonFermion5D.cc ./qcd/action/fermion/WilsonKernels.cc ./qcd/action/fermion/WilsonKernelsAsm.cc ./qcd/action/fermion/WilsonKernelsHand.cc ./qcd/action/fermion/WilsonTMFermion.cc ./qcd/hmc/HMC.cc ./qcd/spin/Dirac.cc ./qcd/utils/SpaceTimeGrid.cc ./serialisation/BinaryIO.cc ./serialisation/TextIO.cc ./serialisation/XmlIO.cc ./stencil/Lebesgue.cc ./stencil/Stencil_common.cc
|
||||
|
@ -17,6 +17,11 @@ typedef std::chrono::system_clock GridClock;
|
||||
typedef std::chrono::time_point<GridClock> GridTimePoint;
|
||||
typedef std::chrono::milliseconds GridTime;
|
||||
|
||||
inline std::ostream& operator<< (std::ostream & stream, const std::chrono::milliseconds & time)
|
||||
{
|
||||
stream << time.count()<<" ms";
|
||||
return stream;
|
||||
}
|
||||
|
||||
class GridStopWatch {
|
||||
private:
|
||||
|
@ -28,11 +28,21 @@
|
||||
// Gauge Actions
|
||||
////////////////////////////////////////////
|
||||
#include <qcd/action/gauge/WilsonGaugeAction.h>
|
||||
#include <qcd/action/gauge/PlaqPlusRectangleAction.h>
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
typedef WilsonGaugeAction<LatticeGaugeField> WilsonGaugeActionR;
|
||||
typedef WilsonGaugeAction<LatticeGaugeFieldF> WilsonGaugeActionF;
|
||||
typedef WilsonGaugeAction<LatticeGaugeFieldD> WilsonGaugeActionD;
|
||||
typedef PlaqPlusRectangleAction<LatticeGaugeField> PlaqPlusRectangleActionR;
|
||||
typedef PlaqPlusRectangleAction<LatticeGaugeFieldF> PlaqPlusRectangleActionF;
|
||||
typedef PlaqPlusRectangleAction<LatticeGaugeFieldD> PlaqPlusRectangleActionD;
|
||||
typedef IwasakiGaugeAction<LatticeGaugeField> IwasakiGaugeActionR;
|
||||
typedef IwasakiGaugeAction<LatticeGaugeFieldF> IwasakiGaugeActionF;
|
||||
typedef IwasakiGaugeAction<LatticeGaugeFieldD> IwasakiGaugeActionD;
|
||||
typedef SymanzikGaugeAction<LatticeGaugeField> SymanzikGaugeActionR;
|
||||
typedef SymanzikGaugeAction<LatticeGaugeFieldF> SymanzikGaugeActionF;
|
||||
typedef SymanzikGaugeAction<LatticeGaugeFieldD> SymanzikGaugeActionD;
|
||||
}}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,17 +22,18 @@ namespace Grid{
|
||||
|
||||
virtual RealD S(const GaugeField &U) {
|
||||
RealD plaq = WilsonLoops<GaugeField>::avgPlaquette(U);
|
||||
// std::cout<<GridLogMessage << "Plaq : "<<plaq << "\n";
|
||||
RealD vol = U._grid->gSites();
|
||||
RealD action=beta*(1.0 -plaq)*(Nd*(Nd-1.0))*vol*0.5;
|
||||
// std::cout << GridLogMessage << "WilsonGauge action "<<action<<std::endl;
|
||||
return action;
|
||||
};
|
||||
|
||||
virtual void deriv(const GaugeField &U,GaugeField & dSdU) {
|
||||
//not optimal implementation FIXME
|
||||
//extend Ta to include Lorentz indexes
|
||||
|
||||
//RealD factor = 0.5*beta/RealD(Nc);
|
||||
RealD factor = 0.5*beta/RealD(Nc);
|
||||
|
||||
GaugeLinkField Umu(U._grid);
|
||||
GaugeLinkField dSdU_mu(U._grid);
|
||||
for (int mu=0; mu < Nd; mu++){
|
||||
@ -41,7 +42,7 @@ namespace Grid{
|
||||
|
||||
// Staple in direction mu
|
||||
WilsonLoops<GaugeField>::Staple(dSdU_mu,U,mu);
|
||||
dSdU_mu = Ta(Umu*adj(dSdU_mu))*factor;
|
||||
dSdU_mu = Ta(Umu*dSdU_mu)*factor;
|
||||
PokeIndex<LorentzIndex>(dSdU, dSdU_mu, mu);
|
||||
}
|
||||
};
|
||||
|
@ -53,8 +53,10 @@ namespace Grid{
|
||||
std::string file; { std::ostringstream os; os << Stem <<"."<< traj; file = os.str(); }
|
||||
std::ofstream of(file);
|
||||
RealD plaq = WilsonLoops<GaugeField>::avgPlaquette(U);
|
||||
of << plaq <<std::endl;
|
||||
RealD rect = WilsonLoops<GaugeField>::avgRectangle(U);
|
||||
of << plaq << " " << rect << std::endl;
|
||||
std::cout<< GridLogMessage<< "Plaquette for trajectory "<< traj << " is " << plaq <<std::endl;
|
||||
std::cout<< GridLogMessage<< "Rectangle for trajectory "<< traj << " is " << rect <<std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace Grid{
|
||||
t_P[level]+=ep;
|
||||
update_P(P,U,level,ep);
|
||||
|
||||
std::cout<<GridLogMessage;
|
||||
std::cout<<GridLogIntegrator;
|
||||
for(int l=0; l<level;++l) std::cout<<" ";
|
||||
std::cout<<"["<<level<<"] P " << " dt "<< ep <<" : t_P "<< t_P[level] <<std::endl;
|
||||
}
|
||||
@ -95,7 +95,7 @@ namespace Grid{
|
||||
|
||||
t_U+=ep;
|
||||
int fl = levels-1;
|
||||
std::cout<<GridLogMessage<<" ";
|
||||
std::cout<<GridLogIntegrator<<" ";
|
||||
for(int l=0; l<fl;++l) std::cout<<" ";
|
||||
std::cout<<"["<<fl<<"] U " << " dt "<< ep <<" : t_U "<< t_U <<std::endl;
|
||||
|
||||
@ -133,7 +133,7 @@ namespace Grid{
|
||||
|
||||
//Initialization of momenta and actions
|
||||
void refresh(GaugeField& U,GridParallelRNG &pRNG){
|
||||
std::cout<<GridLogMessage<< "Integrator refresh\n";
|
||||
std::cout<<GridLogIntegrator<< "Integrator refresh\n";
|
||||
generate_momenta(P,pRNG);
|
||||
for(int level=0; level< as.size(); ++level){
|
||||
for(int actionID=0; actionID<as[level].actions.size(); ++actionID){
|
||||
@ -186,7 +186,7 @@ namespace Grid{
|
||||
// Check the clocks all match on all levels
|
||||
for(int level=0; level<as.size(); ++level){
|
||||
assert(fabs(t_U - t_P[level])<1.0e-6); // must be the same
|
||||
std::cout<<GridLogMessage<<" times["<<level<<"]= "<<t_P[level]<< " " << t_U <<std::endl;
|
||||
std::cout<<GridLogIntegrator<<" times["<<level<<"]= "<<t_P[level]<< " " << t_U <<std::endl;
|
||||
}
|
||||
|
||||
// and that we indeed got to the end of the trajectory
|
||||
|
@ -108,14 +108,20 @@ public:
|
||||
|
||||
// mu
|
||||
// ^
|
||||
// |__ nu
|
||||
// |__> nu
|
||||
|
||||
// __ __
|
||||
// | |
|
||||
// __| = __| *
|
||||
//
|
||||
|
||||
staple += CovShiftForward(U[nu],nu,U[mu])*Cshift(adj(U[nu]),mu,+1);
|
||||
// staple += CovShiftForward(U[nu],nu,U[mu])*Cshift(adj(U[nu]),mu,+1);
|
||||
staple +=
|
||||
Cshift(CovShiftForward (U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,Cshift(adj(U[nu]),nu,-1))),mu,1);
|
||||
|
||||
|
||||
// Unu(x) Umu(x+nu) Unu^dag(x+mu) ; left mult by Umu^dag(x) to close ring
|
||||
|
||||
//
|
||||
// __ __
|
||||
@ -123,8 +129,15 @@ public:
|
||||
// |__ = | * __
|
||||
//
|
||||
//
|
||||
tmp = CovShiftForward (U[mu],mu,U[nu]);
|
||||
staple+= CovShiftBackward(U[nu],nu,tmp);
|
||||
staple +=
|
||||
Cshift(
|
||||
CovShiftBackward(U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,U[nu])),mu,1);
|
||||
|
||||
// tmp = CovShiftForward (U[mu],mu,U[nu]);
|
||||
// staple+= CovShiftBackward(U[nu],nu,tmp);
|
||||
|
||||
// Unu^dag(x-nu) Umu(x-nu) Unu(x+mu-nu) ; left mult by Umu^dag(x) to close ring.
|
||||
|
||||
}
|
||||
}
|
||||
@ -133,13 +146,136 @@ public:
|
||||
//////////////////////////////////////////////////////
|
||||
// Similar to above for rectangle is required
|
||||
//////////////////////////////////////////////////////
|
||||
/*
|
||||
void siteRectangle(GaugeMat &plaq,const std::vector<GaugeMat> &U, const int mu, const int nu){
|
||||
RealD avgRectangle(const std::vector<GaugeMat> &U){}
|
||||
RealD avgRectangle(const std::vector<GaugeMat> &U, const int mu, const int nu){}
|
||||
void traceRectangle(LatticeComplex &plaq,const std::vector<GaugeMat> &U, const int mu, const int nu){}
|
||||
void siteRectangle(GaugeMat &plaq,const std::vector<GaugeMat> &U, const int mu, const int nu){}
|
||||
*/
|
||||
static void dirRectangle(GaugeMat &rect,const std::vector<GaugeMat> &U, const int mu, const int nu)
|
||||
{
|
||||
rect = CovShiftForward(U[mu],mu,CovShiftForward(U[mu],mu,U[nu]))* // ->->|
|
||||
adj(CovShiftForward(U[nu],nu,CovShiftForward(U[mu],mu,U[mu]))) ;
|
||||
rect = rect +
|
||||
CovShiftForward(U[mu],mu,CovShiftForward(U[nu],nu,U[nu]))* // ->||
|
||||
adj(CovShiftForward(U[nu],nu,CovShiftForward(U[nu],nu,U[mu]))) ;
|
||||
}
|
||||
static void traceDirRectangle(LatticeComplex &rect, const std::vector<GaugeMat> &U, const int mu, const int nu)
|
||||
{
|
||||
GaugeMat sp(U[0]._grid);
|
||||
dirRectangle(sp,U,mu,nu);
|
||||
rect=trace(sp);
|
||||
}
|
||||
static void siteRectangle(LatticeComplex &Rect,const std::vector<GaugeMat> &U)
|
||||
{
|
||||
LatticeComplex siteRect(U[0]._grid);
|
||||
Rect=zero;
|
||||
for(int mu=1;mu<Nd;mu++){
|
||||
for(int nu=0;nu<mu;nu++){
|
||||
traceDirRectangle(siteRect,U,mu,nu);
|
||||
Rect = Rect + siteRect;
|
||||
}
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////
|
||||
// sum over all x,y,z,t and over all planes of plaquette
|
||||
//////////////////////////////////////////////////
|
||||
static RealD sumRectangle(const GaugeLorentz &Umu){
|
||||
std::vector<GaugeMat> U(4,Umu._grid);
|
||||
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
U[mu] = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
}
|
||||
|
||||
LatticeComplex Rect(Umu._grid);
|
||||
|
||||
siteRectangle(Rect,U);
|
||||
|
||||
TComplex Tp = sum(Rect);
|
||||
Complex p = TensorRemove(Tp);
|
||||
return p.real();
|
||||
}
|
||||
//////////////////////////////////////////////////
|
||||
// average over all x,y,z,t and over all planes of plaquette
|
||||
//////////////////////////////////////////////////
|
||||
static RealD avgRectangle(const GaugeLorentz &Umu){
|
||||
|
||||
RealD sumrect = sumRectangle(Umu);
|
||||
|
||||
double vol = Umu._grid->gSites();
|
||||
|
||||
double faces = (1.0*Nd*(Nd-1)); // 2 distinct orientations summed
|
||||
|
||||
return sumrect/vol/faces/Nc; // Nd , Nc dependent... FIXME
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// the sum over all staples on each site
|
||||
//////////////////////////////////////////////////
|
||||
static void RectStaple(GaugeMat &Stap,const GaugeLorentz &Umu,int mu){
|
||||
|
||||
GridBase *grid = Umu._grid;
|
||||
|
||||
std::vector<GaugeMat> U(4,grid);
|
||||
for(int d=0;d<Nd;d++){
|
||||
U[d] = PeekIndex<LorentzIndex>(Umu,d);
|
||||
}
|
||||
|
||||
Stap=zero;
|
||||
|
||||
for(int nu=0;nu<Nd;nu++){
|
||||
if ( nu!=mu) {
|
||||
// __ ___
|
||||
// | __ |
|
||||
//
|
||||
Stap+= Cshift(CovShiftForward (U[mu],mu,
|
||||
CovShiftForward (U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
Cshift(adj(U[nu]),nu,-1))))) , mu, 1);
|
||||
|
||||
// __
|
||||
// |__ __ |
|
||||
|
||||
Stap+= Cshift(CovShiftForward (U[mu],mu,
|
||||
CovShiftBackward(U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[mu],mu, U[nu])))) , mu, 1);
|
||||
|
||||
// __
|
||||
// |__ __ |
|
||||
|
||||
Stap+= Cshift(CovShiftBackward(U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftForward(U[nu],nu,U[mu])))) , mu, 1);
|
||||
|
||||
// __ ___
|
||||
// |__ |
|
||||
|
||||
Stap+= Cshift(CovShiftForward (U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[nu],nu,U[mu])))) , mu, 1);
|
||||
|
||||
// --
|
||||
// | |
|
||||
//
|
||||
// | |
|
||||
|
||||
Stap+= Cshift(CovShiftForward(U[nu],nu,
|
||||
CovShiftForward(U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftBackward(U[nu],nu,
|
||||
Cshift(adj(U[nu]),nu,-1))))) , mu, 1);
|
||||
|
||||
|
||||
// | |
|
||||
//
|
||||
// | |
|
||||
// --
|
||||
|
||||
Stap+= Cshift(CovShiftBackward(U[nu],nu,
|
||||
CovShiftBackward(U[nu],nu,
|
||||
CovShiftBackward(U[mu],mu,
|
||||
CovShiftForward (U[nu],nu,U[nu])))) , mu, 1);
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user