diff --git a/Sample/Interference/DecouplingApproximationStrategy.cpp b/Sample/Interference/DecouplingApproximationStrategy.cpp index 4e9e95adb0c1d0bec02ee3c13cb2d5e264895c4e..0c1a20496822208f9a129ee2c65eb03e7b2a261b 100644 --- a/Sample/Interference/DecouplingApproximationStrategy.cpp +++ b/Sample/Interference/DecouplingApproximationStrategy.cpp @@ -35,7 +35,7 @@ DecouplingApproximationStrategy::scalarCalculation(const SimulationElement& sim_ { double intensity = 0.0; complex_t amplitude = complex_t(0.0, 0.0); - for (auto& ffw : m_formfactor_wrappers) { + for (auto& ffw : m_weighted_formfactors) { complex_t ff = ffw.evaluate(sim_element); if (std::isnan(ff.real())) throw Exceptions::RuntimeErrorException( @@ -57,7 +57,7 @@ DecouplingApproximationStrategy::polarizedCalculation(const SimulationElement& s Eigen::Matrix2cd mean_amplitude = Eigen::Matrix2cd::Zero(); const auto& polarization_handler = sim_element.polarizationHandler(); - for (auto& ffw : m_formfactor_wrappers) { + for (auto& ffw : m_weighted_formfactors) { Eigen::Matrix2cd ff = ffw.evaluatePol(sim_element); if (!ff.allFinite()) throw Exceptions::RuntimeErrorException( diff --git a/Sample/Interference/IInterferenceFunctionStrategy.cpp b/Sample/Interference/IInterferenceFunctionStrategy.cpp index 9c5c315dc7c5412602a9d39ebda7753afbd52ca1..12d47b0a841f97a91be164bceee5a60eab0ddf55 100644 --- a/Sample/Interference/IInterferenceFunctionStrategy.cpp +++ b/Sample/Interference/IInterferenceFunctionStrategy.cpp @@ -23,14 +23,14 @@ IInterferenceFunctionStrategy::IInterferenceFunctionStrategy( const std::vector<FormFactorCoherentSum>& weighted_formfactors, const IInterferenceFunction* p_iff, const SimulationOptions& sim_params, bool polarized) - : m_formfactor_wrappers(weighted_formfactors) + : m_weighted_formfactors(weighted_formfactors) , m_iff(p_iff ? p_iff->clone() : new InterferenceFunctionNone()) , m_options(sim_params) , m_polarized(polarized) , m_integrator( make_integrator_miser(this, &IInterferenceFunctionStrategy::evaluate_for_fixed_angles, 2)) { - ASSERT(!m_formfactor_wrappers.empty()); + ASSERT(!m_weighted_formfactors.empty()); } IInterferenceFunctionStrategy::~IInterferenceFunctionStrategy() = default; diff --git a/Sample/Interference/IInterferenceFunctionStrategy.h b/Sample/Interference/IInterferenceFunctionStrategy.h index 9d6b56908820f1a29cec2cb98996fc3ef7a760d1..62d65aa4530aadab5099f7b08a26bc5b642846a2 100644 --- a/Sample/Interference/IInterferenceFunctionStrategy.h +++ b/Sample/Interference/IInterferenceFunctionStrategy.h @@ -50,7 +50,7 @@ public: double evaluate(const SimulationElement& sim_element) const; protected: - std::vector<FormFactorCoherentSum> m_formfactor_wrappers; + std::vector<FormFactorCoherentSum> m_weighted_formfactors; std::unique_ptr<IInterferenceFunction> m_iff; const SimulationOptions m_options; diff --git a/Sample/Interference/SSCApproximationStrategy.cpp b/Sample/Interference/SSCApproximationStrategy.cpp index 5afef486a52e5e4a6092b453345d7a3d42f5387c..7aab1cb451a8097c92c149ce905eb046383c3b9d 100644 --- a/Sample/Interference/SSCApproximationStrategy.cpp +++ b/Sample/Interference/SSCApproximationStrategy.cpp @@ -55,7 +55,7 @@ SSCApproximationStrategy::SSCApproximationStrategy( , m_kappa(kappa) { m_mean_radius = 0.0; - for (auto& ffw : m_formfactor_wrappers) + for (auto& ffw : m_weighted_formfactors) m_mean_radius += ffw.relativeAbundance() * ffw.radialExtension(); } @@ -67,7 +67,7 @@ double SSCApproximationStrategy::scalarCalculation(const SimulationElement& sim_ double qp = sim_element.getMeanQ().magxy(); double diffuse_intensity = 0.0; complex_t ff_orig = 0., ff_conj = 0.; // original and conjugated mean formfactor - for (auto& ffw : m_formfactor_wrappers) { + for (auto& ffw : m_weighted_formfactors) { complex_t ff = ffw.evaluate(sim_element); double fraction = ffw.relativeAbundance(); diffuse_intensity += fraction * std::norm(ff); @@ -78,7 +78,7 @@ double SSCApproximationStrategy::scalarCalculation(const SimulationElement& sim_ ff_conj += prefac * std::conj(ff); } complex_t mean_ff_norm = ff_orig * ff_conj; - complex_t p2kappa = getCharacteristicSizeCoupling(qp, m_formfactor_wrappers); + complex_t p2kappa = getCharacteristicSizeCoupling(qp, m_weighted_formfactors); complex_t omega = getCharacteristicDistribution(qp, m_iff.get()); double iff = 2.0 * (mean_ff_norm * omega / (1.0 - p2kappa * omega)).real(); double dw_factor = m_iff->DWfactor(sim_element.getMeanQ()); @@ -93,7 +93,7 @@ double SSCApproximationStrategy::polarizedCalculation(const SimulationElement& s const auto& polarization_handler = sim_element.polarizationHandler(); Eigen::Matrix2cd ff_orig = Eigen::Matrix2cd::Zero(); Eigen::Matrix2cd ff_conj = Eigen::Matrix2cd::Zero(); - for (auto& ffw : m_formfactor_wrappers) { + for (auto& ffw : m_weighted_formfactors) { Eigen::Matrix2cd ff = ffw.evaluatePol(sim_element); double fraction = ffw.relativeAbundance(); diffuse_matrix += fraction * (ff * polarization_handler.getPolarization() * ff.adjoint()); @@ -103,7 +103,7 @@ double SSCApproximationStrategy::polarizedCalculation(const SimulationElement& s ff_orig += prefac * ff; ff_conj += prefac * ff.adjoint(); } - complex_t p2kappa = getCharacteristicSizeCoupling(qp, m_formfactor_wrappers); + complex_t p2kappa = getCharacteristicSizeCoupling(qp, m_weighted_formfactors); complex_t omega = getCharacteristicDistribution(qp, m_iff.get()); Eigen::Matrix2cd interference_matrix = (2.0 * omega / (1.0 - p2kappa * omega)) * polarization_handler.getAnalyzerOperator() * ff_orig