1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 12:47:05 +01:00
This commit is contained in:
Peter Boyle
2015-06-19 17:24:05 +01:00
20 changed files with 474 additions and 275 deletions

View File

@ -1,13 +1,5 @@
bin_PROGRAMS = Test_GaugeAction Test_Metropolis Test_cayley_cg Test_cayley_coarsen_support Test_cayley_even_odd Test_cayley_ldop_cg Test_cayley_ldop_cr Test_cf_coarsen_support Test_cf_cr_unprec Test_contfrac_cg Test_contfrac_even_odd Test_cshift Test_cshift_red_black Test_dwf_cg_prec Test_dwf_cg_schur Test_dwf_cg_unprec Test_dwf_cr_unprec Test_dwf_even_odd Test_gamma Test_lie_generators Test_main Test_multishift_sqrt Test_nersc_io Test_remez Test_rng Test_rng_fixed Test_simd Test_stencil Test_wilson_cg_prec Test_wilson_cg_schur Test_wilson_cg_unprec Test_wilson_cr_unprec Test_wilson_even_odd
Test_GaugeAction_SOURCES=Test_GaugeAction.cc
Test_GaugeAction_LDADD=-lGrid
Test_Metropolis_SOURCES=Test_Metropolis.cc
Test_Metropolis_LDADD=-lGrid
bin_PROGRAMS = Test_cayley_cg Test_cayley_coarsen_support Test_cayley_even_odd Test_cayley_ldop_cg Test_cayley_ldop_cr Test_cf_coarsen_support Test_cf_cr_unprec Test_contfrac_cg Test_contfrac_even_odd Test_cshift Test_cshift_red_black Test_dwf_cg_prec Test_dwf_cg_schur Test_dwf_cg_unprec Test_dwf_cr_unprec Test_dwf_even_odd Test_gamma Test_GaugeAction Test_lie_generators Test_main Test_multishift_sqrt Test_nersc_io Test_remez Test_rng Test_rng_fixed Test_simd Test_stencil Test_wilson_cg_prec Test_wilson_cg_schur Test_wilson_cg_unprec Test_wilson_cr_unprec Test_wilson_even_odd
Test_cayley_cg_SOURCES=Test_cayley_cg.cc
@ -78,6 +70,10 @@ Test_gamma_SOURCES=Test_gamma.cc
Test_gamma_LDADD=-lGrid
Test_GaugeAction_SOURCES=Test_GaugeAction.cc
Test_GaugeAction_LDADD=-lGrid
Test_lie_generators_SOURCES=Test_lie_generators.cc
Test_lie_generators_LDADD=-lGrid

View File

@ -44,49 +44,6 @@ int main (int argc, char ** argv)
// SU5::printGenerators();
// SU5::testGenerators();
///////////////////////////////
// Configuration of known size
///////////////////////////////
NerscField header;
std::string file("./ckpoint_lat.400");
LatticeGaugeField Umu(grid);
// readNerscConfiguration(Umu,header,file);
Umu=1.0; // Cold start
// RNG set up for test
std::vector<int> pseeds({1,2,3,4,5}); // once I caught a fish alive
std::vector<int> sseeds({6,7,8,9,10});// then i let it go again
GridParallelRNG pRNG(grid); pRNG.SeedFixedIntegers(pseeds);
GridSerialRNG sRNG; sRNG.SeedFixedIntegers(sseeds);
// SU3 colour operatoions
LatticeColourMatrix link(grid);
LatticeColourMatrix staple(grid);
int mu=0;
// Get Staple
ColourWilsonLoops::Staple(staple,Umu,mu);
// Get Link
link = peekIndex<LorentzIndex>(Umu,mu);
// Apply heatbath to the link
RealD beta=6.0;
int subgroup=0;
int nhb=1;
int trials=0;
int fails=0;
LatticeInteger one(rbGrid); one = 1; // fill with ones
LatticeInteger mask(grid); mask= zero;
one.checkerboard=Even;
setCheckerboard(mask,one);
// update Even checkerboard
SU3::SubGroupHeatBath(sRNG,pRNG,beta,link,staple,subgroup,
nhb,trials,fails,mask);
Grid_finalize();
}

View File

@ -1,9 +1,5 @@
#include "Grid.h"
//DEBUG
#ifdef SSE4
#include "simd/Grid_vector_types.h"
#endif
using namespace std;
using namespace Grid;
@ -216,16 +212,27 @@ int main (int argc, char ** argv)
scm=transposeIndex<1>(scm);
//random(SerialRNG, cm);
//std::cout << cm << std::endl;
random(SerialRNG, cm);
std::cout << cm << std::endl;
cm = Ta(cm);
//TComplex tracecm= trace(cm);
//std::cout << cm << " "<< tracecm << std::endl;
TComplex tracecm= trace(cm);
std::cout << cm << std::endl;
cm = Exponentiate(cm, 1.0, 12);
std::cout << cm << " " << std::endl;
Complex det = Determinant(cm);
std::cout << "determinant: " << det << std::endl;
cm = ProjectOnGroup(cm);
std::cout << cm << " " << std::endl;
cm = ProjectOnGroup(cm);
std::cout << cm << " " << std::endl;
det = Determinant(cm);
std::cout << "determinant: " << det << std::endl;
cm = Exponentiate(cm, 1.0, 10);
// Foo = Foo+scalar; // LatticeColourMatrix+Scalar
// Foo = Foo*scalar; // LatticeColourMatrix*Scalar
@ -237,6 +244,9 @@ int main (int argc, char ** argv)
LatticeComplex trscMat(&Fine);
trscMat = trace(scMat); // Trace
// Exponentiate test
cMat = expMat(cMat, ComplexD(1.0, 0.0));
// LatticeComplex trlcMat(&Fine);
// trlcMat = trace(lcMat); // Trace involving iVector - now generates error
@ -296,10 +306,12 @@ int main (int argc, char ** argv)
LatticeInteger coor(&Fine);
LatticeCoordinate(coor,d);
lex = lex + coor*mm[d];
}
Bar = zero;
Bar = where(lex<Integer(10),Foo,Bar);
cout << "peeking sites..\n";
{
std::vector<int> coor(4);
for(coor[3]=0;coor[3]<latt_size[3]/mpi_layout[3];coor[3]++){