From b230e47f20af9cef2a39b4cad3c7db33af783b41 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 23 May 2022 16:43:05 +0200 Subject: [PATCH] rm Instrument::initDetector --- Device/Instrument/Instrument.cpp | 9 - Device/Instrument/Instrument.h | 3 - GUI/Model/Device/InstrumentItems.cpp | 2 - Sim/Simulation/ISimulation.cpp | 1 + Sim/Simulation/ISimulation.h | 11 +- Sim/Simulation/SpecularSimulation.cpp | 1 - auto/Wrap/doxygenDevice.i | 5 - auto/Wrap/doxygenSim.i | 18 +- auto/Wrap/libBornAgainDevice.py | 10 - auto/Wrap/libBornAgainDevice_wrap.cpp | 29 --- auto/Wrap/libBornAgainSim.py | 40 ++-- auto/Wrap/libBornAgainSim_wrap.cpp | 295 ++++++++++++-------------- 12 files changed, 164 insertions(+), 260 deletions(-) diff --git a/Device/Instrument/Instrument.cpp b/Device/Instrument/Instrument.cpp index 759681111ca..3b263c2bd81 100644 --- a/Device/Instrument/Instrument.cpp +++ b/Device/Instrument/Instrument.cpp @@ -26,7 +26,6 @@ Instrument::Instrument(const Beam& beam, const IDetector& detector) : m_beam(beam.clone()) , m_detector(detector.clone()) { - initDetector(); } Instrument::Instrument() @@ -53,12 +52,6 @@ Instrument& Instrument::operator=(const Instrument& other) void Instrument::setDetector(const IDetector& detector) { m_detector.reset(detector.clone()); - initDetector(); -} - -void Instrument::initDetector() -{ - m_detector->setDetectorNormal(beam().direction().zReflected()); } std::vector<const INode*> Instrument::nodeChildren() const @@ -74,8 +67,6 @@ void Instrument::setBeamParams(double wavelength, double alpha_i, double phi_i) { m_beam->setWavelength(wavelength); m_beam->setDirection({alpha_i, phi_i}); - if (m_detector) - initDetector(); } const IDetector* Instrument::getDetector() const diff --git a/Device/Instrument/Instrument.h b/Device/Instrument/Instrument.h index 2fa6f426ae6..e19900f7ffd 100644 --- a/Device/Instrument/Instrument.h +++ b/Device/Instrument/Instrument.h @@ -50,9 +50,6 @@ public: //! Sets the detector (axes can be overwritten later) void setDetector(const IDetector& detector); - //! init detector with beam settings - void initDetector(); - std::vector<const INode*> nodeChildren() const override; protected: diff --git a/GUI/Model/Device/InstrumentItems.cpp b/GUI/Model/Device/InstrumentItems.cpp index 1c5c5619f5c..a235368001f 100644 --- a/GUI/Model/Device/InstrumentItems.cpp +++ b/GUI/Model/Device/InstrumentItems.cpp @@ -409,7 +409,6 @@ QString GISASInstrumentItem::instrumentType() const ICoordSystem* GISASInstrumentItem::createCoordSystem() const { const auto instrument = createInstrument(); - instrument->initDetector(); const auto* det2D = dynamic_cast<const IDetector2D*>(instrument->getDetector()); ASSERT(det2D); return det2D->scatteringCoords(instrument->beam()); @@ -471,7 +470,6 @@ ICoordSystem* OffSpecularInstrumentItem::createCoordSystem() const m_alphaAxis.min() * Units::deg, m_alphaAxis.max() * Units::deg); const auto instrument = createInstrument(); - instrument->initDetector(); const auto* const detector2d = dynamic_cast<const IDetector2D*>(instrument->getDetector()); ASSERT(detector2d); return detector2d->offspecCoords(alphaAxis, instrument->beam().direction()); diff --git a/Sim/Simulation/ISimulation.cpp b/Sim/Simulation/ISimulation.cpp index 74c33b7534c..7cf253bd800 100644 --- a/Sim/Simulation/ISimulation.cpp +++ b/Sim/Simulation/ISimulation.cpp @@ -112,6 +112,7 @@ ISimulation::ISimulation(const Beam& beam, const MultiLayer& sample, const IDete , m_progress(std::make_unique<ProgressHandler>()) , m_instrument(beam, detector) { + m_instrument.detector().setDetectorNormal(m_instrument.beam().direction().zReflected()); setSample(sample); initialize(); } diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h index 52509eded5f..ba57a4166cf 100644 --- a/Sim/Simulation/ISimulation.h +++ b/Sim/Simulation/ISimulation.h @@ -51,10 +51,6 @@ public: //! Run a simulation, and return the result. SimulationResult simulate(); - Instrument& instrument() { return m_instrument; } - Beam& beam() { return m_instrument.beam(); } - IDetector& detector() { return m_instrument.detector(); } - void setSample(const MultiLayer& sample); void setBackground(const IBackground& bg); @@ -69,16 +65,23 @@ public: void setTerminalProgressMonitor(); + Beam& beam() { return m_instrument.beam(); } + IDetector& detector() { return m_instrument.detector(); } + #ifndef SWIG void subscribe(const std::function<bool(size_t)>& inform); std::string unitOfParameter(ParameterDistribution::WhichParameter which) const; const MultiLayer* sample() const; + + Instrument& instrument() { return m_instrument; } const Instrument& instrument() const { return m_instrument; } + const Beam& beam() const { return m_instrument.beam(); } const IDetector& detector() const { return m_instrument.detector(); } const IDetector* getDetector() const { return m_instrument.getDetector(); } + const IBackground* background() const { return m_background.get(); } const std::vector<ParameterDistribution>& getDistributions() const; diff --git a/Sim/Simulation/SpecularSimulation.cpp b/Sim/Simulation/SpecularSimulation.cpp index c9991a00f83..c0e3c202727 100644 --- a/Sim/Simulation/SpecularSimulation.cpp +++ b/Sim/Simulation/SpecularSimulation.cpp @@ -64,7 +64,6 @@ SpecularSimulation::SpecularSimulation(SpecularSimulation&&) = default; void SpecularSimulation::prepareSimulation() { ASSERT(detector().rank() == 1); - instrument().initDetector(); ISimulation::prepareSimulation(); } diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i index 868197e3592..84b9c234a40 100644 --- a/auto/Wrap/doxygenDevice.i +++ b/auto/Wrap/doxygenDevice.i @@ -1550,11 +1550,6 @@ Sets the beam wavelength and incoming angles. Sets the detector (axes can be overwritten later) "; -%feature("docstring") Instrument::initDetector "void Instrument::initDetector() - -init detector with beam settings -"; - %feature("docstring") Instrument::nodeChildren "std::vector< const INode * > Instrument::nodeChildren() const override "; diff --git a/auto/Wrap/doxygenSim.i b/auto/Wrap/doxygenSim.i index 4ca5b3efd7d..cff7329cace 100644 --- a/auto/Wrap/doxygenSim.i +++ b/auto/Wrap/doxygenSim.i @@ -879,15 +879,6 @@ Run a simulation, and return the result. Runs simulation with possible averaging over parameter distributions; returns result. "; -%feature("docstring") ISimulation::instrument "Instrument& ISimulation::instrument() -"; - -%feature("docstring") ISimulation::beam "Beam& ISimulation::beam() -"; - -%feature("docstring") ISimulation::detector "IDetector& ISimulation::detector() -"; - %feature("docstring") ISimulation::setSample "void ISimulation::setSample(const MultiLayer &sample) The MultiLayer object will not be owned by the ISimulation object. @@ -913,6 +904,12 @@ The MultiLayer object will not be owned by the ISimulation object. Initializes a progress monitor that prints to stdout. "; +%feature("docstring") ISimulation::beam "Beam& ISimulation::beam() +"; + +%feature("docstring") ISimulation::detector "IDetector& ISimulation::detector() +"; + %feature("docstring") ISimulation::subscribe "void ISimulation::subscribe(const std::function< bool(size_t)> &inform) "; @@ -922,6 +919,9 @@ Initializes a progress monitor that prints to stdout. %feature("docstring") ISimulation::sample "const MultiLayer * ISimulation::sample() const "; +%feature("docstring") ISimulation::instrument "Instrument& ISimulation::instrument() +"; + %feature("docstring") ISimulation::instrument "const Instrument& ISimulation::instrument() const "; diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py index b721061e08e..0bc2cffdf65 100644 --- a/auto/Wrap/libBornAgainDevice.py +++ b/auto/Wrap/libBornAgainDevice.py @@ -4302,16 +4302,6 @@ class Instrument(libBornAgainParam.INode): """ return _libBornAgainDevice.Instrument_setDetector(self, detector) - def initDetector(self): - r""" - initDetector(Instrument self) - void Instrument::initDetector() - - init detector with beam settings - - """ - return _libBornAgainDevice.Instrument_initDetector(self) - def nodeChildren(self): r""" nodeChildren(Instrument self) -> std::vector< INode const *,std::allocator< INode const * > > diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp index c1fc89868be..fa28c435250 100644 --- a/auto/Wrap/libBornAgainDevice_wrap.cpp +++ b/auto/Wrap/libBornAgainDevice_wrap.cpp @@ -36157,28 +36157,6 @@ fail: } -SWIGINTERN PyObject *_wrap_Instrument_initDetector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Instrument *arg1 = (Instrument *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Instrument, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_initDetector" "', argument " "1"" of type '" "Instrument *""'"); - } - arg1 = reinterpret_cast< Instrument * >(argp1); - (arg1)->initDetector(); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_Instrument_nodeChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Instrument *arg1 = (Instrument *) 0 ; @@ -43383,13 +43361,6 @@ static PyMethodDef SwigMethods[] = { "Sets the detector (axes can be overwritten later) \n" "\n" ""}, - { "Instrument_initDetector", _wrap_Instrument_initDetector, METH_O, "\n" - "Instrument_initDetector(Instrument self)\n" - "void Instrument::initDetector()\n" - "\n" - "init detector with beam settings \n" - "\n" - ""}, { "Instrument_nodeChildren", _wrap_Instrument_nodeChildren, METH_O, "\n" "Instrument_nodeChildren(Instrument self) -> std::vector< INode const *,std::allocator< INode const * > >\n" "std::vector< const INode * > Instrument::nodeChildren() const override\n" diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py index c86e7193ba2..ae32d166b45 100644 --- a/auto/Wrap/libBornAgainSim.py +++ b/auto/Wrap/libBornAgainSim.py @@ -3360,30 +3360,6 @@ class ISimulation(libBornAgainParam.INode): """ return _libBornAgainSim.ISimulation_simulate(self) - def instrument(self): - r""" - instrument(ISimulation self) -> Instrument & - const Instrument& ISimulation::instrument() const - - """ - return _libBornAgainSim.ISimulation_instrument(self) - - def beam(self): - r""" - beam(ISimulation self) -> Beam & - const Beam& ISimulation::beam() const - - """ - return _libBornAgainSim.ISimulation_beam(self) - - def detector(self): - r""" - detector(ISimulation self) -> IDetector & - const IDetector& ISimulation::detector() const - - """ - return _libBornAgainSim.ISimulation_detector(self) - def setSample(self, sample): r""" setSample(ISimulation self, MultiLayer const & sample) @@ -3430,6 +3406,22 @@ class ISimulation(libBornAgainParam.INode): """ return _libBornAgainSim.ISimulation_setTerminalProgressMonitor(self) + def beam(self): + r""" + beam(ISimulation self) -> Beam & + const Beam& ISimulation::beam() const + + """ + return _libBornAgainSim.ISimulation_beam(self) + + def detector(self): + r""" + detector(ISimulation self) -> IDetector & + const IDetector& ISimulation::detector() const + + """ + return _libBornAgainSim.ISimulation_detector(self) + # Register ISimulation in _libBornAgainSim: _libBornAgainSim.ISimulation_swigregister(ISimulation) diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp index 3de3037d67f..d915e53885f 100644 --- a/auto/Wrap/libBornAgainSim_wrap.cpp +++ b/auto/Wrap/libBornAgainSim_wrap.cpp @@ -3120,82 +3120,81 @@ namespace Swig { #define SWIGTYPE_p_ISimulation2D swig_types[20] #define SWIGTYPE_p_ISpecularScan swig_types[21] #define SWIGTYPE_p_IVarianceFunction swig_types[22] -#define SWIGTYPE_p_Instrument swig_types[23] -#define SWIGTYPE_p_IntensityFunctionLog swig_types[24] -#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[25] -#define SWIGTYPE_p_IterationInfo swig_types[26] -#define SWIGTYPE_p_MultiLayer swig_types[27] -#define SWIGTYPE_p_OffSpecularSimulation swig_types[28] -#define SWIGTYPE_p_ParameterDistribution swig_types[29] -#define SWIGTYPE_p_PoissonBackground swig_types[30] -#define SWIGTYPE_p_PyBuilderCallback swig_types[31] -#define SWIGTYPE_p_PyObserverCallback swig_types[32] -#define SWIGTYPE_p_QzScan swig_types[33] -#define SWIGTYPE_p_RealLimits swig_types[34] -#define SWIGTYPE_p_ScanResolution swig_types[35] -#define SWIGTYPE_p_ScatteringSimulation swig_types[36] -#define SWIGTYPE_p_SimulationOptions swig_types[37] -#define SWIGTYPE_p_SimulationResult swig_types[38] -#define SWIGTYPE_p_SpecularSimulation swig_types[39] -#define SWIGTYPE_p_VarianceConstantFunction swig_types[40] -#define SWIGTYPE_p_VarianceSimFunction swig_types[41] -#define SWIGTYPE_p_Vec3T_double_t swig_types[42] -#define SWIGTYPE_p_Vec3T_int_t swig_types[43] -#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[44] -#define SWIGTYPE_p_allocator_type swig_types[45] -#define SWIGTYPE_p_char swig_types[46] -#define SWIGTYPE_p_difference_type swig_types[47] -#define SWIGTYPE_p_first_type swig_types[48] -#define SWIGTYPE_p_int swig_types[49] -#define SWIGTYPE_p_key_type swig_types[50] -#define SWIGTYPE_p_long_long swig_types[51] -#define SWIGTYPE_p_mapped_type swig_types[52] -#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[53] -#define SWIGTYPE_p_mumufit__Parameters swig_types[54] -#define SWIGTYPE_p_p_PyObject swig_types[55] -#define SWIGTYPE_p_second_type swig_types[56] -#define SWIGTYPE_p_short swig_types[57] -#define SWIGTYPE_p_signed_char swig_types[58] -#define SWIGTYPE_p_size_type swig_types[59] -#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[60] -#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[61] -#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[62] -#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[63] -#define SWIGTYPE_p_std__allocatorT_double_t swig_types[64] -#define SWIGTYPE_p_std__allocatorT_int_t swig_types[65] -#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[66] -#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[67] -#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[68] -#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[69] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[70] -#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[71] -#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[72] -#define SWIGTYPE_p_std__complexT_double_t swig_types[73] -#define SWIGTYPE_p_std__invalid_argument swig_types[74] -#define SWIGTYPE_p_std__lessT_std__string_t swig_types[75] -#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[76] -#define SWIGTYPE_p_std__pairT_double_double_t swig_types[77] -#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[78] -#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[79] -#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[80] -#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[81] -#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[82] -#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[83] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[84] -#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[85] -#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[86] -#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[87] -#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[88] -#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[89] -#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[90] -#define SWIGTYPE_p_swig__SwigPyIterator swig_types[91] -#define SWIGTYPE_p_unsigned_char swig_types[92] -#define SWIGTYPE_p_unsigned_int swig_types[93] -#define SWIGTYPE_p_unsigned_long_long swig_types[94] -#define SWIGTYPE_p_unsigned_short swig_types[95] -#define SWIGTYPE_p_value_type swig_types[96] -static swig_type_info *swig_types[98]; -static swig_module_info swig_module = {swig_types, 97, 0, 0, 0, 0}; +#define SWIGTYPE_p_IntensityFunctionLog swig_types[23] +#define SWIGTYPE_p_IntensityFunctionSqrt swig_types[24] +#define SWIGTYPE_p_IterationInfo swig_types[25] +#define SWIGTYPE_p_MultiLayer swig_types[26] +#define SWIGTYPE_p_OffSpecularSimulation swig_types[27] +#define SWIGTYPE_p_ParameterDistribution swig_types[28] +#define SWIGTYPE_p_PoissonBackground swig_types[29] +#define SWIGTYPE_p_PyBuilderCallback swig_types[30] +#define SWIGTYPE_p_PyObserverCallback swig_types[31] +#define SWIGTYPE_p_QzScan swig_types[32] +#define SWIGTYPE_p_RealLimits swig_types[33] +#define SWIGTYPE_p_ScanResolution swig_types[34] +#define SWIGTYPE_p_ScatteringSimulation swig_types[35] +#define SWIGTYPE_p_SimulationOptions swig_types[36] +#define SWIGTYPE_p_SimulationResult swig_types[37] +#define SWIGTYPE_p_SpecularSimulation swig_types[38] +#define SWIGTYPE_p_VarianceConstantFunction swig_types[39] +#define SWIGTYPE_p_VarianceSimFunction swig_types[40] +#define SWIGTYPE_p_Vec3T_double_t swig_types[41] +#define SWIGTYPE_p_Vec3T_int_t swig_types[42] +#define SWIGTYPE_p_Vec3T_std__complexT_double_t_t swig_types[43] +#define SWIGTYPE_p_allocator_type swig_types[44] +#define SWIGTYPE_p_char swig_types[45] +#define SWIGTYPE_p_difference_type swig_types[46] +#define SWIGTYPE_p_first_type swig_types[47] +#define SWIGTYPE_p_int swig_types[48] +#define SWIGTYPE_p_key_type swig_types[49] +#define SWIGTYPE_p_long_long swig_types[50] +#define SWIGTYPE_p_mapped_type swig_types[51] +#define SWIGTYPE_p_mumufit__MinimizerResult swig_types[52] +#define SWIGTYPE_p_mumufit__Parameters swig_types[53] +#define SWIGTYPE_p_p_PyObject swig_types[54] +#define SWIGTYPE_p_second_type swig_types[55] +#define SWIGTYPE_p_short swig_types[56] +#define SWIGTYPE_p_signed_char swig_types[57] +#define SWIGTYPE_p_size_type swig_types[58] +#define SWIGTYPE_p_std__allocatorT_AxisInfo_t swig_types[59] +#define SWIGTYPE_p_std__allocatorT_INode_const_p_t swig_types[60] +#define SWIGTYPE_p_std__allocatorT_INode_p_t swig_types[61] +#define SWIGTYPE_p_std__allocatorT_Vec3T_double_t_t swig_types[62] +#define SWIGTYPE_p_std__allocatorT_double_t swig_types[63] +#define SWIGTYPE_p_std__allocatorT_int_t swig_types[64] +#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[65] +#define SWIGTYPE_p_std__allocatorT_std__pairT_double_double_t_t swig_types[66] +#define SWIGTYPE_p_std__allocatorT_std__pairT_std__string_const_double_t_t swig_types[67] +#define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[68] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[69] +#define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[70] +#define SWIGTYPE_p_std__allocatorT_unsigned_long_t swig_types[71] +#define SWIGTYPE_p_std__complexT_double_t swig_types[72] +#define SWIGTYPE_p_std__invalid_argument swig_types[73] +#define SWIGTYPE_p_std__lessT_std__string_t swig_types[74] +#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[75] +#define SWIGTYPE_p_std__pairT_double_double_t swig_types[76] +#define SWIGTYPE_p_std__vectorT_AxisInfo_std__allocatorT_AxisInfo_t_t swig_types[77] +#define SWIGTYPE_p_std__vectorT_INode_const_p_std__allocatorT_INode_const_p_t_t swig_types[78] +#define SWIGTYPE_p_std__vectorT_INode_p_std__allocatorT_INode_p_t_t swig_types[79] +#define SWIGTYPE_p_std__vectorT_ParaMeta_std__allocatorT_ParaMeta_t_t swig_types[80] +#define SWIGTYPE_p_std__vectorT_Vec3T_double_t_std__allocatorT_Vec3T_double_t_t_t swig_types[81] +#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[82] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[83] +#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[84] +#define SWIGTYPE_p_std__vectorT_std__pairT_double_double_t_std__allocatorT_std__pairT_double_double_t_t_t swig_types[85] +#define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[86] +#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[87] +#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[88] +#define SWIGTYPE_p_std__vectorT_unsigned_long_std__allocatorT_unsigned_long_t_t swig_types[89] +#define SWIGTYPE_p_swig__SwigPyIterator swig_types[90] +#define SWIGTYPE_p_unsigned_char swig_types[91] +#define SWIGTYPE_p_unsigned_int swig_types[92] +#define SWIGTYPE_p_unsigned_long_long swig_types[93] +#define SWIGTYPE_p_unsigned_short swig_types[94] +#define SWIGTYPE_p_value_type swig_types[95] +static swig_type_info *swig_types[97]; +static swig_module_info swig_module = {swig_types, 96, 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) @@ -37174,75 +37173,6 @@ fail: } -SWIGINTERN PyObject *_wrap_ISimulation_instrument(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ISimulation *arg1 = (ISimulation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - Instrument *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_instrument" "', argument " "1"" of type '" "ISimulation *""'"); - } - arg1 = reinterpret_cast< ISimulation * >(argp1); - result = (Instrument *) &(arg1)->instrument(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Instrument, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ISimulation_beam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ISimulation *arg1 = (ISimulation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - Beam *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_beam" "', argument " "1"" of type '" "ISimulation *""'"); - } - arg1 = reinterpret_cast< ISimulation * >(argp1); - result = (Beam *) &(arg1)->beam(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ISimulation_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - ISimulation *arg1 = (ISimulation *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - IDetector *result = 0 ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_detector" "', argument " "1"" of type '" "ISimulation *""'"); - } - arg1 = reinterpret_cast< ISimulation * >(argp1); - result = (IDetector *) &(arg1)->detector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *_wrap_ISimulation_setSample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ISimulation *arg1 = (ISimulation *) 0 ; @@ -37730,6 +37660,52 @@ fail: } +SWIGINTERN PyObject *_wrap_ISimulation_beam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ISimulation *arg1 = (ISimulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Beam *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_beam" "', argument " "1"" of type '" "ISimulation *""'"); + } + arg1 = reinterpret_cast< ISimulation * >(argp1); + result = (Beam *) &(arg1)->beam(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Beam, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ISimulation_detector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ISimulation *arg1 = (ISimulation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + IDetector *result = 0 ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ISimulation, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ISimulation_detector" "', argument " "1"" of type '" "ISimulation *""'"); + } + arg1 = reinterpret_cast< ISimulation * >(argp1); + result = (IDetector *) &(arg1)->detector(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IDetector, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *ISimulation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL; @@ -41832,21 +41808,6 @@ static PyMethodDef SwigMethods[] = { "Runs simulation with possible averaging over parameter distributions; returns result. \n" "\n" ""}, - { "ISimulation_instrument", _wrap_ISimulation_instrument, METH_O, "\n" - "ISimulation_instrument(ISimulation self) -> Instrument &\n" - "const Instrument& ISimulation::instrument() const\n" - "\n" - ""}, - { "ISimulation_beam", _wrap_ISimulation_beam, METH_O, "\n" - "ISimulation_beam(ISimulation self) -> Beam &\n" - "const Beam& ISimulation::beam() const\n" - "\n" - ""}, - { "ISimulation_detector", _wrap_ISimulation_detector, METH_O, "\n" - "ISimulation_detector(ISimulation self) -> IDetector &\n" - "const IDetector& ISimulation::detector() const\n" - "\n" - ""}, { "ISimulation_setSample", _wrap_ISimulation_setSample, METH_VARARGS, "\n" "ISimulation_setSample(ISimulation self, MultiLayer const & sample)\n" "void ISimulation::setSample(const MultiLayer &sample)\n" @@ -41878,6 +41839,16 @@ static PyMethodDef SwigMethods[] = { "Initializes a progress monitor that prints to stdout. \n" "\n" ""}, + { "ISimulation_beam", _wrap_ISimulation_beam, METH_O, "\n" + "ISimulation_beam(ISimulation self) -> Beam &\n" + "const Beam& ISimulation::beam() const\n" + "\n" + ""}, + { "ISimulation_detector", _wrap_ISimulation_detector, METH_O, "\n" + "ISimulation_detector(ISimulation self) -> IDetector &\n" + "const IDetector& ISimulation::detector() const\n" + "\n" + ""}, { "ISimulation_swigregister", ISimulation_swigregister, METH_O, NULL}, { "delete_ISimulation2D", _wrap_delete_ISimulation2D, METH_O, "\n" "delete_ISimulation2D(ISimulation2D self)\n" @@ -42520,7 +42491,6 @@ static swig_type_info _swigt__p_ISimulation = {"_p_ISimulation", "ISimulation *" static swig_type_info _swigt__p_ISimulation2D = {"_p_ISimulation2D", "ISimulation2D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ISpecularScan = {"_p_ISpecularScan", "ISpecularScan *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IVarianceFunction = {"_p_IVarianceFunction", "IVarianceFunction *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Instrument = {"_p_Instrument", "Instrument *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IntensityFunctionLog = {"_p_IntensityFunctionLog", "IntensityFunctionLog *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IntensityFunctionSqrt = {"_p_IntensityFunctionSqrt", "IntensityFunctionSqrt *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_IterationInfo = {"_p_IterationInfo", "IterationInfo *", 0, 0, (void*)0, 0}; @@ -42619,7 +42589,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_ISimulation2D, &_swigt__p_ISpecularScan, &_swigt__p_IVarianceFunction, - &_swigt__p_Instrument, &_swigt__p_IntensityFunctionLog, &_swigt__p_IntensityFunctionSqrt, &_swigt__p_IterationInfo, @@ -42718,7 +42687,6 @@ static swig_cast_info _swigc__p_ISimulation[] = { {&_swigt__p_ISimulation2D, _p static swig_cast_info _swigc__p_ISimulation2D[] = { {&_swigt__p_ISimulation2D, 0, 0, 0}, {&_swigt__p_ScatteringSimulation, _p_ScatteringSimulationTo_p_ISimulation2D, 0, 0}, {&_swigt__p_OffSpecularSimulation, _p_OffSpecularSimulationTo_p_ISimulation2D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ISpecularScan[] = { {&_swigt__p_QzScan, _p_QzScanTo_p_ISpecularScan, 0, 0}, {&_swigt__p_AlphaScan, _p_AlphaScanTo_p_ISpecularScan, 0, 0}, {&_swigt__p_ISpecularScan, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IVarianceFunction[] = { {&_swigt__p_IVarianceFunction, 0, 0, 0}, {&_swigt__p_VarianceConstantFunction, _p_VarianceConstantFunctionTo_p_IVarianceFunction, 0, 0}, {&_swigt__p_VarianceSimFunction, _p_VarianceSimFunctionTo_p_IVarianceFunction, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Instrument[] = { {&_swigt__p_Instrument, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntensityFunctionLog[] = { {&_swigt__p_IntensityFunctionLog, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntensityFunctionSqrt[] = { {&_swigt__p_IntensityFunctionSqrt, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IterationInfo[] = { {&_swigt__p_IterationInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -42817,7 +42785,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_ISimulation2D, _swigc__p_ISpecularScan, _swigc__p_IVarianceFunction, - _swigc__p_Instrument, _swigc__p_IntensityFunctionLog, _swigc__p_IntensityFunctionSqrt, _swigc__p_IterationInfo, -- GitLab