Skip to content
Snippets Groups Projects
Commit d00fb122 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

MultiQTest -> restore simpler name

parent 2da97419
No related branches found
No related tags found
1 merge request!1186adapt to libff!54: use their vertices(), rm m_vertices
......@@ -12,7 +12,7 @@ TEST_F(FormFactorOtherTest, HorizontalCylinderAsCylinder)
Cylinder f0(R, L);
HorizontalCylinder f1(R, L);
int failures = formfactorTest::run_test3_for_many_q(
int failures = formfactorTest::run_test_for_many_q(
[&](C3 q) -> complex_t { return f0.formfactor(q); },
[&](C3 q) -> complex_t { return f1.formfactor(q.rotatedY(M_PI / 2)); },
1e-99, 100, 2e-15, true);
......@@ -26,7 +26,7 @@ TEST_F(FormFactorOtherTest, HorizontalCylinderSlices)
HorizontalCylinder f1a(R, L, -R, -0.3 * R);
HorizontalCylinder f1b(R, L, -0.3 * R, +R);
int failures = formfactorTest::run_test3_for_many_q(
int failures = formfactorTest::run_test_for_many_q(
[&](C3 q) -> complex_t { return f0.formfactor(q); },
[&](C3 q) -> complex_t { return f1a.formfactor(q)
+ exp_I(q.z() * 0.7 * R) * f1b.formfactor(q); },
......
......@@ -11,7 +11,7 @@ class FFSpecializationTest : public testing::Test {
protected:
void run_test(IFormFactor* ff0, IFormFactor* ff1, double eps, double qmag1, double qmag2)
{
int failures = formfactorTest::run_test3_for_many_q(
int failures = formfactorTest::run_test_for_many_q(
[&](C3 q) -> complex_t { return ff0->formfactor(q); },
[&](C3 q) -> complex_t { return ff1->formfactor(q); },
qmag1, qmag2, eps);
......
......@@ -11,7 +11,7 @@ protected:
void run_test(IFormFactor* ff, std::function<C3(const C3&)> trafo, double eps, double qmag1,
double qmag2)
{
int failures = formfactorTest::run_test3_for_many_q(
int failures = formfactorTest::run_test_for_many_q(
[&](C3 q) -> complex_t { return ff->formfactor(q); },
[&](C3 q) -> complex_t { return ff->formfactor(trafo(q)); },
qmag1, qmag2, eps);
......
......@@ -16,7 +16,7 @@ const auto qlist = testing::Combine(
testing::Values(-1e-15, +1e-14, -1e-11, 1e-7, -1e-3, .1, 1, sqrt(2), sqrt(3)),
testing::Values(0, -4e-16, +8e-16, -5e-11, 3e-7, -2e-3, .01, .1));
int run_test3_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
int run_test_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
double qmag_min, double qmag_max, double eps, bool real_only)
{
auto evaluate = [&](C3 q) -> std::tuple<complex_t, complex_t, double, double, double> {
......
......@@ -12,7 +12,7 @@ namespace formfactorTest {
//! Runs tests of fff0(q) vs fff1(q) for a huge number of different vectors q.
//! The callback functions fff0/1 may compute ff0(q) vs ff1(q), or ff(q) vs ff(q').
int run_test3_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
int run_test_for_many_q(std::function<complex_t(C3)> fff0, std::function<complex_t(C3)> fff1,
double qmag_min, double qmag_max, double eps, bool real_only = false);
} // namespace formfactorTest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment