1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00
This commit is contained in:
Alessandro Lupo 2021-10-12 09:06:15 +01:00
parent 89457e25e3
commit 1d6e708083
5 changed files with 99 additions and 1 deletions

View File

@ -815,6 +815,7 @@ AC_CONFIG_FILES(tests/lanczos/Makefile)
AC_CONFIG_FILES(tests/smearing/Makefile)
AC_CONFIG_FILES(tests/qdpxx/Makefile)
AC_CONFIG_FILES(tests/testu01/Makefile)
AC_CONFIG_FILES(tests/Sp2n/Makefile)
AC_CONFIG_FILES(benchmarks/Makefile)
AC_CONFIG_FILES(examples/Makefile)
AC_OUTPUT

View File

@ -1,4 +1,4 @@
SUBDIRS = . core forces hmc solver debug smearing IO lanczos
SUBDIRS = . core forces hmc solver debug smearing IO lanczos sp2n
if BUILD_CHROMA_REGRESSION
SUBDIRS+= qdpxx

7
tests/sp2n/Makefile.am Normal file
View File

@ -0,0 +1,7 @@
.PHONY: check
include Make.inc
check: tests
./Test_project_on_Sp
./test_sp2n_lie_gen

View File

@ -0,0 +1,35 @@
#include <Grid/Grid.h>
using namespace Grid;
int main (int argc, char **argv)
{
Grid_init(&argc,&argv);
Coordinate latt_size = GridDefaultLatt();
Coordinate simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd());
Coordinate mpi_layout = GridDefaultMpi();
GridCartesian Grid(latt_size,simd_layout,mpi_layout);
GridRedBlackCartesian RBGrid(&Grid);
LatticeGaugeField Umu(&Grid);
LatticeColourMatrixD U(&Grid);
std::vector<int> pseeds({1,2,3,4,5});
std::vector<int> sseeds({6,7,8,9,10});
GridParallelRNG pRNG(&Grid); pRNG.SeedFixedIntegers(pseeds);
GridSerialRNG sRNG; sRNG.SeedFixedIntegers(sseeds);
SU<Nc>::HotConfiguration(pRNG,Umu);
U = PeekIndex<LorentzIndex>(Umu,0);
U = ProjectOnSpGroup(U);
Grid_finalize();
}

View File

@ -0,0 +1,55 @@
#include <Grid/Grid.h>
#include <Grid/qcd/utils/Sp2n.h>
using namespace Grid;
int main(int argc, char** argv) {
Grid_init(&argc, &argv);
//std::vector<int> latt({4, 4, 4, 8});
//GridCartesian* grid = SpaceTimeGrid::makeFourDimGrid(
//latt, GridDefaultSimd(Nd, vComplex::Nsimd()), GridDefaultMpi());
//GridRedBlackCartesian* rbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(grid);
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
std::cout << GridLogMessage << "* Generators for Sp(2)" << std::endl;
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
Sp2::printGenerators();
Sp2::testGenerators();
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
std::cout << GridLogMessage << "* Generators for Sp(4)" << std::endl;
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
Sp4::printGenerators();
Sp4::testGenerators();
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
std::cout << GridLogMessage << "* Generators for Sp(6)" << std::endl;
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
Sp6::printGenerators();
Sp6::testGenerators();
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
std::cout << GridLogMessage << "* Generators for Sp(8)" << std::endl;
std::cout << GridLogMessage << "*********************************************"
<< std::endl;
Sp8::printGenerators();
Sp8::testGenerators();
Grid_finalize();
}