diff --git a/Resample/DWBA/DWBA_Pol.cpp b/Resample/DWBA/DWBA_Pol.cpp index 032adc0f47598f578f7ca095f26674eae65975b5..a59c97b1625e96448fc15eba0916ff66e3432600 100644 --- a/Resample/DWBA/DWBA_Pol.cpp +++ b/Resample/DWBA/DWBA_Pol.cpp @@ -15,7 +15,7 @@ #include "Resample/DWBA/DWBA_Pol.h" #include "Base/Vector/WavevectorInfo.h" #include "Resample/Element/DiffuseElement.h" -#include "Resample/Flux/IFlux.h" +#include "Resample/Flux/MatrixFlux.h" #include "Sample/Scattering/IFormFactor.h" namespace { @@ -49,8 +49,8 @@ Eigen::Matrix2cd DWBA_Pol::coherentPolFF(const DiffuseElement& ele) const return result; } - const IFlux* inFlux = ele.fluxIn(iLayer()); - const IFlux* outFlux = ele.fluxOut(iLayer()); + const auto* inFlux = dynamic_cast<const MatrixFlux*>(ele.fluxIn(iLayer())); + const auto* outFlux = dynamic_cast<const MatrixFlux*>(ele.fluxOut(iLayer())); // the required wavevectors inside the layer for // different eigenmodes and in- and outgoing wavevector; diff --git a/Resample/DWBA/DWBA_Scalar.cpp b/Resample/DWBA/DWBA_Scalar.cpp index 0959cdc30f6a5011351f06351f430df25513c006..b0bd32500cd8736dbc0a63dd8588d753161d328f 100644 --- a/Resample/DWBA/DWBA_Scalar.cpp +++ b/Resample/DWBA/DWBA_Scalar.cpp @@ -31,8 +31,8 @@ complex_t DWBA_Scalar::coherentFF(const DiffuseElement& ele) const // no slicing, pure Born approximation return m_ff->theFF(wavevectors); - const IFlux* inFlux = ele.fluxIn(iLayer()); - const IFlux* outFlux = ele.fluxOut(iLayer()); + const auto* inFlux = dynamic_cast<const ScalarFlux*>(ele.fluxIn(iLayer())); + const auto* outFlux = dynamic_cast<const ScalarFlux*>(ele.fluxOut(iLayer())); // Retrieve the two different incoming wavevectors in the layer const cvector_t& ki = wavevectors.getKi(); diff --git a/Tests/UnitTests/Core/Sample/FormFactorCoherentSumTest.cpp b/Tests/UnitTests/Core/Sample/FormFactorCoherentSumTest.cpp index cc57dc611a93524c69967315bc596c7d7c4ac031..f5ce1208c6efc5fd5a87c30bdd03ef2c5d36f5f7 100644 --- a/Tests/UnitTests/Core/Sample/FormFactorCoherentSumTest.cpp +++ b/Tests/UnitTests/Core/Sample/FormFactorCoherentSumTest.cpp @@ -1,5 +1,5 @@ #include "Resample/Coherence/FFSum.h" -#include "Resample/FFCompute/ComputeDWBA.h" +#include "Resample/DWBA/DWBA_Scalar.h" #include "Sample/HardParticle/FormFactorFullSphere.h" #include "Tests/GTestWrapper/google_test.h" @@ -9,7 +9,7 @@ class CoherentFFSumTest : public ::testing::Test { TEST_F(CoherentFFSumTest, RelAbundance) { FormFactorFullSphere ff(5.0); - std::shared_ptr<const IComputeFF> part(new ComputeDWBA(ff)); + auto part = std::make_unique<const DWBA_Scalar>(ff); CoherentFFSum ffw(1.0, {part}); EXPECT_EQ(1.0, ffw.relativeAbundance()); EXPECT_EQ(5.0, ffw.radialExtension()); diff --git a/auto/Wrap/doxygenResample.i b/auto/Wrap/doxygenResample.i index c77caaeac0b0ebfb213ba9925bc5a5c68fcd2bdc..3f1891c3dbec2d265a6a66e62f2936b1f284a671 100644 --- a/auto/Wrap/doxygenResample.i +++ b/auto/Wrap/doxygenResample.i @@ -247,15 +247,6 @@ The following functions return the transmitted and reflected amplitudes for diff Returns z-part of the two wavevector eigenmodes. "; -%feature("docstring") IFlux::getScalarT "virtual complex_t IFlux::getScalarT() const -"; - -%feature("docstring") IFlux::getScalarR "virtual complex_t IFlux::getScalarR() const -"; - -%feature("docstring") IFlux::getScalarKz "virtual complex_t IFlux::getScalarKz() const -"; - // File: classIInterparticleStrategy.xml %feature("docstring") IInterparticleStrategy " @@ -567,7 +558,7 @@ Returns z-part of the two wavevector eigenmodes. %feature("docstring") ScalarFlux::getScalarR "complex_t ScalarFlux::getScalarR() const "; -%feature("docstring") ScalarFlux::getScalarKz "virtual complex_t ScalarFlux::getScalarKz() const +%feature("docstring") ScalarFlux::getScalarKz "complex_t ScalarFlux::getScalarKz() const ";