1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00

deal with post-merge trauma

This commit is contained in:
Alessandro Lupo 2023-06-13 17:21:01 +01:00
parent e09dfbf1c2
commit c797cbe737
7 changed files with 35 additions and 45 deletions

View File

@ -176,7 +176,6 @@ class GaugeGroup {
GridBase *grid = out.Grid(); GridBase *grid = out.Grid();
typedef typename LatticeMatrixType::vector_type vector_type; typedef typename LatticeMatrixType::vector_type vector_type;
typedef typename LatticeMatrixType::scalar_type scalar_type;
typedef iSinglet<vector_type> vTComplexType; typedef iSinglet<vector_type> vTComplexType;

View File

@ -566,43 +566,40 @@ static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupNam
/* /*
* Fundamental rep gauge xform * Fundamental rep gauge xform
*/ */
template <typename Fundamental, typename GaugeMat, ONLY_IF_SU> template<typename Fundamental,typename GaugeMat>
static void GaugeTransformFundamental(Fundamental &ferm, GaugeMat &g) { static void GaugeTransformFundamental( Fundamental &ferm, GaugeMat &g){
GridBase *grid = ferm._grid; GridBase *grid = ferm._grid;
conformable(grid, g._grid); conformable(grid,g._grid);
ferm = g * ferm; ferm = g*ferm;
} }
/* /*
* Adjoint rep gauge xform * Adjoint rep gauge xform
*/ */
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU> template<typename Gimpl>
static void GaugeTransform(GaugeField &Umu, GaugeMat &g) { static void GaugeTransform(typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
GridBase *grid = Umu.Grid(); GridBase *grid = Umu.Grid();
conformable(grid, g.Grid()); conformable(grid,g.Grid());
GaugeMat U(grid); typename Gimpl::GaugeLinkField U(grid);
GaugeMat ag(grid); typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
ag = adj(g);
for (int mu = 0; mu < Nd; mu++) { for(int mu=0;mu<Nd;mu++){
U = PeekIndex<LorentzIndex>(Umu, mu); U= PeekIndex<LorentzIndex>(Umu,mu);
U = g * U * Cshift(ag, mu, 1); U = g*U*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
PokeIndex<LorentzIndex>(Umu, U, mu); PokeIndex<LorentzIndex>(Umu,U,mu);
} }
} }
template <typename GaugeMat, ONLY_IF_SU> template<typename Gimpl>
static void GaugeTransform(std::vector<GaugeMat> &U, GaugeMat &g) { static void GaugeTransform( std::vector<typename Gimpl::GaugeLinkField> &U, typename Gimpl::GaugeLinkField &g){
GridBase *grid = g.Grid(); GridBase *grid = g.Grid();
GaugeMat ag(grid); typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
ag = adj(g); for(int mu=0;mu<Nd;mu++){
for (int mu = 0; mu < Nd; mu++) { U[mu] = g*U[mu]*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
U[mu] = g * U[mu] * Cshift(ag, mu, 1);
} }
} }
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU> template<typename Gimpl>
static void RandomGaugeTransform(GridParallelRNG &pRNG, GaugeField &Umu, static void RandomGaugeTransform(GridParallelRNG &pRNG, typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
GaugeMat &g) { LieRandomize(pRNG,g,1.0);
LieRandomize(pRNG, g, 1.0); GaugeTransform<Gimpl>(Umu,g);
GaugeTransform(Umu, g);
} }

View File

@ -215,6 +215,7 @@ case ${ac_ENABLE_SP} in
AC_DEFINE([Sp2n_config],[0],[gauge group SUn], [have_sp2n=false]);; AC_DEFINE([Sp2n_config],[0],[gauge group SUn], [have_sp2n=false]);;
*) *)
AC_MSG_ERROR(["--enable-symplectic is either yes or no"]);; AC_MSG_ERROR(["--enable-symplectic is either yes or no"]);;
esac
############### FP16 conversions ############### FP16 conversions
AC_ARG_ENABLE([sfw-fp16], AC_ARG_ENABLE([sfw-fp16],

View File

@ -218,9 +218,9 @@ void runBenchmark(int* argc, char*** argv) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
Grid_init(&argc, &argv); Grid_init(&argc, &argv);
#if Nc==3
runBenchmark<vComplexD>(&argc, &argv); runBenchmark<vComplexD>(&argc, &argv);
runBenchmark<vComplexF>(&argc, &argv); runBenchmark<vComplexF>(&argc, &argv);
#endif
Grid_finalize(); Grid_finalize();
} }

