From c767bcc139f064fe9d5090c8db3e51ce0254b466 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 10:47:33 +0100
Subject: [PATCH 1/8] mv ParticleInSlice.h to where it is used

---
 Resample/{Particle => Processed}/ParticleInSlice.h | 8 ++++----
 Resample/Processed/ProcessedSample.cpp             | 2 +-
 Resample/Processed/Slicer.cpp                      | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
 rename Resample/{Particle => Processed}/ParticleInSlice.h (83%)

diff --git a/Resample/Particle/ParticleInSlice.h b/Resample/Processed/ParticleInSlice.h
similarity index 83%
rename from Resample/Particle/ParticleInSlice.h
rename to Resample/Processed/ParticleInSlice.h
index ef21a3baaac..b920cf0fc65 100644
--- a/Resample/Particle/ParticleInSlice.h
+++ b/Resample/Processed/ParticleInSlice.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Resample/Particle/ParticleInSlice.h
+//! @file      Resample/Processed/ParticleInSlice.h
 //! @brief     Defines struct ParticleInSlice; there are no member functions to implement.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -17,8 +17,8 @@
 #endif
 
 #ifndef USER_API
-#ifndef BORNAGAIN_RESAMPLE_PARTICLE_PARTICLEINSLICE_H
-#define BORNAGAIN_RESAMPLE_PARTICLE_PARTICLEINSLICE_H
+#ifndef BORNAGAIN_RESAMPLE_PROCESSED_PARTICLEINSLICE_H
+#define BORNAGAIN_RESAMPLE_PROCESSED_PARTICLEINSLICE_H
 
 #include "Resample/Particle/IReParticle.h"
 #include "Sample/Material/Admixtures.h"
@@ -35,5 +35,5 @@ struct ParticleInSlice {
     Admixtures admixtures;
 };
 
-#endif // BORNAGAIN_RESAMPLE_PARTICLE_PARTICLEINSLICE_H
+#endif // BORNAGAIN_RESAMPLE_PROCESSED_PARTICLEINSLICE_H
 #endif // USER_API
diff --git a/Resample/Processed/ProcessedSample.cpp b/Resample/Processed/ProcessedSample.cpp
index 984159135d3..538cfd8703f 100644
--- a/Resample/Processed/ProcessedSample.cpp
+++ b/Resample/Processed/ProcessedSample.cpp
@@ -18,7 +18,7 @@
 #include "Resample/Coherence/SumDWBA.h"
 #include "Resample/Flux/IFlux.h"
 #include "Resample/Options/SimulationOptions.h"
-#include "Resample/Particle/ParticleInSlice.h"
+#include "Resample/Processed/ParticleInSlice.h"
 #include "Resample/Processed/ParticleRegions.h"
 #include "Resample/Processed/ProcessedLayout.h"
 #include "Resample/Processed/Slicer.h"
diff --git a/Resample/Processed/Slicer.cpp b/Resample/Processed/Slicer.cpp
index a414f8425dd..f62b22551a2 100644
--- a/Resample/Processed/Slicer.cpp
+++ b/Resample/Processed/Slicer.cpp
@@ -17,7 +17,7 @@
 #include "Base/Math/Functions.h"
 #include "Base/Util/Assert.h"
 #include "Base/Vector/RotMatrix.h"
-#include "Resample/Particle/ParticleInSlice.h"
+#include "Resample/Processed/ParticleInSlice.h"
 #include "Resample/Particle/ReCompound.h"
 #include "Resample/Particle/ReCoreShell.h"
 #include "Resample/Particle/ReMesocrystal.h"
-- 
GitLab


From c742892bbfdefb1933e38b9654d9fda2d1c4bd41 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 10:50:46 +0100
Subject: [PATCH 2/8] + Swig guards

---
 Resample/Particle/IReParticle.h     |   4 +
 Resample/Particle/ReCompound.h      |   4 +
 Resample/Particle/ReMesocrystal.h   |   4 +
 Resample/Particle/ReParticle.h      |   4 +
 Wrap/Swig/libBornAgainCore.i        |   2 -
 auto/Wrap/doxygenResample.i         |   6 +-
 auto/Wrap/libBornAgainCore_wrap.cpp | 183 +++++++++++++---------------
 7 files changed, 106 insertions(+), 101 deletions(-)

diff --git a/Resample/Particle/IReParticle.h b/Resample/Particle/IReParticle.h
index 4fc99e6956a..2c19ee00a8f 100644
--- a/Resample/Particle/IReParticle.h
+++ b/Resample/Particle/IReParticle.h
@@ -12,6 +12,10 @@
 //
 //  ************************************************************************************************
 
+#ifdef SWIG
+#error no need to expose this header to Swig
+#endif
+
 #ifndef USER_API
 #ifndef BORNAGAIN_RESAMPLE_PARTICLE_IREPARTICLE_H
 #define BORNAGAIN_RESAMPLE_PARTICLE_IREPARTICLE_H
diff --git a/Resample/Particle/ReCompound.h b/Resample/Particle/ReCompound.h
index 01503b2daad..836c15aeb91 100644
--- a/Resample/Particle/ReCompound.h
+++ b/Resample/Particle/ReCompound.h
@@ -12,6 +12,10 @@
 //
 //  ************************************************************************************************
 
+#ifdef SWIG
+#error no need to expose this header to Swig
+#endif
+
 #ifndef USER_API
 #ifndef BORNAGAIN_RESAMPLE_PARTICLE_RECOMPOUND_H
 #define BORNAGAIN_RESAMPLE_PARTICLE_RECOMPOUND_H
diff --git a/Resample/Particle/ReMesocrystal.h b/Resample/Particle/ReMesocrystal.h
index d7defbc3504..1404642cb21 100644
--- a/Resample/Particle/ReMesocrystal.h
+++ b/Resample/Particle/ReMesocrystal.h
@@ -12,6 +12,10 @@
 //
 //  ************************************************************************************************
 
+#ifdef SWIG
+#error no need to expose this header to Swig
+#endif
+
 #ifndef BORNAGAIN_RESAMPLE_PARTICLE_REMESOCRYSTAL_H
 #define BORNAGAIN_RESAMPLE_PARTICLE_REMESOCRYSTAL_H
 
diff --git a/Resample/Particle/ReParticle.h b/Resample/Particle/ReParticle.h
index 12843f63840..ed8189f3100 100644
--- a/Resample/Particle/ReParticle.h
+++ b/Resample/Particle/ReParticle.h
@@ -12,6 +12,10 @@
 //
 //  ************************************************************************************************
 
+#ifdef SWIG
+#error no need to expose this header to Swig
+#endif
+
 #ifndef USER_API
 #ifndef BORNAGAIN_RESAMPLE_PARTICLE_REPARTICLE_H
 #define BORNAGAIN_RESAMPLE_PARTICLE_REPARTICLE_H
diff --git a/Wrap/Swig/libBornAgainCore.i b/Wrap/Swig/libBornAgainCore.i
index a60a07745d5..1bb1c1c3f0f 100644
--- a/Wrap/Swig/libBornAgainCore.i
+++ b/Wrap/Swig/libBornAgainCore.i
@@ -58,7 +58,6 @@
 #include "BAVersion.h"
 #include "Fit/Minimizer/MinimizerResult.h"
 #include "Sample/Scattering/ISampleNode.h"
-#include "Resample/Particle/IReParticle.h"
 
 #include "Core/Background/ConstantBackground.h"
 #include "Core/Background/PoissonNoiseBackground.h"
@@ -90,7 +89,6 @@
 %include "fromParam.i"
 
 %import(module="libBornAgainSample") "Sample/Scattering/ISampleNode.h"
-%import(module="libBornAgainSample") "Resample/Particle/IReParticle.h"
 
 %template(swig_dummy_type_axisinfo_vector) std::vector<AxisInfo>;
 
diff --git a/auto/Wrap/doxygenResample.i b/auto/Wrap/doxygenResample.i
index be6b8ac6c39..37772c73f13 100644
--- a/auto/Wrap/doxygenResample.i
+++ b/auto/Wrap/doxygenResample.i
@@ -1207,9 +1207,6 @@ Get default z limits for generating a material profile.
 // File: IReParticle_8h.xml
 
 
-// File: ParticleInSlice_8h.xml
-
-
 // File: ReCompound_8cpp.xml
 
 
@@ -1234,6 +1231,9 @@ Get default z limits for generating a material profile.
 // File: ReParticle_8h.xml
 
 
