1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45: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();
typedef typename LatticeMatrixType::vector_type vector_type;
typedef typename LatticeMatrixType::scalar_type scalar_type;
typedef iSinglet<vector_type> vTComplexType;

View File

@ -566,43 +566,40 @@ static void taProj(const LatticeMatrixType &in, LatticeMatrixType &out, GroupNam
/*
* Fundamental rep gauge xform
*/
template <typename Fundamental, typename GaugeMat, ONLY_IF_SU>
static void GaugeTransformFundamental(Fundamental &ferm, GaugeMat &g) {
template<typename Fundamental,typename GaugeMat>
static void GaugeTransformFundamental( Fundamental &ferm, GaugeMat &g){
GridBase *grid = ferm._grid;
conformable(grid, g._grid);
ferm = g * ferm;
conformable(grid,g._grid);
ferm = g*ferm;
}
/*
* Adjoint rep gauge xform
*/
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU>
static void GaugeTransform(GaugeField &Umu, GaugeMat &g) {
template<typename Gimpl>
static void GaugeTransform(typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
GridBase *grid = Umu.Grid();
conformable(grid, g.Grid());
conformable(grid,g.Grid());
GaugeMat U(grid);
GaugeMat ag(grid);
ag = adj(g);
typename Gimpl::GaugeLinkField U(grid);
typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
for (int mu = 0; mu < Nd; mu++) {
U = PeekIndex<LorentzIndex>(Umu, mu);
U = g * U * Cshift(ag, mu, 1);
PokeIndex<LorentzIndex>(Umu, U, mu);
for(int mu=0;mu<Nd;mu++){
U= PeekIndex<LorentzIndex>(Umu,mu);
U = g*U*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
PokeIndex<LorentzIndex>(Umu,U,mu);
}
}
template <typename GaugeMat, ONLY_IF_SU>
static void GaugeTransform(std::vector<GaugeMat> &U, GaugeMat &g) {
template<typename Gimpl>
static void GaugeTransform( std::vector<typename Gimpl::GaugeLinkField> &U, typename Gimpl::GaugeLinkField &g){
GridBase *grid = g.Grid();
GaugeMat ag(grid);
ag = adj(g);
for (int mu = 0; mu < Nd; mu++) {
U[mu] = g * U[mu] * Cshift(ag, mu, 1);
typename Gimpl::GaugeLinkField ag(grid); ag = adj(g);
for(int mu=0;mu<Nd;mu++){
U[mu] = g*U[mu]*Gimpl::CshiftLink(ag, mu, 1); //BC-aware
}
}
template <typename GaugeField, typename GaugeMat, ONLY_IF_SU>
static void RandomGaugeTransform(GridParallelRNG &pRNG, GaugeField &Umu,
GaugeMat &g) {
LieRandomize(pRNG, g, 1.0);
GaugeTransform(Umu, g);
template<typename Gimpl>
static void RandomGaugeTransform(GridParallelRNG &pRNG, typename Gimpl::GaugeField &Umu, typename Gimpl::GaugeLinkField &g){
LieRandomize(pRNG,g,1.0);
GaugeTransform<Gimpl>(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_MSG_ERROR(["--enable-symplectic is either yes or no"]);;
esac
############### FP16 conversions
AC_ARG_ENABLE([sfw-fp16],

View File

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

View File

@ -44,11 +44,6 @@ directory
using namespace std;
using namespace Grid;
<<<<<<< HEAD
=======
;
>>>>>>> develop
int main(int argc, char** argv) {
Grid_init(&argc, &argv);
@ -67,15 +62,12 @@ int main(int argc, char** argv) {
SU2::printGenerators();
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;
SU2Adjoint::printGenerators();
SU2::testGenerators();
SU2Adjoint::testGenerators();
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
std::cout << GridLogMessage << "* Generators for SU(3)" << std::endl;
@ -156,6 +148,7 @@ int main(int argc, char** argv) {
pokeLorentz(UrVr,Urmu*Vrmu, mu);
}
#if Nc==3
typedef typename SU_Adjoint<Nc>::AMatrix AdjointMatrix;
typename AdjointRep<Nc>::LatticeField Diff_check = UVr - UrVr;
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);
std::cout << "------------------"<<std::endl;
}}}
#endif
// Check correspondence of algebra and group transformations
// Create a random vector
SU<Nc>::LatticeAlgebraVector h_adj(grid);
@ -434,8 +427,6 @@ int main(int argc, char** argv) {
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
<<<<<<< HEAD
std::cout << GridLogMessage << "Two Index anti-Symmetric: Check Group Structure"
<< std::endl;
// Testing HMC representation classes

View File

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

View File

@ -67,8 +67,10 @@ int main(int argc, char **argv)
TopologyObsParameters TopParams;
TopParams.interval = 5;
TopParams.do_smearing = true;
TopParams.Smearing.steps = 200;
TopParams.Smearing.step_size = 0.01;
TopParams.Smearing.init_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.maxTau = 2.0;
TheHMC.Resources.AddObservable<QObs>(TopParams);