1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 17:55:38 +00:00

Test fft asserts

This commit is contained in:
Peter Boyle 2024-10-23 16:46:26 -04:00
parent 2877f1a268
commit eafc150034

View File

@ -39,7 +39,7 @@ int main (int argc, char ** argv)
std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl; std::cout<<GridLogMessage << "Grid is setup to use "<<threads<<" threads"<<std::endl;
Coordinate latt_size = GridDefaultLatt(); Coordinate latt_size = GridDefaultLatt();
Coordinate simd_layout( { vComplexD::Nsimd(),1,1,1}); Coordinate simd_layout = GridDefaultSimd(Nd,vComplexD::Nsimd());
Coordinate mpi_layout = GridDefaultMpi(); Coordinate mpi_layout = GridDefaultMpi();
int vol = 1; int vol = 1;
@ -279,6 +279,7 @@ int main (int argc, char ** argv)
result5 = result5 - Kinetic; result5 = result5 - Kinetic;
std::cout<<"diff "<< norm2(result5)<<std::endl; std::cout<<"diff "<< norm2(result5)<<std::endl;
assert(norm2(result5)<1.0e-4);
} }
@ -357,6 +358,7 @@ int main (int argc, char ** argv)
diff = ref - result4; diff = ref - result4;
std::cout << "result - ref "<<norm2(diff)<<std::endl; std::cout << "result - ref "<<norm2(diff)<<std::endl;
assert(norm2(diff)<1.0e-4);
} }
@ -440,6 +442,7 @@ int main (int argc, char ** argv)
diff = ref - result4; diff = ref - result4;
std::cout << "result - ref "<<norm2(diff)<<std::endl; std::cout << "result - ref "<<norm2(diff)<<std::endl;
assert(norm2(diff)<1.0e-4);
} }