+// File: ParticleInSlice_8h.xml
+
+
 // File: ParticleRegions_8cpp.xml
 
 
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index 35ab140a736..428588a9627 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -3116,93 +3116,92 @@ namespace Swig {
 #define SWIGTYPE_p_IIntensityFunction swig_types[16]
 #define SWIGTYPE_p_INode swig_types[17]
 #define SWIGTYPE_p_IRangedDistribution swig_types[18]
-#define SWIGTYPE_p_IReParticle swig_types[19]
-#define SWIGTYPE_p_ISampleNode swig_types[20]
-#define SWIGTYPE_p_IShape2D swig_types[21]
-#define SWIGTYPE_p_ISimulation swig_types[22]
-#define SWIGTYPE_p_ISimulation2D swig_types[23]
-#define SWIGTYPE_p_ISpecularScan swig_types[24]
-#define SWIGTYPE_p_IVarianceFunction swig_types[25]
-#define SWIGTYPE_p_Instrument swig_types[26]
-#define SWIGTYPE_p_IntensityFunctionLog swig_types[27]
-#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[28]
-#define SWIGTYPE_p_IterationInfo swig_types[29]
-#define SWIGTYPE_p_MultiLayer swig_types[30]
-#define SWIGTYPE_p_OffSpecularSimulation swig_types[31]
-#define SWIGTYPE_p_ParameterDistribution swig_types[32]
-#define SWIGTYPE_p_PoissonNoiseBackground swig_types[33]
-#define SWIGTYPE_p_PyBuilderCallback swig_types[34]
-#define SWIGTYPE_p_PyObserverCallback swig_types[35]
-#define SWIGTYPE_p_QzScan swig_types[36]
-#define SWIGTYPE_p_RealLimits swig_types[37]
-#define SWIGTYPE_p_ScanResolution swig_types[38]
-#define SWIGTYPE_p_SimulationOptions swig_types[39]
-#define SWIGTYPE_p_SimulationResult swig_types[40]
-#define SWIGTYPE_p_SpecularSimulation swig_types[41]
-#define SWIGTYPE_p_VarianceConstantFunction swig_types[42]
-#define SWIGTYPE_p_VarianceSimFunction swig_types[43]
-#define SWIGTYPE_p_Vec3T_double_t swig_types[44]
-#define SWIGTYPE_p_Vec3T_int_t swig_types[45]
-#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[46]
-#define SWIGTYPE_p_allocator_type swig_types[47]
-#define SWIGTYPE_p_char swig_types[48]
-#define SWIGTYPE_p_difference_type swig_types[49]
-#define SWIGTYPE_p_first_type swig_types[50]
-#define SWIGTYPE_p_int swig_types[51]
-#define SWIGTYPE_p_key_type swig_types[52]
-#define SWIGTYPE_p_long_long swig_types[53]
-#define SWIGTYPE_p_mapped_type swig_types[54]
-#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[55]
-#define SWIGTYPE_p_mumufit__Parameters swig_types[56]
-#define SWIGTYPE_p_p_PyObject swig_types[57]
-#define SWIGTYPE_p_second_type swig_types[58]
-#define SWIGTYPE_p_short swig_types[59]
-#define SWIGTYPE_p_signed_char swig_types[60]
-#define SWIGTYPE_p_size_type swig_types[61]
-#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[62]
-#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[63]
-#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[64]
-#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[65]
-#define SWIGTYPE_p_std__allocatorT_Vec3T_std__complexT_double_t_t_t swig_types[66]
-#define SWIGTYPE_p_std__allocatorT_double_t swig_types[67]
-#define SWIGTYPE_p_std__allocatorT_int_t swig_types[68]
-#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[69]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[70]
-#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[71]
-#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[72]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[73]
-#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[74]
-#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[75]
-#define SWIGTYPE_p_std__arrayT_double_3_t swig_types[76]
-#define SWIGTYPE_p_std__arrayT_std__complexT_double_t_3_t swig_types[77]
-#define SWIGTYPE_p_std__complexT_double_t swig_types[78]
-#define SWIGTYPE_p_std__functionT_bool_fsize_tF_t swig_types[79]
-#define SWIGTYPE_p_std__invalid_argument swig_types[80]
-#define SWIGTYPE_p_std__lessT_std__string_t swig_types[81]
-#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[82]
-#define SWIGTYPE_p_std__pairT_double_double_t swig_types[83]
-#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[84]
-#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[85]
-#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[86]
-#define SWIGTYPE_p_std__vectorT_ParameterDistribution_std__allocatorT_ParameterDistribution_t_t swig_types[87]
-#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[88]
-#define SWIGTYPE_p_std__vectorT_Vec3T_std__complexT_double_t_t_std__allocatorT_Vec3T_std__complexT_double_t_t_t_t swig_types[89]
-#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[90]
-#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[91]
-#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[92]
-#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[93]
-#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[94]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[95]
-#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[96]
-#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[97]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[98]
-#define SWIGTYPE_p_unsigned_char swig_types[99]
-#define SWIGTYPE_p_unsigned_int swig_types[100]
-#define SWIGTYPE_p_unsigned_long_long swig_types[101]
-#define SWIGTYPE_p_unsigned_short swig_types[102]
-#define SWIGTYPE_p_value_type swig_types[103]
-static swig_type_info *swig_types[105];
-static swig_module_info swig_module = {swig_types, 104, 0, 0, 0, 0};
+#define SWIGTYPE_p_ISampleNode swig_types[19]
+#define SWIGTYPE_p_IShape2D swig_types[20]
+#define SWIGTYPE_p_ISimulation swig_types[21]
+#define SWIGTYPE_p_ISimulation2D swig_types[22]
+#define SWIGTYPE_p_ISpecularScan swig_types[23]
+#define SWIGTYPE_p_IVarianceFunction swig_types[24]
+#define SWIGTYPE_p_Instrument swig_types[25]
+#define SWIGTYPE_p_IntensityFunctionLog swig_types[26]
+#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[27]
+#define SWIGTYPE_p_IterationInfo swig_types[28]
+#define SWIGTYPE_p_MultiLayer swig_types[29]
+#define SWIGTYPE_p_OffSpecularSimulation swig_types[30]
+#define SWIGTYPE_p_ParameterDistribution swig_types[31]
+#define SWIGTYPE_p_PoissonNoiseBackground swig_types[32]
+#define SWIGTYPE_p_PyBuilderCallback swig_types[33]
+#define SWIGTYPE_p_PyObserverCallback swig_types[34]
+#define SWIGTYPE_p_QzScan swig_types[35]
+#define SWIGTYPE_p_RealLimits swig_types[36]
+#define SWIGTYPE_p_ScanResolution swig_types[37]
+#define SWIGTYPE_p_SimulationOptions swig_types[38]
+#define SWIGTYPE_p_SimulationResult swig_types[39]
+#define SWIGTYPE_p_SpecularSimulation swig_types[40]
+#define SWIGTYPE_p_VarianceConstantFunction swig_types[41]
+#define SWIGTYPE_p_VarianceSimFunction swig_types[42]
+#define SWIGTYPE_p_Vec3T_double_t swig_types[43]
+#define SWIGTYPE_p_Vec3T_int_t swig_types[44]
+#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[45]
+#define SWIGTYPE_p_allocator_type swig_types[46]
+#define SWIGTYPE_p_char swig_types[47]
+#define SWIGTYPE_p_difference_type swig_types[48]
+#define SWIGTYPE_p_first_type swig_types[49]
+#define SWIGTYPE_p_int swig_types[50]
+#define SWIGTYPE_p_key_type swig_types[51]
+#define SWIGTYPE_p_long_long swig_types[52]
+#define SWIGTYPE_p_mapped_type swig_types[53]
+#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[54]
+#define SWIGTYPE_p_mumufit__Parameters swig_types[55]
+#define SWIGTYPE_p_p_PyObject swig_types[56]
+#define SWIGTYPE_p_second_type swig_types[57]
+#define SWIGTYPE_p_short swig_types[58]
+#define SWIGTYPE_p_signed_char swig_types[59]
+#define SWIGTYPE_p_size_type swig_types[60]
+#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[61]
+#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[62]
+#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[63]
+#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[64]
+#define SWIGTYPE_p_std__allocatorT_Vec3T_std__complexT_double_t_t_t swig_types[65]
+#define SWIGTYPE_p_std__allocatorT_double_t swig_types[66]
+#define SWIGTYPE_p_std__allocatorT_int_t swig_types[67]
+#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[68]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[69]
+#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[70]
+#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[71]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[72]
+#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[73]
+#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[74]
+#define SWIGTYPE_p_std__arrayT_double_3_t swig_types[75]
+#define SWIGTYPE_p_std__arrayT_std__complexT_double_t_3_t swig_types[76]
+#define SWIGTYPE_p_std__complexT_double_t swig_types[77]
+#define SWIGTYPE_p_std__functionT_bool_fsize_tF_t swig_types[78]
+#define SWIGTYPE_p_std__invalid_argument swig_types[79]
+#define SWIGTYPE_p_std__lessT_std__string_t swig_types[80]
+#define SWIGTYPE_p_std__mapT_std__string_double_std__lessT_std__string_t_std__allocatorT_std__pairT_std__string_const_double_t_t_t swig_types[81]
+#define SWIGTYPE_p_std__pairT_double_double_t swig_types[82]
+#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[83]
+#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[84]
+#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[85]
+#define SWIGTYPE_p_std__vectorT_ParameterDistribution_std__allocatorT_ParameterDistribution_t_t swig_types[86]
+#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[87]
+#define SWIGTYPE_p_std__vectorT_Vec3T_std__complexT_double_t_t_std__allocatorT_Vec3T_std__complexT_double_t_t_t_t swig_types[88]
+#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[89]
+#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[90]
+#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[91]
+#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[92]
+#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[93]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[94]
+#define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[95]
+#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[96]
+#define SWIGTYPE_p_swig__SwigPyIterator swig_types[97]
+#define SWIGTYPE_p_unsigned_char swig_types[98]
+#define SWIGTYPE_p_unsigned_int swig_types[99]
+#define SWIGTYPE_p_unsigned_long_long swig_types[100]
+#define SWIGTYPE_p_unsigned_short swig_types[101]
+#define SWIGTYPE_p_value_type swig_types[102]
+static swig_type_info *swig_types[104];
+static swig_module_info swig_module = {swig_types, 103, 0, 0, 0, 0};
 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
 
@@ -6955,7 +6954,6 @@ SWIGINTERN void std_vector_Sl_std_pair_Sl_double_Sc_double_Sg__Sg__insert__SWIG_
 #include "BAVersion.h"
 #include "Fit/Minimizer/MinimizerResult.h"
 #include "Sample/Scattering/ISampleNode.h"
-#include "Resample/Particle/IReParticle.h"
 
 #include "Core/Background/ConstantBackground.h"
 #include "Core/Background/PoissonNoiseBackground.h"
@@ -47895,9 +47893,6 @@ static void *_p_PoissonNoiseBackgroundTo_p_ICloneable(void *x, int *SWIGUNUSEDPA
 static void *_p_ISampleNodeTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *)  ((ISampleNode *) x));
 }
