mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
tests!
This commit is contained in:
parent
b6496b6cb5
commit
d4866157fe
@ -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
|
||||
|
@ -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
7
tests/sp2n/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
.PHONY: check
|
||||
|
||||
include Make.inc
|
||||
|
||||
check: tests
|
||||
./Test_project_on_Sp
|
||||
./test_sp2n_lie_gen
|
35
tests/sp2n/Test_project_on_Sp.cc
Normal file
35
tests/sp2n/Test_project_on_Sp.cc
Normal 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();
|
||||
|
||||
|
||||
}
|
55
tests/sp2n/Test_sp2n_lie_gen.cc
Normal file
55
tests/sp2n/Test_sp2n_lie_gen.cc
Normal 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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user