View File

@ -44,11 +44,6 @@ directory
using namespace std; using namespace std;
using namespace Grid; using namespace Grid;
<<<<<<< HEAD
=======
;
>>>>>>> develop
int main(int argc, char** argv) { int main(int argc, char** argv) {
Grid_init(&argc, &argv); Grid_init(&argc, &argv);
@ -67,9 +62,6 @@ int main(int argc, char** argv) {
SU2::printGenerators(); SU2::printGenerators();
std::cout << "Dimension of adjoint representation: "<< SU2Adjoint::Dimension << std::endl; std::cout << "Dimension of adjoint representation: "<< SU2Adjoint::Dimension << std::endl;
// guard as this code fails to compile for Nc != 3
#if 1
std::cout << " Printing Adjoint Generators"<< std::endl; std::cout << " Printing Adjoint Generators"<< std::endl;
SU2Adjoint::printGenerators(); SU2Adjoint::printGenerators();
@ -156,6 +148,7 @@ int main(int argc, char** argv) {
pokeLorentz(UrVr,Urmu*Vrmu, mu); pokeLorentz(UrVr,Urmu*Vrmu, mu);
} }
#if Nc==3
typedef typename SU_Adjoint<Nc>::AMatrix AdjointMatrix; typedef typename SU_Adjoint<Nc>::AMatrix AdjointMatrix;
typename AdjointRep<Nc>::LatticeField Diff_check = UVr - UrVr; typename AdjointRep<Nc>::LatticeField Diff_check = UVr - UrVr;
std::cout << GridLogMessage << "Group structure SU("<<Nc<<") check difference (Adjoint representation) : " << norm2(Diff_check) << std::endl; std::cout << GridLogMessage << "Group structure SU("<<Nc<<") check difference (Adjoint representation) : " << norm2(Diff_check) << std::endl;
@ -181,7 +174,7 @@ int main(int argc, char** argv) {
assert(abs( (2.0*tr1-tr2) ) < 1.0e-7); assert(abs( (2.0*tr1-tr2) ) < 1.0e-7);
std::cout << "------------------"<<std::endl; std::cout << "------------------"<<std::endl;
}}} }}}
#endif
// Check correspondence of algebra and group transformations // Check correspondence of algebra and group transformations
// Create a random vector // Create a random vector
SU<Nc>::LatticeAlgebraVector h_adj(grid); SU<Nc>::LatticeAlgebraVector h_adj(grid);
@ -434,8 +427,6 @@ int main(int argc, char** argv) {
std::cout << GridLogMessage << "*********************************************" std::cout << GridLogMessage << "*********************************************"
<< std::endl; << std::endl;
<<<<<<< HEAD
std::cout << GridLogMessage << "Two Index anti-Symmetric: Check Group Structure" std::cout << GridLogMessage << "Two Index anti-Symmetric: Check Group Structure"
<< std::endl; << std::endl;
// Testing HMC representation classes // Testing HMC representation classes

View File

@ -8,8 +8,8 @@ int main(int argc, char **argv) {
Grid_init(&argc, &argv); Grid_init(&argc, &argv);
typedef GenericSp2nHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper; // ok typedef GenericSp2nHMCRunnerHirep<TheRepresentations, MinimumNorm2> HMCWrapper; // ok
typedef SpWilsonImplD FermionImplPolicy; // ok typedef SpWilsonImplR FermionImplPolicy; // ok
typedef SpWilsonFermionR FermionAction; // ok typedef SpWilsonFermionD FermionAction; // ok
typedef typename FermionAction::FermionField FermionField; // ok? typedef typename FermionAction::FermionField FermionField; // ok?
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

View File

@ -67,8 +67,10 @@ int main(int argc, char **argv)
TopologyObsParameters TopParams; TopologyObsParameters TopParams;
TopParams.interval = 5; TopParams.interval = 5;
TopParams.do_smearing = true; TopParams.do_smearing = true;
TopParams.Smearing.steps = 200; TopParams.Smearing.init_step_size = 0.01;
TopParams.Smearing.step_size = 0.01; TopParams.Smearing.tolerance = 1e-5;
//TopParams.Smearing.steps = 200;
//TopParams.Smearing.step_size = 0.01;
TopParams.Smearing.meas_interval = 50; TopParams.Smearing.meas_interval = 50;
TopParams.Smearing.maxTau = 2.0; TopParams.Smearing.maxTau = 2.0;
TheHMC.Resources.AddObservable<QObs>(TopParams); TheHMC.Resources.AddObservable<QObs>(TopParams);