-static void *_p_IReParticleTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((ICloneable *)  ((IReParticle *) x));
-}
 static void *_p_ISpecularScanTo_p_ICloneable(void *x, int *SWIGUNUSEDPARM(newmemory)) {
     return (void *)((ICloneable *)  ((ISpecularScan *) x));
 }
@@ -47917,7 +47912,6 @@ static swig_type_info _swigt__p_IBackground = {"_p_IBackground", "IBackground *"
 static swig_type_info _swigt__p_IChiSquaredModule = {"_p_IChiSquaredModule", "IChiSquaredModule *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ICloneable = {"_p_ICloneable", "ICloneable *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_ISampleNode = {"_p_ISampleNode", 0, 0, 0, 0, 0};
-static swig_type_info _swigt__p_IReParticle = {"_p_IReParticle", 0, 0, 0, 0, 0};
 static swig_type_info _swigt__p_IDetector = {"_p_IDetector", "IDetector *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IDetector2D = {"_p_IDetector2D", "IDetector2D *", 0, 0, (void*)0, 0};
 static swig_type_info _swigt__p_IDistribution1D = {"_p_IDistribution1D", "IDistribution1D *", 0, 0, (void*)0, 0};
@@ -48029,7 +48023,6 @@ static swig_type_info *swig_type_initial[] = {
   &_swigt__p_IIntensityFunction,
   &_swigt__p_INode,
   &_swigt__p_IRangedDistribution,
-  &_swigt__p_IReParticle,
   &_swigt__p_ISampleNode,
   &_swigt__p_IShape2D,
   &_swigt__p_ISimulation,
@@ -48128,8 +48121,7 @@ static swig_cast_info _swigc__p_IAxis[] = {  {&_swigt__p_IAxis, 0, 0, 0},{0, 0,
 static swig_cast_info _swigc__p_IBackground[] = {  {&_swigt__p_IBackground, 0, 0, 0},  {&_swigt__p_ConstantBackground, _p_ConstantBackgroundTo_p_IBackground, 0, 0},  {&_swigt__p_PoissonNoiseBackground, _p_PoissonNoiseBackgroundTo_p_IBackground, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IChiSquaredModule[] = {  {&_swigt__p_IChiSquaredModule, 0, 0, 0},  {&_swigt__p_ChiSquaredModule, _p_ChiSquaredModuleTo_p_IChiSquaredModule, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_ISampleNode[] = {{&_swigt__p_ISampleNode, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_IReParticle[] = {{&_swigt__p_IReParticle, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ScanResolution, _p_ScanResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IChiSquaredModule, _p_IChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_ChiSquaredModule, _p_ChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_QzScan, _p_QzScanTo_p_ICloneable, 0, 0},  {&_swigt__p_AlphaScan, _p_AlphaScanTo_p_ICloneable, 0, 0},  {&_swigt__p_IBackground, _p_IBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ConstantBackground, _p_ConstantBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_PoissonNoiseBackground, _p_PoissonNoiseBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_ICloneable, 0, 0},  {&_swigt__p_IReParticle, _p_IReParticleTo_p_ICloneable, 0, 0},  {&_swigt__p_ISpecularScan, _p_ISpecularScanTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
+static swig_cast_info _swigc__p_ICloneable[] = {  {&_swigt__p_ScanResolution, _p_ScanResolutionTo_p_ICloneable, 0, 0},  {&_swigt__p_IChiSquaredModule, _p_IChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_ChiSquaredModule, _p_ChiSquaredModuleTo_p_ICloneable, 0, 0},  {&_swigt__p_QzScan, _p_QzScanTo_p_ICloneable, 0, 0},  {&_swigt__p_AlphaScan, _p_AlphaScanTo_p_ICloneable, 0, 0},  {&_swigt__p_IBackground, _p_IBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ConstantBackground, _p_ConstantBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_PoissonNoiseBackground, _p_PoissonNoiseBackgroundTo_p_ICloneable, 0, 0},  {&_swigt__p_ICloneable, 0, 0, 0},  {&_swigt__p_ISampleNode, _p_ISampleNodeTo_p_ICloneable, 0, 0},  {&_swigt__p_ISpecularScan, _p_ISpecularScanTo_p_ICloneable, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetector[] = {  {&_swigt__p_IDetector, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDetector2D[] = {  {&_swigt__p_IDetector2D, 0, 0, 0},{0, 0, 0, 0}};
 static swig_cast_info _swigc__p_IDistribution1D[] = {  {&_swigt__p_IDistribution1D, 0, 0, 0},{0, 0, 0, 0}};
@@ -48241,7 +48233,6 @@ static swig_cast_info *swig_cast_initial[] = {
   _swigc__p_IIntensityFunction,
   _swigc__p_INode,
   _swigc__p_IRangedDistribution,
-  _swigc__p_IReParticle,
   _swigc__p_ISampleNode,
   _swigc__p_IShape2D,
   _swigc__p_ISimulation,
-- 
GitLab


From 41fa70b0081bb609ae086033abfa5dc66bae68b9 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 11:05:36 +0100
Subject: [PATCH 3/8] rm unused forward declarations

---
 Resample/Particle/IReParticle.h | 1 -
 Sample/Particle/IParticle.h     | 1 -
 2 files changed, 2 deletions(-)

diff --git a/Resample/Particle/IReParticle.h b/Resample/Particle/IReParticle.h
index 2c19ee00a8f..53f0d074d7f 100644
--- a/Resample/Particle/IReParticle.h
+++ b/Resample/Particle/IReParticle.h
@@ -22,7 +22,6 @@
 
 #include "Base/Types/ICloneable.h"
 #include "Param/Node/INode.h"
-#include "Sample/Scattering/ZLimits.h"
 #include <Eigen/Core>
 #include <heinz/Complex.h>
 #include <heinz/Vectors3D.h>
diff --git a/Sample/Particle/IParticle.h b/Sample/Particle/IParticle.h
index 4d61f0791f1..891780c9493 100644
--- a/Sample/Particle/IParticle.h
+++ b/Sample/Particle/IParticle.h
@@ -22,7 +22,6 @@
 #include <vector>
 
 class Rotations;
-class ZLimits;
 class IRotation;
 
 //! Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
-- 
GitLab


From fab7c086b91b25dce543fb91e49a3c36d8b9ce0b Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 11:06:40 +0100
Subject: [PATCH 4/8] mv ZLimits

---
 Resample/Processed/ParticleRegions.cpp                | 2 +-
 Resample/Processed/Slicer.cpp                         | 2 +-
 {Sample/Scattering => Resample/Processed}/ZLimits.cpp | 4 ++--
 {Sample/Scattering => Resample/Processed}/ZLimits.h   | 8 ++++----
 Resample/Slice/Slice.h                                | 2 +-
 Tests/Unit/Sample/ZLimitsTest.cpp                     | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
 rename {Sample/Scattering => Resample/Processed}/ZLimits.cpp (94%)
 rename {Sample/Scattering => Resample/Processed}/ZLimits.h (90%)

diff --git a/Resample/Processed/ParticleRegions.cpp b/Resample/Processed/ParticleRegions.cpp
index e66c0caeb80..b22e983dba5 100644
--- a/Resample/Processed/ParticleRegions.cpp
+++ b/Resample/Processed/ParticleRegions.cpp
@@ -18,7 +18,7 @@
 #include "Sample/Multilayer/Layer.h"
 #include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/Particle/IParticle.h"
-#include "Sample/Scattering/ZLimits.h"
+#include "Resample/Processed/ZLimits.h"
 #include <algorithm>
 #include <cstddef>
 #include <stdexcept>
diff --git a/Resample/Processed/Slicer.cpp b/Resample/Processed/Slicer.cpp
index f62b22551a2..c43daac18b7 100644
--- a/Resample/Processed/Slicer.cpp
+++ b/Resample/Processed/Slicer.cpp
@@ -30,7 +30,7 @@
 #include "Sample/Particle/ParticleComposition.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 #include "Sample/Scattering/Rotations.h"
-#include "Sample/Scattering/ZLimits.h"
+#include "Resample/Processed/ZLimits.h"
 
 namespace {
 
diff --git a/Sample/Scattering/ZLimits.cpp b/Resample/Processed/ZLimits.cpp
similarity index 94%
rename from Sample/Scattering/ZLimits.cpp
rename to Resample/Processed/ZLimits.cpp
index 83de539a0ff..11d0c86cb34 100644
--- a/Sample/Scattering/ZLimits.cpp
+++ b/Resample/Processed/ZLimits.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Sample/Scattering/ZLimits.cpp
+//! @file      Resample/Processed/ZLimits.cpp
 //! @brief     Defines class ZLimits.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "Sample/Scattering/ZLimits.h"
+#include "Resample/Processed/ZLimits.h"
 #include <algorithm>
 #include <cmath>
 #include <stdexcept>
diff --git a/Sample/Scattering/ZLimits.h b/Resample/Processed/ZLimits.h
similarity index 90%
rename from Sample/Scattering/ZLimits.h
rename to Resample/Processed/ZLimits.h
index e9665a9c5e1..9a7d33f2260 100644
--- a/Sample/Scattering/ZLimits.h
+++ b/Resample/Processed/ZLimits.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Sample/Scattering/ZLimits.h
+//! @file      Resample/Processed/ZLimits.h
 //! @brief     Defines class ZLimits.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -17,8 +17,8 @@
 #endif
 
 #ifndef USER_API
-#ifndef BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
-#define BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
+#ifndef BORNAGAIN_RESAMPLE_PROCESSED_ZLIMITS_H
+#define BORNAGAIN_RESAMPLE_PROCESSED_ZLIMITS_H
 
 #include <cmath>
 #include <iostream>
@@ -58,5 +58,5 @@ bool operator!=(const ZLimits& left, const ZLimits& right);
 
 std::ostream& operator<<(std::ostream& ostr, const ZLimits& limits);
 
-#endif // BORNAGAIN_SAMPLE_SCATTERING_ZLIMITS_H
+#endif // BORNAGAIN_RESAMPLE_PROCESSED_ZLIMITS_H
 #endif // USER_API
diff --git a/Resample/Slice/Slice.h b/Resample/Slice/Slice.h
index 88b7c1be97e..fd7d66dca64 100644
--- a/Resample/Slice/Slice.h
+++ b/Resample/Slice/Slice.h
@@ -21,7 +21,7 @@
 #define BORNAGAIN_RESAMPLE_SLICE_SLICE_H
 
 #include "Sample/Material/Material.h"
-#include "Sample/Scattering/ZLimits.h"
+#include "Resample/Processed/ZLimits.h"
 #include <memory>
 
 class LayerRoughness;
diff --git a/Tests/Unit/Sample/ZLimitsTest.cpp b/Tests/Unit/Sample/ZLimitsTest.cpp
index 28d0588f23e..cd8590d8c25 100644
--- a/Tests/Unit/Sample/ZLimitsTest.cpp
+++ b/Tests/Unit/Sample/ZLimitsTest.cpp
@@ -1,4 +1,4 @@
-#include "Sample/Scattering/ZLimits.h"
+#include "Resample/Processed/ZLimits.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <stdexcept>
 
-- 
GitLab


From 872dcac45c8a911bfdbf981985ccc8a61db9a755 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 11:07:51 +0100
Subject: [PATCH 5/8] clang-format

---
 Core/Export/SampleToPython.cpp                      | 4 ++--
 Device/Data/DataUtils.cpp                           | 2 +-
 GUI/View/Realspace/RealSpaceBuilderUtils.cpp        | 8 +++-----
 Resample/Processed/ParticleRegions.cpp              | 2 +-
 Resample/Processed/ProcessedSample.cpp              | 4 ++--
 Resample/Processed/Slicer.cpp                       | 7 +++----
 Resample/Slice/Slice.h                              | 2 +-
 Sample/Scattering/IBornFF.h                         | 2 +-
 Tests/Unit/Numeric/FormFactorSpecializationTest.cpp | 3 +--
 Tests/Unit/{Sample => Resample}/ZLimitsTest.cpp     | 0
 10 files changed, 15 insertions(+), 19 deletions(-)
 rename Tests/Unit/{Sample => Resample}/ZLimitsTest.cpp (100%)

diff --git a/Core/Export/SampleToPython.cpp b/Core/Export/SampleToPython.cpp
index ef06f78babf..fadbc2b5166 100644
--- a/Core/Export/SampleToPython.cpp
+++ b/Core/Export/SampleToPython.cpp
@@ -258,8 +258,8 @@ std::string SampleToPython::defineInterferences() const
 
         else if (const auto* iff = dynamic_cast<const Interference1DLattice*>(s)) {
             result << indent() << key << " = ba.Interference1DLattice("
-                   << Py::Fmt::printNm(iff->length()) << ", "
-                   << Py::Fmt::printDegrees(iff->xi()) << ")\n";
+                   << Py::Fmt::printNm(iff->length()) << ", " << Py::Fmt::printDegrees(iff->xi())
+                   << ")\n";
 
             const auto* pdf = NodeUtils::OnlyChildOfType<IFTDecayFunction1D>(*iff);
 
diff --git a/Device/Data/DataUtils.cpp b/Device/Data/DataUtils.cpp
index 931686f49b2..05d9c23afbe 100644
--- a/Device/Data/DataUtils.cpp
+++ b/Device/Data/DataUtils.cpp
@@ -53,7 +53,7 @@ bool DataUtils::Data::checkRelativeDifference(const OutputData<double>& dat,
                                               const OutputData<double>& ref, const double threshold)
 {
     const std::unique_ptr<const IHistogram> histo(IHistogram::createHistogram(dat));
-    if (histo->getMinimum()==0 && histo->getMaximum()==0) {
+    if (histo->getMinimum() == 0 && histo->getMaximum() == 0) {
         std::cerr << "FAILED: simulated data set is empty" << std::endl;
         return false;
     }
diff --git a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
index ec5cef443e4..32c0f366cad 100644
--- a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
+++ b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
@@ -28,10 +28,10 @@
 #include "GUI/View/Realspace/RealSpaceCanvas.h"
 #include "GUI/View/Realspace/RealSpaceMesoCrystalUtils.h"
 #include "GUI/View/Realspace/TransformTo3D.h"
+#include "Resample/Particle/ReParticle.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
-#include "Resample/Particle/ReParticle.h"
 
 namespace {
 
@@ -281,10 +281,8 @@ Particle3DContainer GUI::RealSpace::BuilderUtils::particleCoreShell3DContainer(
     // clone of the particleCoreShell
     std::unique_ptr<ParticleCoreShell> PCS_clone(particleCoreShell.clone());
 
-    std::unique_ptr<const IBornFF> coreParticleff(
-        PCS_clone->coreParticle()->formfactor());
-    std::unique_ptr<const IBornFF> shellParticleff(
-        PCS_clone->shellParticle()->formfactor());
+    std::unique_ptr<const IBornFF> coreParticleff(PCS_clone->coreParticle()->formfactor());
+    std::unique_ptr<const IBornFF> shellParticleff(PCS_clone->shellParticle()->formfactor());
 
     const auto* coreff = getUnderlyingFormFactor(coreParticleff.get());
     const auto* shellff = getUnderlyingFormFactor(shellParticleff.get());
diff --git a/Resample/Processed/ParticleRegions.cpp b/Resample/Processed/ParticleRegions.cpp
index b22e983dba5..1af476f49ce 100644
--- a/Resample/Processed/ParticleRegions.cpp
+++ b/Resample/Processed/ParticleRegions.cpp
@@ -14,11 +14,11 @@
 
 #include "Resample/Processed/ParticleRegions.h"
 #include "Resample/Processed/Slicer.h"
+#include "Resample/Processed/ZLimits.h"
 #include "Sample/Aggregate/ParticleLayout.h"
 #include "Sample/Multilayer/Layer.h"
 #include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/Particle/IParticle.h"
-#include "Resample/Processed/ZLimits.h"
 #include <algorithm>
 #include <cstddef>
 #include <stdexcept>
diff --git a/Resample/Processed/ProcessedSample.cpp b/Resample/Processed/ProcessedSample.cpp
index 538cfd8703f..8931db7d36d 100644
--- a/Resample/Processed/ProcessedSample.cpp
+++ b/Resample/Processed/ProcessedSample.cpp
@@ -249,8 +249,8 @@ ProcessedLayout makeProcessedLayout(const ParticleLayout& layout, const SliceSta
                     double z1 = slice.zTopOr0();
                     limits = {slice.zBottom() - z1, slice.zTop() - z1};
                 }
-                ParticleInSlice pis = preprocessor::createParticleInSlice(subparticle.get(),
-                                                                          limits);
+                ParticleInSlice pis =
+                    preprocessor::createParticleInSlice(subparticle.get(), limits);
                 pis.sliced_ff->setAmbientMaterial(slices.at(iSlice).material());
 
                 std::unique_ptr<SumDWBA> computer;
diff --git a/Resample/Processed/Slicer.cpp b/Resample/Processed/Slicer.cpp
index c43daac18b7..25e5d295218 100644
--- a/Resample/Processed/Slicer.cpp
+++ b/Resample/Processed/Slicer.cpp
@@ -17,11 +17,12 @@
 #include "Base/Math/Functions.h"
 #include "Base/Util/Assert.h"
 #include "Base/Vector/RotMatrix.h"
-#include "Resample/Processed/ParticleInSlice.h"
 #include "Resample/Particle/ReCompound.h"
 #include "Resample/Particle/ReCoreShell.h"
 #include "Resample/Particle/ReMesocrystal.h"
 #include "Resample/Particle/ReParticle.h"
+#include "Resample/Processed/ParticleInSlice.h"
+#include "Resample/Processed/ZLimits.h"
 #include "Sample/HardParticle/HardParticles.h"
 #include "Sample/Material/MaterialFactoryFuncs.h"
 #include "Sample/Particle/Crystal.h"
@@ -30,7 +31,6 @@
 #include "Sample/Particle/ParticleComposition.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 #include "Sample/Scattering/Rotations.h"
-#include "Resample/Processed/ZLimits.h"
 
 namespace {
 
@@ -341,8 +341,7 @@ ParticleInSlice preprocessor::createParticleInSlice(const IParticle* particle,
         ParticleInSlice result;
 
         std::unique_ptr<ReParticle> new_shape(
-            createSlicedFormFactor(meso_formfactor, limits, p->rotation(),
-                                   p->particlePosition()));
+            createSlicedFormFactor(meso_formfactor, limits, p->rotation(), p->particlePosition()));
 
         const std::unique_ptr<Crystal> new_crystal(
             crystal->transformed(p->rotation(), p->particlePosition()));
diff --git a/Resample/Slice/Slice.h b/Resample/Slice/Slice.h
index fd7d66dca64..599b448488d 100644
--- a/Resample/Slice/Slice.h
+++ b/Resample/Slice/Slice.h
@@ -20,8 +20,8 @@
 #ifndef BORNAGAIN_RESAMPLE_SLICE_SLICE_H
 #define BORNAGAIN_RESAMPLE_SLICE_SLICE_H
 
-#include "Sample/Material/Material.h"
 #include "Resample/Processed/ZLimits.h"
+#include "Sample/Material/Material.h"
 #include <memory>
 
 class LayerRoughness;
diff --git a/Sample/Scattering/IBornFF.h b/Sample/Scattering/IBornFF.h
index 4342ae498bb..dd06b6e04a8 100644
--- a/Sample/Scattering/IBornFF.h
+++ b/Sample/Scattering/IBornFF.h
@@ -17,9 +17,9 @@
 #define BORNAGAIN_SAMPLE_SCATTERING_IBORNFF_H
 
 #include "Sample/Scattering/ISampleNode.h"
+#include <Eigen/Core>
 #include <heinz/Complex.h>
 #include <heinz/Vectors3D.h>
-#include <Eigen/Core>
 
 class IRotation;
 class IShape3D;
diff --git a/Tests/Unit/Numeric/FormFactorSpecializationTest.cpp b/Tests/Unit/Numeric/FormFactorSpecializationTest.cpp
index 9879b9b74d2..2aa24aebeee 100644
--- a/Tests/Unit/Numeric/FormFactorSpecializationTest.cpp
+++ b/Tests/Unit/Numeric/FormFactorSpecializationTest.cpp
@@ -8,8 +8,7 @@
 
 class FFSpecializationTest : public testing::Test {
 protected:
-    void run_test(IBornFF* p0, IBornFF* p1, double eps, double qmag1,
-                  double qmag2)
+    void run_test(IBornFF* p0, IBornFF* p1, double eps, double qmag1, double qmag2)
     {
         formfactorTest::run_test_for_many_q([&](C3 q) { test_ff_eq(q, p0, p1, eps); }, qmag1,
                                             qmag2);
diff --git a/Tests/Unit/Sample/ZLimitsTest.cpp b/Tests/Unit/Resample/ZLimitsTest.cpp
similarity index 100%
rename from Tests/Unit/Sample/ZLimitsTest.cpp
rename to Tests/Unit/Resample/ZLimitsTest.cpp
-- 
GitLab


From 28bc1d637819c093570eb90012c5e44ced715802 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 11:08:16 +0100
Subject: [PATCH 6/8] rm include

---
 Resample/Particle/IReParticle.h |  1 -
 Resample/Particle/ReParticle.h  |  1 +
 auto/Wrap/doxygenResample.i     | 47 ++++++++++++++++++++++++++++---
 auto/Wrap/doxygenSample.i       | 49 ++++-----------------------------
 4 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/Resample/Particle/IReParticle.h b/Resample/Particle/IReParticle.h
index 53f0d074d7f..b9bb154e67b 100644
--- a/Resample/Particle/IReParticle.h
+++ b/Resample/Particle/IReParticle.h
@@ -21,7 +21,6 @@
 #define BORNAGAIN_RESAMPLE_PARTICLE_IREPARTICLE_H
 
 #include "Base/Types/ICloneable.h"
-#include "Param/Node/INode.h"
 #include <Eigen/Core>
 #include <heinz/Complex.h>
 #include <heinz/Vectors3D.h>
diff --git a/Resample/Particle/ReParticle.h b/Resample/Particle/ReParticle.h
index ed8189f3100..30fdeb39df6 100644
--- a/Resample/Particle/ReParticle.h
+++ b/Resample/Particle/ReParticle.h
@@ -22,6 +22,7 @@
 
 #include "Resample/Particle/IReParticle.h"
 #include <heinz/Vectors3D.h>
+#include <memory>
 
 class IBornFF;
 class Material;
diff --git a/auto/Wrap/doxygenResample.i b/auto/Wrap/doxygenResample.i
index 37772c73f13..b25d4f1429e 100644
--- a/auto/Wrap/doxygenResample.i
+++ b/auto/Wrap/doxygenResample.i
@@ -1005,6 +1005,39 @@ Returns the coherent sum of the four DWBA terms for polarized scattering.
 ";
 
 
+// File: classZLimits.xml
+%feature("docstring") ZLimits "
+
+An interval. Limits are of type double, and may be infinite. Used for the z-coordinate, especially when slicing form factors.
+
+C++ includes: ZLimits.h
+";
+
+%feature("docstring")  ZLimits::ZLimits "ZLimits::ZLimits()
+";
+
+%feature("docstring")  ZLimits::ZLimits "ZLimits::ZLimits(double _min, double _max)
+";
+
+%feature("docstring")  ZLimits::isFinite "bool ZLimits::isFinite() const
+";
+
+%feature("docstring")  ZLimits::zBottom "double ZLimits::zBottom() const
+";
+
+%feature("docstring")  ZLimits::zTop "double ZLimits::zTop() const
+";
+
+%feature("docstring")  ZLimits::zTopOr0 "double ZLimits::zTopOr0() const
+";
+
+%feature("docstring")  ZLimits::thickness "double ZLimits::thickness() const
+";
+
+%feature("docstring")  ZLimits::thicknessOr0 "double ZLimits::thicknessOr0() const
+";
+
+
 // File: namespace_0d17.xml
 
 
@@ -1023,13 +1056,10 @@ Returns the coherent sum of the four DWBA terms for polarized scattering.
 // File: namespace_0d38.xml
 
 
-// File: namespace_0d40.xml
-
-
 // File: namespace_0d42.xml
 
 
-// File: namespace_0d48.xml
+// File: namespace_0d44.xml
 
 
 // File: namespace_0d50.xml
@@ -1041,6 +1071,9 @@ Returns the coherent sum of the four DWBA terms for polarized scattering.
 // File: namespace_0d54.xml
 
 
+// File: namespace_0d56.xml
+
+
 // File: namespace_0d9.xml
 
 
@@ -1258,6 +1291,12 @@ Get default z limits for generating a material profile.
 // File: Slicer_8h.xml
 
 
+// File: ZLimits_8cpp.xml
+
+
+// File: ZLimits_8h.xml
+
+
 // File: KzComputation_8cpp.xml
 
 
diff --git a/auto/Wrap/doxygenSample.i b/auto/Wrap/doxygenSample.i
index 04be39164af..dbc80124e01 100644
--- a/auto/Wrap/doxygenSample.i
+++ b/auto/Wrap/doxygenSample.i
@@ -4711,39 +4711,6 @@ C++ includes: Lattice2D.h
 ";
 
 
-// File: classZLimits.xml
-%feature("docstring") ZLimits "
-
-An interval. Limits are of type double, and may be infinite. Used for the z-coordinate, especially when slicing form factors.
-
-C++ includes: ZLimits.h
-";
-
-%feature("docstring")  ZLimits::ZLimits "ZLimits::ZLimits()
-";
-
-%feature("docstring")  ZLimits::ZLimits "ZLimits::ZLimits(double _min, double _max)
-";
-
-%feature("docstring")  ZLimits::isFinite "bool ZLimits::isFinite() const
-";
-
-%feature("docstring")  ZLimits::zBottom "double ZLimits::zBottom() const
-";
-
-%feature("docstring")  ZLimits::zTop "double ZLimits::zTop() const
-";
-
-%feature("docstring")  ZLimits::zTopOr0 "double ZLimits::zTopOr0() const
-";
-
-%feature("docstring")  ZLimits::thickness "double ZLimits::thickness() const
-";
-
-%feature("docstring")  ZLimits::thicknessOr0 "double ZLimits::thicknessOr0() const
-";
-
-
 // File: namespace_0d130.xml
 
 
@@ -4762,22 +4729,22 @@ C++ includes: ZLimits.h
 // File: namespace_0d16.xml
 
 
-// File: namespace_0d191.xml
+// File: namespace_0d189.xml
 
 
 // File: namespace_0d2.xml
 
 
-// File: namespace_0d204.xml
+// File: namespace_0d202.xml
 
 
-// File: namespace_0d214.xml
+// File: namespace_0d212.xml
 
 
-// File: namespace_0d236.xml
+// File: namespace_0d234.xml
 
 
-// File: namespace_0d249.xml
+// File: namespace_0d247.xml
 
 
 // File: namespace_0d36.xml
@@ -5764,12 +5731,6 @@ Returns concatenated rotation (first right, then left).
 ";
 
 
-// File: ZLimits_8cpp.xml
-
-
-// File: ZLimits_8h.xml
-
-
 // File: Box_8cpp.xml
 
 
-- 
GitLab


From 333db7f04ef591bef955c8a6b4deaad762be228e Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 11:10:17 +0100
Subject: [PATCH 7/8] resolve warning

---
 Resample/Processed/Slicer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Resample/Processed/Slicer.cpp b/Resample/Processed/Slicer.cpp
index 25e5d295218..03062ef00c6 100644
--- a/Resample/Processed/Slicer.cpp
+++ b/Resample/Processed/Slicer.cpp
@@ -326,7 +326,7 @@ ParticleInSlice preprocessor::createParticleInSlice(const IParticle* particle,
 
         return result;
 
-    } else if (const auto* p = dynamic_cast<const ParticleComposition*>(particle)) {
+    } else if (dynamic_cast<const ParticleComposition*>(particle)) {
         throw std::runtime_error("ParticleComposition does not yet support slicing");
 
     } else if (const auto* p = dynamic_cast<const MesoCrystal*>(particle)) {
-- 
GitLab


From c790a08da25f72c62770bdf59e4041917f0e75bd Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 17 Dec 2021 12:08:42 +0100
Subject: [PATCH 8/8] + include vector

---
 Resample/Particle/ReCompound.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Resample/Particle/ReCompound.h b/Resample/Particle/ReCompound.h
index 836c15aeb91..c2a6cb1eccc 100644
--- a/Resample/Particle/ReCompound.h
+++ b/Resample/Particle/ReCompound.h
@@ -21,6 +21,7 @@
 #define BORNAGAIN_RESAMPLE_PARTICLE_RECOMPOUND_H
 
 #include "Resample/Particle/IReParticle.h"
+#include <vector>
 
 //! Coherent sum of different scalar IReParticle%s.
 //!
-- 
GitLab