35 TEST_CASE(
"gaussian random array length 1",
"[particle_base]")
38 std::vector<double> a(2);
42 CHECK(a[0] == Approx(-1.1774100224305424));
43 CHECK(a[1] == Approx(0.0));
46 TEST_CASE(
"gaussian random array length 2",
"[particle_base]")
49 std::vector<double> a(3);
53 CHECK(a[0] == Approx(-1.1774100224305424));
54 CHECK(a[1] == Approx(1.4419114152535772
e-16));
55 CHECK(a[2] == Approx(0.0));
58 TEST_CASE(
"gaussian random array length 3",
"[particle_base]")
61 std::vector<double> a(4);
65 CHECK(a[0] == Approx(-1.1774100224305424));
66 CHECK(a[1] == Approx(1.4419114152535772
e-16));
67 CHECK(a[2] == Approx(-1.1774100224305424));
68 CHECK(a[3] == Approx(0.0));
71 TEST_CASE(
"gaussian random particle attrib array length 1",
"[particle_base]")
79 CHECK(PA[0][0] == Approx(-1.1774100224305424));
82 TEST_CASE(
"gaussian random input one",
"[particle_base]")
86 std::vector<double> a(2);
92 CHECK(a[0] == Approx(8.49042441685));
93 CHECK(a[1] == Approx(0.0));
96 TEST_CASE(
"gaussian random input zero",
"[particle_base]")
100 std::vector<double> a(2);
104 CHECK(a[0] == Approx(0.0));
105 CHECK(a[1] == Approx(0.0));
108 TEST_CASE(
"makeGaussRandomWithEngine(MCCoords...)",
"[particle_base]")
111 std::vector<double>
gauss_random_vals(size_test * 3 + (size_test * 3) % 2 + size_test);
113 StdRandom<QMCTraits::FullPrecRealType> rng;
118 for (
int i = 0; i < size_test; ++i)
128 StdRandom<QMCTraits::FullPrecRealType> rng;
134 StdRandom<QMCTraits::FullPrecRealType> rng;
139 for (
int i = 0; i < size_test; ++i)
void resize(size_type n, Type_t val=Type_t())
Resize the container.
std::vector< QMCTraits::PosType > positions
helper functions for EinsplineSetBuilder
TEST_CASE("complex_helper", "[type_traits]")
Attaches a unit to a Vector for IO.
std::vector< QMCTraits::FullPrecRealType > spins
std::vector< QMCTraits::PosType > positions
void assignGaussRand(T *restrict a, unsigned n, RG &rng)
std::vector< double > gauss_random_vals(size_test *3+(size_test *3) % 2+size_test)
MCCoords< CoordsType::POS > mc_coords_rs(size_test)
MCCoords< CoordsType::POS_SPIN > mc_coords_rsspins(size_test)
A minimally functional wrapper for the since c++11 <random>
void set_value(double val)
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
void makeGaussRandomWithEngine(ParticleAttrib< TinyVector< T, D >> &a, RG &rng)