From fad5c675eb5a8921bde6261b1c6a56d039318b3f Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 16 Jul 2016 01:51:56 +0100 Subject: [PATCH 1/2] sign error on the 4d gparity force --- lib/qcd/action/fermion/FermionOperatorImpl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/qcd/action/fermion/FermionOperatorImpl.h b/lib/qcd/action/fermion/FermionOperatorImpl.h index 8729053a..4126d185 100644 --- a/lib/qcd/action/fermion/FermionOperatorImpl.h +++ b/lib/qcd/action/fermion/FermionOperatorImpl.h @@ -452,10 +452,10 @@ PARALLEL_FOR_LOOP // DhopDir provides U or Uconj depending on coor/flavour. GaugeLinkField link(mat._grid); // use lorentz for flavour as hack. - auto tmp = TraceIndex(outerProduct(Btilde,A)); PARALLEL_FOR_LOOP - for(auto ss=tmp.begin();ss(outerProduct(Btilde[ss],A[ss])); + link[ss]() = ttmp(0,0) + conjugate(ttmp(1,1)) ; } PokeIndex(mat,link,mu); return; From f9e90eeb1ffc792d70c141decce1410721a8ebfe Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 16 Jul 2016 01:52:44 +0100 Subject: [PATCH 2/2] Sign error on the force for 4d fields fixed --- lib/Make.inc | 2 +- tests/forces/Make.inc | 6 +- tests/forces/Test_gpwilson_force.cc | 169 ++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 tests/forces/Test_gpwilson_force.cc diff --git a/lib/Make.inc b/lib/Make.inc index 94528a50..caa2b8a1 100644 --- a/lib/Make.inc +++ b/lib/Make.inc @@ -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/ConjugateGradientMixedPrec.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 ./Eigen/src/Cholesky/LDLT.h ./Eigen/src/Cholesky/LLT.h ./Eigen/src/Cholesky/LLT_MKL.h ./Eigen/src/CholmodSupport/CholmodSupport.h ./Eigen/src/Core/arch/AltiVec/Complex.h ./Eigen/src/Core/arch/AltiVec/PacketMath.h ./Eigen/src/Core/arch/Default/Settings.h ./Eigen/src/Core/arch/NEON/Complex.h ./Eigen/src/Core/arch/NEON/PacketMath.h ./Eigen/src/Core/arch/SSE/Complex.h ./Eigen/src/Core/arch/SSE/MathFunctions.h ./Eigen/src/Core/arch/SSE/PacketMath.h ./Eigen/src/Core/Array.h ./Eigen/src/Core/ArrayBase.h ./Eigen/src/Core/ArrayWrapper.h ./Eigen/src/Core/Assign.h ./Eigen/src/Core/Assign_MKL.h ./Eigen/src/Core/BandMatrix.h ./Eigen/src/Core/Block.h ./Eigen/src/Core/BooleanRedux.h ./Eigen/src/Core/CommaInitializer.h ./Eigen/src/Core/CoreIterators.h ./Eigen/src/Core/CwiseBinaryOp.h ./Eigen/src/Core/CwiseNullaryOp.h ./Eigen/src/Core/CwiseUnaryOp.h ./Eigen/src/Core/CwiseUnaryView.h ./Eigen/src/Core/DenseBase.h ./Eigen/src/Core/DenseCoeffsBase.h ./Eigen/src/Core/DenseStorage.h ./Eigen/src/Core/Diagonal.h ./Eigen/src/Core/DiagonalMatrix.h ./Eigen/src/Core/DiagonalProduct.h ./Eigen/src/Core/Dot.h ./Eigen/src/Core/EigenBase.h ./Eigen/src/Core/Flagged.h ./Eigen/src/Core/ForceAlignedAccess.h ./Eigen/src/Core/Functors.h ./Eigen/src/Core/Fuzzy.h ./Eigen/src/Core/GeneralProduct.h ./Eigen/src/Core/GenericPacketMath.h ./Eigen/src/Core/GlobalFunctions.h ./Eigen/src/Core/IO.h ./Eigen/src/Core/Map.h ./Eigen/src/Core/MapBase.h ./Eigen/src/Core/MathFunctions.h ./Eigen/src/Core/Matrix.h ./Eigen/src/Core/MatrixBase.h ./Eigen/src/Core/NestByValue.h ./Eigen/src/Core/NoAlias.h ./Eigen/src/Core/NumTraits.h ./Eigen/src/Core/PermutationMatrix.h ./Eigen/src/Core/PlainObjectBase.h ./Eigen/src/Core/ProductBase.h ./Eigen/src/Core/products/CoeffBasedProduct.h ./Eigen/src/Core/products/GeneralBlockPanelKernel.h ./Eigen/src/Core/products/GeneralMatrixMatrix.h ./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h ./Eigen/src/Core/products/GeneralMatrixVector.h ./Eigen/src/Core/products/GeneralMatrixVector_MKL.h ./Eigen/src/Core/products/Parallelizer.h ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h ./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h ./Eigen/src/Core/products/SelfadjointMatrixVector.h ./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h ./Eigen/src/Core/products/SelfadjointProduct.h ./Eigen/src/Core/products/SelfadjointRank2Update.h ./Eigen/src/Core/products/TriangularMatrixMatrix.h ./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h ./Eigen/src/Core/products/TriangularMatrixVector.h ./Eigen/src/Core/products/TriangularMatrixVector_MKL.h ./Eigen/src/Core/products/TriangularSolverMatrix.h ./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h ./Eigen/src/Core/products/TriangularSolverVector.h ./Eigen/src/Core/Random.h ./Eigen/src/Core/Redux.h ./Eigen/src/Core/Ref.h ./Eigen/src/Core/Replicate.h ./Eigen/src/Core/ReturnByValue.h ./Eigen/src/Core/Reverse.h ./Eigen/src/Core/Select.h ./Eigen/src/Core/SelfAdjointView.h ./Eigen/src/Core/SelfCwiseBinaryOp.h ./Eigen/src/Core/SolveTriangular.h ./Eigen/src/Core/StableNorm.h ./Eigen/src/Core/Stride.h ./Eigen/src/Core/Swap.h ./Eigen/src/Core/Transpose.h ./Eigen/src/Core/Transpositions.h ./Eigen/src/Core/TriangularMatrix.h ./Eigen/src/Core/util/BlasUtil.h ./Eigen/src/Core/util/Constants.h ./Eigen/src/Core/util/DisableStupidWarnings.h ./Eigen/src/Core/util/ForwardDeclarations.h ./Eigen/src/Core/util/Macros.h ./Eigen/src/Core/util/Memory.h ./Eigen/src/Core/util/Meta.h ./Eigen/src/Core/util/MKL_support.h ./Eigen/src/Core/util/NonMPL2.h ./Eigen/src/Core/util/ReenableStupidWarnings.h ./Eigen/src/Core/util/StaticAssert.h ./Eigen/src/Core/util/XprHelper.h ./Eigen/src/Core/VectorBlock.h ./Eigen/src/Core/VectorwiseOp.h ./Eigen/src/Core/Visitor.h ./Eigen/src/Eigen2Support/Block.h ./Eigen/src/Eigen2Support/Cwise.h ./Eigen/src/Eigen2Support/CwiseOperators.h ./Eigen/src/Eigen2Support/Geometry/AlignedBox.h ./Eigen/src/Eigen2Support/Geometry/All.h ./Eigen/src/Eigen2Support/Geometry/AngleAxis.h ./Eigen/src/Eigen2Support/Geometry/Hyperplane.h ./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h ./Eigen/src/Eigen2Support/Geometry/Quaternion.h ./Eigen/src/Eigen2Support/Geometry/Rotation2D.h ./Eigen/src/Eigen2Support/Geometry/RotationBase.h ./Eigen/src/Eigen2Support/Geometry/Scaling.h ./Eigen/src/Eigen2Support/Geometry/Transform.h ./Eigen/src/Eigen2Support/Geometry/Translation.h ./Eigen/src/Eigen2Support/Lazy.h ./Eigen/src/Eigen2Support/LeastSquares.h ./Eigen/src/Eigen2Support/LU.h ./Eigen/src/Eigen2Support/Macros.h ./Eigen/src/Eigen2Support/MathFunctions.h ./Eigen/src/Eigen2Support/Memory.h ./Eigen/src/Eigen2Support/Meta.h ./Eigen/src/Eigen2Support/Minor.h ./Eigen/src/Eigen2Support/QR.h ./Eigen/src/Eigen2Support/SVD.h ./Eigen/src/Eigen2Support/TriangularSolver.h ./Eigen/src/Eigen2Support/VectorBlock.h ./Eigen/src/Eigenvalues/ComplexEigenSolver.h ./Eigen/src/Eigenvalues/ComplexSchur.h ./Eigen/src/Eigenvalues/ComplexSchur_MKL.h ./Eigen/src/Eigenvalues/EigenSolver.h ./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h ./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h ./Eigen/src/Eigenvalues/HessenbergDecomposition.h ./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h ./Eigen/src/Eigenvalues/RealQZ.h ./Eigen/src/Eigenvalues/RealSchur.h ./Eigen/src/Eigenvalues/RealSchur_MKL.h ./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h ./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h ./Eigen/src/Eigenvalues/Tridiagonalization.h ./Eigen/src/Geometry/AlignedBox.h ./Eigen/src/Geometry/AngleAxis.h ./Eigen/src/Geometry/arch/Geometry_SSE.h ./Eigen/src/Geometry/EulerAngles.h ./Eigen/src/Geometry/Homogeneous.h ./Eigen/src/Geometry/Hyperplane.h ./Eigen/src/Geometry/OrthoMethods.h ./Eigen/src/Geometry/ParametrizedLine.h ./Eigen/src/Geometry/Quaternion.h ./Eigen/src/Geometry/Rotation2D.h ./Eigen/src/Geometry/RotationBase.h ./Eigen/src/Geometry/Scaling.h ./Eigen/src/Geometry/Transform.h ./Eigen/src/Geometry/Translation.h ./Eigen/src/Geometry/Umeyama.h ./Eigen/src/Householder/BlockHouseholder.h ./Eigen/src/Householder/Householder.h ./Eigen/src/Householder/HouseholderSequence.h ./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h ./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h ./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h ./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h ./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h ./Eigen/src/Jacobi/Jacobi.h ./Eigen/src/LU/arch/Inverse_SSE.h ./Eigen/src/LU/Determinant.h ./Eigen/src/LU/FullPivLU.h ./Eigen/src/LU/Inverse.h ./Eigen/src/LU/PartialPivLU.h ./Eigen/src/LU/PartialPivLU_MKL.h ./Eigen/src/MetisSupport/MetisSupport.h ./Eigen/src/misc/blas.h ./Eigen/src/misc/Image.h ./Eigen/src/misc/Kernel.h ./Eigen/src/misc/Solve.h ./Eigen/src/misc/SparseSolve.h ./Eigen/src/OrderingMethods/Amd.h ./Eigen/src/OrderingMethods/Eigen_Colamd.h ./Eigen/src/OrderingMethods/Ordering.h ./Eigen/src/PardisoSupport/PardisoSupport.h ./Eigen/src/PaStiXSupport/PaStiXSupport.h ./Eigen/src/plugins/ArrayCwiseBinaryOps.h ./Eigen/src/plugins/ArrayCwiseUnaryOps.h ./Eigen/src/plugins/BlockMethods.h ./Eigen/src/plugins/CommonCwiseBinaryOps.h ./Eigen/src/plugins/CommonCwiseUnaryOps.h ./Eigen/src/plugins/MatrixCwiseBinaryOps.h ./Eigen/src/plugins/MatrixCwiseUnaryOps.h ./Eigen/src/QR/ColPivHouseholderQR.h ./Eigen/src/QR/ColPivHouseholderQR_MKL.h ./Eigen/src/QR/FullPivHouseholderQR.h ./Eigen/src/QR/HouseholderQR.h ./Eigen/src/QR/HouseholderQR_MKL.h ./Eigen/src/SparseCholesky/SimplicialCholesky.h ./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h ./Eigen/src/SparseCore/AmbiVector.h ./Eigen/src/SparseCore/CompressedStorage.h ./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h ./Eigen/src/SparseCore/MappedSparseMatrix.h ./Eigen/src/SparseCore/SparseBlock.h ./Eigen/src/SparseCore/SparseColEtree.h ./Eigen/src/SparseCore/SparseCwiseBinaryOp.h ./Eigen/src/SparseCore/SparseCwiseUnaryOp.h ./Eigen/src/SparseCore/SparseDenseProduct.h ./Eigen/src/SparseCore/SparseDiagonalProduct.h ./Eigen/src/SparseCore/SparseDot.h ./Eigen/src/SparseCore/SparseFuzzy.h ./Eigen/src/SparseCore/SparseMatrix.h ./Eigen/src/SparseCore/SparseMatrixBase.h ./Eigen/src/SparseCore/SparsePermutation.h ./Eigen/src/SparseCore/SparseProduct.h ./Eigen/src/SparseCore/SparseRedux.h ./Eigen/src/SparseCore/SparseSelfAdjointView.h ./Eigen/src/SparseCore/SparseSparseProductWithPruning.h ./Eigen/src/SparseCore/SparseTranspose.h ./Eigen/src/SparseCore/SparseTriangularView.h ./Eigen/src/SparseCore/SparseUtil.h ./Eigen/src/SparseCore/SparseVector.h ./Eigen/src/SparseCore/SparseView.h ./Eigen/src/SparseCore/TriangularSolver.h ./Eigen/src/SparseLU/SparseLU.h ./Eigen/src/SparseLU/SparseLU_column_bmod.h ./Eigen/src/SparseLU/SparseLU_column_dfs.h ./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h ./Eigen/src/SparseLU/SparseLU_gemm_kernel.h ./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h ./Eigen/src/SparseLU/SparseLU_kernel_bmod.h ./Eigen/src/SparseLU/SparseLU_Memory.h ./Eigen/src/SparseLU/SparseLU_panel_bmod.h ./Eigen/src/SparseLU/SparseLU_panel_dfs.h ./Eigen/src/SparseLU/SparseLU_pivotL.h ./Eigen/src/SparseLU/SparseLU_pruneL.h ./Eigen/src/SparseLU/SparseLU_relax_snode.h ./Eigen/src/SparseLU/SparseLU_Structs.h ./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h ./Eigen/src/SparseLU/SparseLU_Utils.h ./Eigen/src/SparseLU/SparseLUImpl.h ./Eigen/src/SparseQR/SparseQR.h ./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h ./Eigen/src/StlSupport/details.h ./Eigen/src/StlSupport/StdDeque.h ./Eigen/src/StlSupport/StdList.h ./Eigen/src/StlSupport/StdVector.h ./Eigen/src/SuperLUSupport/SuperLUSupport.h ./Eigen/src/SVD/JacobiSVD.h ./Eigen/src/SVD/JacobiSVD_MKL.h ./Eigen/src/SVD/UpperBidiagonalization.h ./Eigen/src/UmfPackSupport/UmfPackSupport.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 ./Lexicographic.h ./Log.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/WilsonKernelsAsmBody.h ./qcd/action/fermion/WilsonTMFermion.h ./qcd/action/gauge/GaugeImpl.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/smearing/APEsmearing.h ./qcd/smearing/BaseSmearing.h ./qcd/smearing/GaugeConfiguration.h ./qcd/smearing/Smearing.h ./qcd/smearing/StoutSmearing.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/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/Intel512avx.h ./simd/Intel512common.h ./simd/Intel512double.h ./simd/Intel512imci.h ./simd/Intel512single.h ./simd/Intel512wilson.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 Config.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/ConjugateGradientMixedPrec.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 ./Eigen/src/Cholesky/LDLT.h ./Eigen/src/Cholesky/LLT.h ./Eigen/src/Cholesky/LLT_MKL.h ./Eigen/src/CholmodSupport/CholmodSupport.h ./Eigen/src/Core/arch/AltiVec/Complex.h ./Eigen/src/Core/arch/AltiVec/PacketMath.h ./Eigen/src/Core/arch/Default/Settings.h ./Eigen/src/Core/arch/NEON/Complex.h ./Eigen/src/Core/arch/NEON/PacketMath.h ./Eigen/src/Core/arch/SSE/Complex.h ./Eigen/src/Core/arch/SSE/MathFunctions.h ./Eigen/src/Core/arch/SSE/PacketMath.h ./Eigen/src/Core/Array.h ./Eigen/src/Core/ArrayBase.h ./Eigen/src/Core/ArrayWrapper.h ./Eigen/src/Core/Assign.h ./Eigen/src/Core/Assign_MKL.h ./Eigen/src/Core/BandMatrix.h ./Eigen/src/Core/Block.h ./Eigen/src/Core/BooleanRedux.h ./Eigen/src/Core/CommaInitializer.h ./Eigen/src/Core/CoreIterators.h ./Eigen/src/Core/CwiseBinaryOp.h ./Eigen/src/Core/CwiseNullaryOp.h ./Eigen/src/Core/CwiseUnaryOp.h ./Eigen/src/Core/CwiseUnaryView.h ./Eigen/src/Core/DenseBase.h ./Eigen/src/Core/DenseCoeffsBase.h ./Eigen/src/Core/DenseStorage.h ./Eigen/src/Core/Diagonal.h ./Eigen/src/Core/DiagonalMatrix.h ./Eigen/src/Core/DiagonalProduct.h ./Eigen/src/Core/Dot.h ./Eigen/src/Core/EigenBase.h ./Eigen/src/Core/Flagged.h ./Eigen/src/Core/ForceAlignedAccess.h ./Eigen/src/Core/Functors.h ./Eigen/src/Core/Fuzzy.h ./Eigen/src/Core/GeneralProduct.h ./Eigen/src/Core/GenericPacketMath.h ./Eigen/src/Core/GlobalFunctions.h ./Eigen/src/Core/IO.h ./Eigen/src/Core/Map.h ./Eigen/src/Core/MapBase.h ./Eigen/src/Core/MathFunctions.h ./Eigen/src/Core/Matrix.h ./Eigen/src/Core/MatrixBase.h ./Eigen/src/Core/NestByValue.h ./Eigen/src/Core/NoAlias.h ./Eigen/src/Core/NumTraits.h ./Eigen/src/Core/PermutationMatrix.h ./Eigen/src/Core/PlainObjectBase.h ./Eigen/src/Core/ProductBase.h ./Eigen/src/Core/products/CoeffBasedProduct.h ./Eigen/src/Core/products/GeneralBlockPanelKernel.h ./Eigen/src/Core/products/GeneralMatrixMatrix.h ./Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h ./Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h ./Eigen/src/Core/products/GeneralMatrixVector.h ./Eigen/src/Core/products/GeneralMatrixVector_MKL.h ./Eigen/src/Core/products/Parallelizer.h ./Eigen/src/Core/products/SelfadjointMatrixMatrix.h ./Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h ./Eigen/src/Core/products/SelfadjointMatrixVector.h ./Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h ./Eigen/src/Core/products/SelfadjointProduct.h ./Eigen/src/Core/products/SelfadjointRank2Update.h ./Eigen/src/Core/products/TriangularMatrixMatrix.h ./Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h ./Eigen/src/Core/products/TriangularMatrixVector.h ./Eigen/src/Core/products/TriangularMatrixVector_MKL.h ./Eigen/src/Core/products/TriangularSolverMatrix.h ./Eigen/src/Core/products/TriangularSolverMatrix_MKL.h ./Eigen/src/Core/products/TriangularSolverVector.h ./Eigen/src/Core/Random.h ./Eigen/src/Core/Redux.h ./Eigen/src/Core/Ref.h ./Eigen/src/Core/Replicate.h ./Eigen/src/Core/ReturnByValue.h ./Eigen/src/Core/Reverse.h ./Eigen/src/Core/Select.h ./Eigen/src/Core/SelfAdjointView.h ./Eigen/src/Core/SelfCwiseBinaryOp.h ./Eigen/src/Core/SolveTriangular.h ./Eigen/src/Core/StableNorm.h ./Eigen/src/Core/Stride.h ./Eigen/src/Core/Swap.h ./Eigen/src/Core/Transpose.h ./Eigen/src/Core/Transpositions.h ./Eigen/src/Core/TriangularMatrix.h ./Eigen/src/Core/util/BlasUtil.h ./Eigen/src/Core/util/Constants.h ./Eigen/src/Core/util/DisableStupidWarnings.h ./Eigen/src/Core/util/ForwardDeclarations.h ./Eigen/src/Core/util/Macros.h ./Eigen/src/Core/util/Memory.h ./Eigen/src/Core/util/Meta.h ./Eigen/src/Core/util/MKL_support.h ./Eigen/src/Core/util/NonMPL2.h ./Eigen/src/Core/util/ReenableStupidWarnings.h ./Eigen/src/Core/util/StaticAssert.h ./Eigen/src/Core/util/XprHelper.h ./Eigen/src/Core/VectorBlock.h ./Eigen/src/Core/VectorwiseOp.h ./Eigen/src/Core/Visitor.h ./Eigen/src/Eigen2Support/Block.h ./Eigen/src/Eigen2Support/Cwise.h ./Eigen/src/Eigen2Support/CwiseOperators.h ./Eigen/src/Eigen2Support/Geometry/AlignedBox.h ./Eigen/src/Eigen2Support/Geometry/All.h ./Eigen/src/Eigen2Support/Geometry/AngleAxis.h ./Eigen/src/Eigen2Support/Geometry/Hyperplane.h ./Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h ./Eigen/src/Eigen2Support/Geometry/Quaternion.h ./Eigen/src/Eigen2Support/Geometry/Rotation2D.h ./Eigen/src/Eigen2Support/Geometry/RotationBase.h ./Eigen/src/Eigen2Support/Geometry/Scaling.h ./Eigen/src/Eigen2Support/Geometry/Transform.h ./Eigen/src/Eigen2Support/Geometry/Translation.h ./Eigen/src/Eigen2Support/Lazy.h ./Eigen/src/Eigen2Support/LeastSquares.h ./Eigen/src/Eigen2Support/LU.h ./Eigen/src/Eigen2Support/Macros.h ./Eigen/src/Eigen2Support/MathFunctions.h ./Eigen/src/Eigen2Support/Memory.h ./Eigen/src/Eigen2Support/Meta.h ./Eigen/src/Eigen2Support/Minor.h ./Eigen/src/Eigen2Support/QR.h ./Eigen/src/Eigen2Support/SVD.h ./Eigen/src/Eigen2Support/TriangularSolver.h ./Eigen/src/Eigen2Support/VectorBlock.h ./Eigen/src/Eigenvalues/ComplexEigenSolver.h ./Eigen/src/Eigenvalues/ComplexSchur.h ./Eigen/src/Eigenvalues/ComplexSchur_MKL.h ./Eigen/src/Eigenvalues/EigenSolver.h ./Eigen/src/Eigenvalues/GeneralizedEigenSolver.h ./Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h ./Eigen/src/Eigenvalues/HessenbergDecomposition.h ./Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h ./Eigen/src/Eigenvalues/RealQZ.h ./Eigen/src/Eigenvalues/RealSchur.h ./Eigen/src/Eigenvalues/RealSchur_MKL.h ./Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h ./Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h ./Eigen/src/Eigenvalues/Tridiagonalization.h ./Eigen/src/Geometry/AlignedBox.h ./Eigen/src/Geometry/AngleAxis.h ./Eigen/src/Geometry/arch/Geometry_SSE.h ./Eigen/src/Geometry/EulerAngles.h ./Eigen/src/Geometry/Homogeneous.h ./Eigen/src/Geometry/Hyperplane.h ./Eigen/src/Geometry/OrthoMethods.h ./Eigen/src/Geometry/ParametrizedLine.h ./Eigen/src/Geometry/Quaternion.h ./Eigen/src/Geometry/Rotation2D.h ./Eigen/src/Geometry/RotationBase.h ./Eigen/src/Geometry/Scaling.h ./Eigen/src/Geometry/Transform.h ./Eigen/src/Geometry/Translation.h ./Eigen/src/Geometry/Umeyama.h ./Eigen/src/Householder/BlockHouseholder.h ./Eigen/src/Householder/Householder.h ./Eigen/src/Householder/HouseholderSequence.h ./Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h ./Eigen/src/IterativeLinearSolvers/BiCGSTAB.h ./Eigen/src/IterativeLinearSolvers/ConjugateGradient.h ./Eigen/src/IterativeLinearSolvers/IncompleteLUT.h ./Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h ./Eigen/src/Jacobi/Jacobi.h ./Eigen/src/LU/arch/Inverse_SSE.h ./Eigen/src/LU/Determinant.h ./Eigen/src/LU/FullPivLU.h ./Eigen/src/LU/Inverse.h ./Eigen/src/LU/PartialPivLU.h ./Eigen/src/LU/PartialPivLU_MKL.h ./Eigen/src/MetisSupport/MetisSupport.h ./Eigen/src/misc/blas.h ./Eigen/src/misc/Image.h ./Eigen/src/misc/Kernel.h ./Eigen/src/misc/Solve.h ./Eigen/src/misc/SparseSolve.h ./Eigen/src/OrderingMethods/Amd.h ./Eigen/src/OrderingMethods/Eigen_Colamd.h ./Eigen/src/OrderingMethods/Ordering.h ./Eigen/src/PardisoSupport/PardisoSupport.h ./Eigen/src/PaStiXSupport/PaStiXSupport.h ./Eigen/src/plugins/ArrayCwiseBinaryOps.h ./Eigen/src/plugins/ArrayCwiseUnaryOps.h ./Eigen/src/plugins/BlockMethods.h ./Eigen/src/plugins/CommonCwiseBinaryOps.h ./Eigen/src/plugins/CommonCwiseUnaryOps.h ./Eigen/src/plugins/MatrixCwiseBinaryOps.h ./Eigen/src/plugins/MatrixCwiseUnaryOps.h ./Eigen/src/QR/ColPivHouseholderQR.h ./Eigen/src/QR/ColPivHouseholderQR_MKL.h ./Eigen/src/QR/FullPivHouseholderQR.h ./Eigen/src/QR/HouseholderQR.h ./Eigen/src/QR/HouseholderQR_MKL.h ./Eigen/src/SparseCholesky/SimplicialCholesky.h ./Eigen/src/SparseCholesky/SimplicialCholesky_impl.h ./Eigen/src/SparseCore/AmbiVector.h ./Eigen/src/SparseCore/CompressedStorage.h ./Eigen/src/SparseCore/ConservativeSparseSparseProduct.h ./Eigen/src/SparseCore/MappedSparseMatrix.h ./Eigen/src/SparseCore/SparseBlock.h ./Eigen/src/SparseCore/SparseColEtree.h ./Eigen/src/SparseCore/SparseCwiseBinaryOp.h ./Eigen/src/SparseCore/SparseCwiseUnaryOp.h ./Eigen/src/SparseCore/SparseDenseProduct.h ./Eigen/src/SparseCore/SparseDiagonalProduct.h ./Eigen/src/SparseCore/SparseDot.h ./Eigen/src/SparseCore/SparseFuzzy.h ./Eigen/src/SparseCore/SparseMatrix.h ./Eigen/src/SparseCore/SparseMatrixBase.h ./Eigen/src/SparseCore/SparsePermutation.h ./Eigen/src/SparseCore/SparseProduct.h ./Eigen/src/SparseCore/SparseRedux.h ./Eigen/src/SparseCore/SparseSelfAdjointView.h ./Eigen/src/SparseCore/SparseSparseProductWithPruning.h ./Eigen/src/SparseCore/SparseTranspose.h ./Eigen/src/SparseCore/SparseTriangularView.h ./Eigen/src/SparseCore/SparseUtil.h ./Eigen/src/SparseCore/SparseVector.h ./Eigen/src/SparseCore/SparseView.h ./Eigen/src/SparseCore/TriangularSolver.h ./Eigen/src/SparseLU/SparseLU.h ./Eigen/src/SparseLU/SparseLU_column_bmod.h ./Eigen/src/SparseLU/SparseLU_column_dfs.h ./Eigen/src/SparseLU/SparseLU_copy_to_ucol.h ./Eigen/src/SparseLU/SparseLU_gemm_kernel.h ./Eigen/src/SparseLU/SparseLU_heap_relax_snode.h ./Eigen/src/SparseLU/SparseLU_kernel_bmod.h ./Eigen/src/SparseLU/SparseLU_Memory.h ./Eigen/src/SparseLU/SparseLU_panel_bmod.h ./Eigen/src/SparseLU/SparseLU_panel_dfs.h ./Eigen/src/SparseLU/SparseLU_pivotL.h ./Eigen/src/SparseLU/SparseLU_pruneL.h ./Eigen/src/SparseLU/SparseLU_relax_snode.h ./Eigen/src/SparseLU/SparseLU_Structs.h ./Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h ./Eigen/src/SparseLU/SparseLU_Utils.h ./Eigen/src/SparseLU/SparseLUImpl.h ./Eigen/src/SparseQR/SparseQR.h ./Eigen/src/SPQRSupport/SuiteSparseQRSupport.h ./Eigen/src/StlSupport/details.h ./Eigen/src/StlSupport/StdDeque.h ./Eigen/src/StlSupport/StdList.h ./Eigen/src/StlSupport/StdVector.h ./Eigen/src/SuperLUSupport/SuperLUSupport.h ./Eigen/src/SVD/JacobiSVD.h ./Eigen/src/SVD/JacobiSVD_MKL.h ./Eigen/src/SVD/UpperBidiagonalization.h ./Eigen/src/UmfPackSupport/UmfPackSupport.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 ./Lexicographic.h ./Log.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/WilsonKernelsAsmBody.h ./qcd/action/fermion/WilsonTMFermion.h ./qcd/action/gauge/GaugeImpl.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/smearing/APEsmearing.h ./qcd/smearing/BaseSmearing.h ./qcd/smearing/GaugeConfiguration.h ./qcd/smearing/Smearing.h ./qcd/smearing/StoutSmearing.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/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/Intel512avx.h ./simd/Intel512common.h ./simd/Intel512double.h ./simd/Intel512imci.h ./simd/Intel512single.h ./simd/Intel512wilson.h ./simd/pab.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 Config.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/CayleyFermion5Dcache.cc ./qcd/action/fermion/CayleyFermion5Ddense.cc ./qcd/action/fermion/CayleyFermion5Dssp.cc ./qcd/action/fermion/CayleyFermion5Dvec.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 diff --git a/tests/forces/Make.inc b/tests/forces/Make.inc index 6b72167d..0ccbeade 100644 --- a/tests/forces/Make.inc +++ b/tests/forces/Make.inc @@ -1,5 +1,5 @@ -bin_PROGRAMS += Test_contfrac_force Test_dwf_force Test_dwf_gpforce Test_gp_rect_force Test_gpdwf_force Test_partfrac_force Test_rect_force Test_wilson_force Test_wilson_force_phiMdagMphi Test_wilson_force_phiMphi +bin_PROGRAMS += Test_contfrac_force Test_dwf_force Test_dwf_gpforce Test_gp_rect_force Test_gpdwf_force Test_gpwilson_force Test_partfrac_force Test_rect_force Test_wilson_force Test_wilson_force_phiMdagMphi Test_wilson_force_phiMphi Test_contfrac_force_SOURCES=Test_contfrac_force.cc @@ -22,6 +22,10 @@ Test_gpdwf_force_SOURCES=Test_gpdwf_force.cc Test_gpdwf_force_LDADD=-lGrid +Test_gpwilson_force_SOURCES=Test_gpwilson_force.cc +Test_gpwilson_force_LDADD=-lGrid + + Test_partfrac_force_SOURCES=Test_partfrac_force.cc Test_partfrac_force_LDADD=-lGrid diff --git a/tests/forces/Test_gpwilson_force.cc b/tests/forces/Test_gpwilson_force.cc new file mode 100644 index 00000000..5a0a72bf --- /dev/null +++ b/tests/forces/Test_gpwilson_force.cc @@ -0,0 +1,169 @@ + /************************************************************************************* + + Grid physics library, www.github.com/paboyle/Grid + + Source file: ./tests/Test_gpdwf_force.cc + + Copyright (C) 2015 + +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 distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + See the full license in the file "LICENSE" in the top level distribution directory + *************************************************************************************/ + /* END LEGAL */ +#include + +using namespace std; +using namespace Grid; +using namespace Grid::QCD; + +#define parallel_for PARALLEL_FOR_LOOP for + +int main (int argc, char ** argv) +{ + Grid_init(&argc,&argv); + + std::vector latt_size = GridDefaultLatt(); + std::vector simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd()); + std::vector mpi_layout = GridDefaultMpi(); + + const int Ls=8; + + GridCartesian * UGrid = SpaceTimeGrid::makeFourDimGrid(GridDefaultLatt(), + GridDefaultSimd(Nd,vComplex::Nsimd()), + GridDefaultMpi()); + GridRedBlackCartesian * UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(UGrid); + GridCartesian * FGrid = UGrid; + GridRedBlackCartesian * FrbGrid = UrbGrid; + + std::vector seeds4({1,2,3,4}); + GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds4); + + int threads = GridThread::GetThreads(); + std::cout< twists(Nd,0); twists[nu] = 1; + GparityWilsonFermionR::ImplParams params; params.twists = twists; + GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params); + Wil.M (phi,Mphi); + + ComplexD S = innerProduct(Mphi,Mphi); // pdag MdagM p + + // get the deriv of phidag MdagM phi with respect to "U" + LatticeGaugeField UdSdU(UGrid); + LatticeGaugeField tmp(UGrid); + + Wil.MDeriv(tmp , Mphi, phi,DaggerNo ); UdSdU=tmp; + Wil.MDeriv(tmp , phi, Mphi,DaggerYes ); UdSdU=(UdSdU+tmp); + + FermionField Ftmp (FGrid); + + //////////////////////////////////// + // Modify the gauge field a little + //////////////////////////////////// + RealD dt = 0.00001; + + LatticeColourMatrix mommu(UGrid); + LatticeColourMatrix forcemu(UGrid); + LatticeGaugeField mom(UGrid); + LatticeGaugeField Uprime(UGrid); + + for(int mu=0;mu(mom,mommu,mu); + + // fourth order exponential approx + parallel_for(auto i=mom.begin();i(UdSdU,mu); + mommu=Ta(mommu)*2.0; + PokeIndex(UdSdU,mommu,mu); + } + + for(int mu=0;mu(UdSdU,mu); + mommu = PeekIndex(mom,mu); + + // Update PF action density + dS = dS+trace(mommu*forcemu)*dt; + + } + + Complex dSpred = sum(dS); + + // From TwoFlavourPseudoFermion: + ////////////////////////////////////////////////////// + // dS/du = - phi^dag (Mdag M)^-1 [ Mdag dM + dMdag M ] (Mdag M)^-1 phi + // = - phi^dag M^-1 dM (MdagM)^-1 phi - phi^dag (MdagM)^-1 dMdag dM (Mdag)^-1 phi + // + // = - Ydag dM X - Xdag dMdag Y + // + ////////////////////////////////////////////////////// + // So must take dSdU - adj(dSdU) and left multiply by mom to get dS/dt. + // + // + + std::cout << GridLogMessage << " S "<