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

[j.0] + option -B_3ARCH to relax num limits for architecture of 3rd-party maintainers ()

Merging branch 'j.0'  into 'main'.

See merge request !2554
parents b2ef55da 804bd819
No related branches found
No related tags found
1 merge request!2554+ option -B_3ARCH to relax num limits for architecture of 3rd-party maintainers
Pipeline #142360 passed
...@@ -51,6 +51,8 @@ option(BA_TIDY "Invokes clang-tidy" OFF) ...@@ -51,6 +51,8 @@ option(BA_TIDY "Invokes clang-tidy" OFF)
option(ALGORITHM_DIAGNOSTIC "Let some algorithms set diagnostic variables" OFF) option(ALGORITHM_DIAGNOSTIC "Let some algorithms set diagnostic variables" OFF)
option(BA_APPLE_BUNDLE "Create a MacOS bundle" OFF) option(BA_APPLE_BUNDLE "Create a MacOS bundle" OFF)
option(BA_CPP_API "Install header files" OFF) option(BA_CPP_API "Install header files" OFF)
option(BA_3ARCH
"Reduced tolerance for persistence tests on architectures not covered by maintainer CI" OFF)
# options with non-boolean value # options with non-boolean value
......
...@@ -41,6 +41,12 @@ ...@@ -41,6 +41,12 @@
#define eps_direct_vs_python(eps_direct, eps_python) eps_python #define eps_direct_vs_python(eps_direct, eps_python) eps_python
#endif #endif
#ifdef BA_OTHER_ARCH
#define ARCH3 true
#else
#define ARCH3 false
#endif
TEST(TESTNAME, FormFactors) TEST(TESTNAME, FormFactors)
{ {
const double eps = eps_direct_vs_python(2e-13, 8e-9); const double eps = eps_direct_vs_python(2e-13, 8e-9);
...@@ -57,7 +63,7 @@ TEST(TESTNAME, FormFactors) ...@@ -57,7 +63,7 @@ TEST(TESTNAME, FormFactors)
TEST(TESTNAME, FormFactorsWithAbsorption) TEST(TESTNAME, FormFactorsWithAbsorption)
{ {
const double eps = eps_direct_vs_python(8e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 8e-13, 8e-9);
for (const std::string& ffname : FormFactorComponents().keys()) { for (const std::string& ffname : FormFactorComponents().keys()) {
const IFormFactor* ff = FormFactorComponents().getItem(ffname)->clone(); const IFormFactor* ff = FormFactorComponents().getItem(ffname)->clone();
ASSERT(ff); ASSERT(ff);
...@@ -79,7 +85,7 @@ TEST(TESTNAME, GISASAbsorptiveSLDLayers) ...@@ -79,7 +85,7 @@ TEST(TESTNAME, GISASAbsorptiveSLDLayers)
TEST(TESTNAME, CylindersAndPrisms) TEST(TESTNAME, CylindersAndPrisms)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CylindersAndPrisms", *sim, eps)); EXPECT_TRUE(runTest("CylindersAndPrisms", *sim, eps));
...@@ -87,7 +93,7 @@ TEST(TESTNAME, CylindersAndPrisms) ...@@ -87,7 +93,7 @@ TEST(TESTNAME, CylindersAndPrisms)
TEST(TESTNAME, RadialParacrystal) TEST(TESTNAME, RadialParacrystal)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRadialParacrystal()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRadialParacrystal());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("RadialParacrystal", *sim, eps)); EXPECT_TRUE(runTest("RadialParacrystal", *sim, eps));
...@@ -95,7 +101,7 @@ TEST(TESTNAME, RadialParacrystal) ...@@ -95,7 +101,7 @@ TEST(TESTNAME, RadialParacrystal)
TEST(TESTNAME, HardDisk) TEST(TESTNAME, HardDisk)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createHardDisk()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createHardDisk());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("HardDisk", *sim, eps)); EXPECT_TRUE(runTest("HardDisk", *sim, eps));
...@@ -103,7 +109,7 @@ TEST(TESTNAME, HardDisk) ...@@ -103,7 +109,7 @@ TEST(TESTNAME, HardDisk)
TEST(TESTNAME, Basic2DParacrystal) TEST(TESTNAME, Basic2DParacrystal)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
for (const std::string& pdfname : Profile2DComponents().keys()) { for (const std::string& pdfname : Profile2DComponents().keys()) {
const IProfile2D* pdf2 = Profile2DComponents().getItem(pdfname)->clone(); const IProfile2D* pdf2 = Profile2DComponents().getItem(pdfname)->clone();
ASSERT(pdf2); ASSERT(pdf2);
...@@ -126,7 +132,7 @@ TEST(TESTNAME, HexParacrystal) ...@@ -126,7 +132,7 @@ TEST(TESTNAME, HexParacrystal)
TEST(TESTNAME, Lattice1D) TEST(TESTNAME, Lattice1D)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createLattice1D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createLattice1D());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("Lattice1D", *sim, eps)); EXPECT_TRUE(runTest("Lattice1D", *sim, eps));
...@@ -143,7 +149,7 @@ TEST(TESTNAME, RectParacrystal) ...@@ -143,7 +149,7 @@ TEST(TESTNAME, RectParacrystal)
TEST(TESTNAME, CoreShellParticle) TEST(TESTNAME, CoreShellParticle)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCoreShellParticle()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCoreShellParticle());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CoreShellParticle", *sim, eps)); EXPECT_TRUE(runTest("CoreShellParticle", *sim, eps));
...@@ -151,7 +157,7 @@ TEST(TESTNAME, CoreShellParticle) ...@@ -151,7 +157,7 @@ TEST(TESTNAME, CoreShellParticle)
TEST(TESTNAME, CoreShellBoxRotateZandY) TEST(TESTNAME, CoreShellBoxRotateZandY)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCoreShellBoxRotateZandY()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCoreShellBoxRotateZandY());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CoreShellBoxRotateZandY", *sim, eps)); EXPECT_TRUE(runTest("CoreShellBoxRotateZandY", *sim, eps));
...@@ -167,7 +173,7 @@ TEST(TESTNAME, MultiLayerWithRoughness) ...@@ -167,7 +173,7 @@ TEST(TESTNAME, MultiLayerWithRoughness)
TEST(TESTNAME, SquareLattice2D) TEST(TESTNAME, SquareLattice2D)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSquareLattice2D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSquareLattice2D());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("SquareLattice2D", *sim, eps)); EXPECT_TRUE(runTest("SquareLattice2D", *sim, eps));
...@@ -175,7 +181,7 @@ TEST(TESTNAME, SquareLattice2D) ...@@ -175,7 +181,7 @@ TEST(TESTNAME, SquareLattice2D)
TEST(TESTNAME, CenteredSquareLattice2D) TEST(TESTNAME, CenteredSquareLattice2D)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCenteredSquareLattice2D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCenteredSquareLattice2D());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CenteredSquareLattice2D", *sim, eps)); EXPECT_TRUE(runTest("CenteredSquareLattice2D", *sim, eps));
...@@ -183,7 +189,7 @@ TEST(TESTNAME, CenteredSquareLattice2D) ...@@ -183,7 +189,7 @@ TEST(TESTNAME, CenteredSquareLattice2D)
TEST(TESTNAME, RotatedSquareLattice2D) TEST(TESTNAME, RotatedSquareLattice2D)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRotatedSquareLattice2D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRotatedSquareLattice2D());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("RotatedSquareLattice2D", *sim, eps)); EXPECT_TRUE(runTest("RotatedSquareLattice2D", *sim, eps));
...@@ -191,7 +197,7 @@ TEST(TESTNAME, RotatedSquareLattice2D) ...@@ -191,7 +197,7 @@ TEST(TESTNAME, RotatedSquareLattice2D)
TEST(TESTNAME, FiniteSquareLattice2D) TEST(TESTNAME, FiniteSquareLattice2D)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createFiniteSquareLattice2D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createFiniteSquareLattice2D());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("FiniteSquareLattice2D", *sim, eps)); EXPECT_TRUE(runTest("FiniteSquareLattice2D", *sim, eps));
...@@ -199,7 +205,7 @@ TEST(TESTNAME, FiniteSquareLattice2D) ...@@ -199,7 +205,7 @@ TEST(TESTNAME, FiniteSquareLattice2D)
TEST(TESTNAME, RotatedPyramids) TEST(TESTNAME, RotatedPyramids)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRotatedPyramids()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createRotatedPyramids());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("RotatedPyramids", *sim, eps)); EXPECT_TRUE(runTest("RotatedPyramids", *sim, eps));
...@@ -215,7 +221,7 @@ TEST(TESTNAME, ThickAbsorptiveSampleWithRoughness) ...@@ -215,7 +221,7 @@ TEST(TESTNAME, ThickAbsorptiveSampleWithRoughness)
TEST(TESTNAME, Compound) TEST(TESTNAME, Compound)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCompound()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCompound());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("Compound", *sim, eps)); EXPECT_TRUE(runTest("Compound", *sim, eps));
...@@ -223,7 +229,7 @@ TEST(TESTNAME, Compound) ...@@ -223,7 +229,7 @@ TEST(TESTNAME, Compound)
TEST(TESTNAME, CompoundPlus) TEST(TESTNAME, CompoundPlus)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCompoundPlus()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCompoundPlus());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CompoundPlus", *sim, eps)); EXPECT_TRUE(runTest("CompoundPlus", *sim, eps));
...@@ -231,7 +237,7 @@ TEST(TESTNAME, CompoundPlus) ...@@ -231,7 +237,7 @@ TEST(TESTNAME, CompoundPlus)
TEST(TESTNAME, BoxCompositionRotateX) TEST(TESTNAME, BoxCompositionRotateX)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateX()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateX());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("BoxCompositionRotateX", *sim, eps)); EXPECT_TRUE(runTest("BoxCompositionRotateX", *sim, eps));
...@@ -239,7 +245,7 @@ TEST(TESTNAME, BoxCompositionRotateX) ...@@ -239,7 +245,7 @@ TEST(TESTNAME, BoxCompositionRotateX)
TEST(TESTNAME, BoxCompositionRotateY) TEST(TESTNAME, BoxCompositionRotateY)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateY()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateY());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("BoxCompositionRotateY", *sim, eps)); EXPECT_TRUE(runTest("BoxCompositionRotateY", *sim, eps));
...@@ -247,7 +253,7 @@ TEST(TESTNAME, BoxCompositionRotateY) ...@@ -247,7 +253,7 @@ TEST(TESTNAME, BoxCompositionRotateY)
TEST(TESTNAME, BoxCompositionRotateZ) TEST(TESTNAME, BoxCompositionRotateZ)
{ {
const double eps = eps_direct_vs_python(6e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 6e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateZ()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateZ());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("BoxCompositionRotateZ", *sim, eps)); EXPECT_TRUE(runTest("BoxCompositionRotateZ", *sim, eps));
...@@ -255,7 +261,7 @@ TEST(TESTNAME, BoxCompositionRotateZ) ...@@ -255,7 +261,7 @@ TEST(TESTNAME, BoxCompositionRotateZ)
TEST(TESTNAME, BoxCompositionRotateZandY) TEST(TESTNAME, BoxCompositionRotateZandY)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateZandY()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxCompositionRotateZandY());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("BoxCompositionRotateZandY", *sim, eps)); EXPECT_TRUE(runTest("BoxCompositionRotateZandY", *sim, eps));
...@@ -263,7 +269,7 @@ TEST(TESTNAME, BoxCompositionRotateZandY) ...@@ -263,7 +269,7 @@ TEST(TESTNAME, BoxCompositionRotateZandY)
TEST(TESTNAME, BoxStackComposition) TEST(TESTNAME, BoxStackComposition)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxStackComposition()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxStackComposition());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("BoxStackComposition", *sim, eps)); EXPECT_TRUE(runTest("BoxStackComposition", *sim, eps));
...@@ -271,7 +277,7 @@ TEST(TESTNAME, BoxStackComposition) ...@@ -271,7 +277,7 @@ TEST(TESTNAME, BoxStackComposition)
TEST(TESTNAME, MultipleLayout) TEST(TESTNAME, MultipleLayout)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMultipleLayout()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMultipleLayout());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("MultipleLayout", *sim, eps)); EXPECT_TRUE(runTest("MultipleLayout", *sim, eps));
...@@ -279,7 +285,7 @@ TEST(TESTNAME, MultipleLayout) ...@@ -279,7 +285,7 @@ TEST(TESTNAME, MultipleLayout)
TEST(TESTNAME, ApproximationDA) TEST(TESTNAME, ApproximationDA)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionDAModel()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionDAModel());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("ApproximationDA", *sim, eps)); EXPECT_TRUE(runTest("ApproximationDA", *sim, eps));
...@@ -287,7 +293,7 @@ TEST(TESTNAME, ApproximationDA) ...@@ -287,7 +293,7 @@ TEST(TESTNAME, ApproximationDA)
TEST(TESTNAME, ApproximationLMA) TEST(TESTNAME, ApproximationLMA)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionLMAModel()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionLMAModel());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("ApproximationLMA", *sim, eps)); EXPECT_TRUE(runTest("ApproximationLMA", *sim, eps));
...@@ -295,7 +301,7 @@ TEST(TESTNAME, ApproximationLMA) ...@@ -295,7 +301,7 @@ TEST(TESTNAME, ApproximationLMA)
TEST(TESTNAME, ApproximationSSCA) TEST(TESTNAME, ApproximationSSCA)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionSSCAModel()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSizeDistributionSSCAModel());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("ApproximationSSCA", *sim, eps)); EXPECT_TRUE(runTest("ApproximationSSCA", *sim, eps));
...@@ -303,7 +309,7 @@ TEST(TESTNAME, ApproximationSSCA) ...@@ -303,7 +309,7 @@ TEST(TESTNAME, ApproximationSSCA)
TEST(TESTNAME, CosineRipple) TEST(TESTNAME, CosineRipple)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCosineRipple()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCosineRipple());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("CosineRipple", *sim, eps)); EXPECT_TRUE(runTest("CosineRipple", *sim, eps));
...@@ -311,7 +317,7 @@ TEST(TESTNAME, CosineRipple) ...@@ -311,7 +317,7 @@ TEST(TESTNAME, CosineRipple)
TEST(TESTNAME, TriangularRipple) TEST(TESTNAME, TriangularRipple)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createTriangularRipple()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createTriangularRipple());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("TriangularRipple", *sim, eps)); EXPECT_TRUE(runTest("TriangularRipple", *sim, eps));
...@@ -327,7 +333,7 @@ TEST(TESTNAME, AsymRipple) ...@@ -327,7 +333,7 @@ TEST(TESTNAME, AsymRipple)
TEST(TESTNAME, Mesocrystal) TEST(TESTNAME, Mesocrystal)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMesocrystal()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMesocrystal());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("Mesocrystal", *sim, eps)); EXPECT_TRUE(runTest("Mesocrystal", *sim, eps));
...@@ -335,7 +341,7 @@ TEST(TESTNAME, Mesocrystal) ...@@ -335,7 +341,7 @@ TEST(TESTNAME, Mesocrystal)
TEST(TESTNAME, MesocrystalPlus) TEST(TESTNAME, MesocrystalPlus)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMesocrystalPlus()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMesocrystalPlus());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("MesocrystalPlus", *sim, eps)); EXPECT_TRUE(runTest("MesocrystalPlus", *sim, eps));
...@@ -351,7 +357,7 @@ TEST(TESTNAME, CustomMorphology) ...@@ -351,7 +357,7 @@ TEST(TESTNAME, CustomMorphology)
TEST(TESTNAME, TransformBox) TEST(TESTNAME, TransformBox)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createTransformBox()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createTransformBox());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("TransformBox", *sim, eps)); EXPECT_TRUE(runTest("TransformBox", *sim, eps));
...@@ -359,7 +365,7 @@ TEST(TESTNAME, TransformBox) ...@@ -359,7 +365,7 @@ TEST(TESTNAME, TransformBox)
TEST(TESTNAME, MagneticParticleZeroField) TEST(TESTNAME, MagneticParticleZeroField)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMagneticParticleZeroField()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createMagneticParticleZeroField());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("MagneticParticleZeroField", *sim, eps)); EXPECT_TRUE(runTest("MagneticParticleZeroField", *sim, eps));
...@@ -367,7 +373,7 @@ TEST(TESTNAME, MagneticParticleZeroField) ...@@ -367,7 +373,7 @@ TEST(TESTNAME, MagneticParticleZeroField)
TEST(TESTNAME, SlicedComposition) TEST(TESTNAME, SlicedComposition)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSlicedComposition()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createSlicedComposition());
auto sim = test::makeSimulation::MiniGISAS(*sample); auto sim = test::makeSimulation::MiniGISAS(*sample);
EXPECT_TRUE(runTest("SlicedComposition", *sim, eps)); EXPECT_TRUE(runTest("SlicedComposition", *sim, eps));
...@@ -443,7 +449,7 @@ TEST(TESTNAME, DetectorResolution) ...@@ -443,7 +449,7 @@ TEST(TESTNAME, DetectorResolution)
TEST(TESTNAME, SimulationWithMasks) TEST(TESTNAME, SimulationWithMasks)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms());
auto sim = test::makeSimulation::GISASWithMasks(*sample); auto sim = test::makeSimulation::GISASWithMasks(*sample);
EXPECT_TRUE(runTest("SimulationWithMasks", *sim, eps)); EXPECT_TRUE(runTest("SimulationWithMasks", *sim, eps));
...@@ -458,7 +464,7 @@ TEST(TESTNAME, LargeCylindersMonteCarlo) ...@@ -458,7 +464,7 @@ TEST(TESTNAME, LargeCylindersMonteCarlo)
TEST(TESTNAME, RectDetWithRoi) TEST(TESTNAME, RectDetWithRoi)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms());
auto sim = test::makeSimulation::RectDetWithRoi(*sample); auto sim = test::makeSimulation::RectDetWithRoi(*sample);
EXPECT_TRUE(runTest("RectDetWithRoi", *sim, eps)); EXPECT_TRUE(runTest("RectDetWithRoi", *sim, eps));
...@@ -466,7 +472,7 @@ TEST(TESTNAME, RectDetWithRoi) ...@@ -466,7 +472,7 @@ TEST(TESTNAME, RectDetWithRoi)
TEST(TESTNAME, BoxesWithSpecular) TEST(TESTNAME, BoxesWithSpecular)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxesSquareLattice2D()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createBoxesSquareLattice2D());
auto sim = test::makeSimulation::MiniGISASSpecularPeak(*sample); auto sim = test::makeSimulation::MiniGISASSpecularPeak(*sample);
EXPECT_TRUE(runTest("BoxesWithSpecular", *sim, eps)); EXPECT_TRUE(runTest("BoxesWithSpecular", *sim, eps));
...@@ -544,7 +550,7 @@ TEST(TESTNAME, RelativeResolutionTOF) ...@@ -544,7 +550,7 @@ TEST(TESTNAME, RelativeResolutionTOF)
TEST(TESTNAME, SphericalDetWithRoi) TEST(TESTNAME, SphericalDetWithRoi)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms()); std::unique_ptr<const MultiLayer> sample(ExemplarySamples::createCylindersAndPrisms());
auto sim = test::makeSimulation::SphericalDetWithRoi(*sample); auto sim = test::makeSimulation::SphericalDetWithRoi(*sample);
EXPECT_TRUE(runTest("SphericalDetWithRoi", *sim, eps)); EXPECT_TRUE(runTest("SphericalDetWithRoi", *sim, eps));
...@@ -575,7 +581,7 @@ TEST(TESTNAME, DepthprobeSimpleLayer) ...@@ -575,7 +581,7 @@ TEST(TESTNAME, DepthprobeSimpleLayer)
TEST(TESTNAME, OffspecResonator) TEST(TESTNAME, OffspecResonator)
{ {
const double eps = eps_direct_vs_python(5e-13, 8e-9); const double eps = eps_direct_vs_python(ARCH3 ? 3e-10 : 5e-13, 8e-9);
auto* sample = ExemplarySamples::createResonator(); auto* sample = ExemplarySamples::createResonator();
auto sim = test::makeSimulation::MiniOffspec(*sample); auto sim = test::makeSimulation::MiniOffspec(*sample);
EXPECT_TRUE(runTest("OffspecResonator", *sim, eps)); EXPECT_TRUE(runTest("OffspecResonator", *sim, eps));
......
...@@ -29,6 +29,9 @@ set(source_files Check.cpp ../Common/RunTest.cpp ${CMAKE_SOURCE_DIR}/Tests/GTest ...@@ -29,6 +29,9 @@ set(source_files Check.cpp ../Common/RunTest.cpp ${CMAKE_SOURCE_DIR}/Tests/GTest
add_executable(${test} ${source_files}) add_executable(${test} ${source_files})
target_compile_definitions(${test} PRIVATE -DBORNAGAIN_PYTHON) target_compile_definitions(${test} PRIVATE -DBORNAGAIN_PYTHON)
if(BA_3ARCH)
target_compile_definitions(${test} PRIVATE -DBA_OTHER_ARCH)
endif()
target_compile_definitions(${test} PUBLIC DISABLE_DISTRIBUTION_TESTS -DTESTNAME=Persist) target_compile_definitions(${test} PUBLIC DISABLE_DISTRIBUTION_TESTS -DTESTNAME=Persist)
target_link_libraries(${test} BornAgainTestSimFactory gtest) target_link_libraries(${test} BornAgainTestSimFactory gtest)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment