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

migrating from ParticleLayoutContribution to ReLayout

parent 47d2c569
No related branches found
No related tags found
1 merge request!1275streamline computation of scattering contributions
......@@ -14,16 +14,34 @@
#include "Resample/Processed/ReLayout.h"
#include "Resample/Coherence/CoheringSubparticles.h"
#include "Resample/Interparticle/DecouplingApproximationStrategy.h"
#include "Resample/Interparticle/IInterparticleStrategy.h"
#include "Resample/Interparticle/SSCAStrategy.h"
#include "Sample/Aggregate/IInterference.h"
#include "Sample/Aggregate/InterferenceRadialParacrystal.h"
namespace {
std::unique_ptr<IInterparticleStrategy> processedInterference(const ReLayout& re_layout,
const SimulationOptions& sim_params,
bool polarized)
{
const IInterference* iff = re_layout.interferenceFunction();
const OwningVector<const CoheringSubparticles>& weighted_formfactors = re_layout.subparticles();
const auto* radial_para = dynamic_cast<const InterferenceRadialParacrystal*>(iff);
if (radial_para)
if (double kappa = radial_para->kappa(); kappa > 0.0)
return std::make_unique<SSCAStrategy>(weighted_formfactors, radial_para, sim_params,
polarized, kappa);
return std::make_unique<DecouplingApproximationStrategy>(weighted_formfactors, iff, sim_params,
polarized);
}
} // namespace
// ************************************************************************************************
// class implementation
// ************************************************************************************************
ReLayout::ReLayout(double surface_density, OwningVector<const CoheringSubparticles>&& particles,
const IInterference* iff)
......
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