Skip to content
Snippets Groups Projects
Commit 1f791312 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Forward all Fresnel coefficient maps to LayerStrategyBuilder

parent be349482
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ bool ParticleLayoutComputation::eval(
const std::vector<SimulationElement>::iterator& end_it) const
{
const std::unique_ptr<const IInterferenceFunctionStrategy> p_strategy {
LayerStrategyBuilder(mp_multilayer, mp_layout, layerFresnelMap(m_layer_index),
LayerStrategyBuilder(mp_multilayer, mp_layout, mp_specular_info_map,
polarized, options, m_layer_index).createStrategy() };
double total_surface_density = mp_layout->getTotalParticleSurfaceDensity();
......
......@@ -29,11 +29,11 @@
LayerStrategyBuilder::LayerStrategyBuilder(
const MultiLayer* p_multilayer, const ILayout* p_layout,
const ILayerSpecularInfo* p_specular_info, bool polarized,
const SafePointerVector<ILayerSpecularInfo>* p_specular_info, bool polarized,
const SimulationOptions& sim_params, size_t layer_index)
: mp_multilayer(p_multilayer)
, mp_layout(p_layout)
, mp_specular_info (p_specular_info)
, mp_specular_info_map(p_specular_info)
, m_polarized {polarized}
, m_sim_params (sim_params)
, m_layer_index(layer_index)
......@@ -88,7 +88,7 @@ SafePointerVector<class FormFactorCoherentSum> LayerStrategyBuilder::collectForm
FormFactorCoherentSum* p_ff_coh;
p_ff_coh = createFormFactorCoherentSum(particle, p_layer_material);
p_ff_coh->scaleRelativeAbundance(layout_abundance);
p_ff_coh->setSpecularInfo(*mp_specular_info);
p_ff_coh->setSpecularInfo(*(*mp_specular_info_map)[m_layer_index]);
result.push_back(p_ff_coh);
}
return result;
......
......@@ -36,7 +36,7 @@ class BA_CORE_API_ LayerStrategyBuilder
public:
LayerStrategyBuilder(
const MultiLayer* p_multilayer, const ILayout* p_layout,
const ILayerSpecularInfo* p_specular_info, bool polarized,
const SafePointerVector<ILayerSpecularInfo>* p_specular_info, bool polarized,
const SimulationOptions& sim_params, size_t layer_index);
~LayerStrategyBuilder();
......@@ -49,10 +49,11 @@ private:
const IParticle* particle, const IMaterial* p_ambient_material) const;
const MultiLayer* mp_multilayer;
const ILayout* mp_layout; //!< layout
const ILayerSpecularInfo* mp_specular_info; //!< R and T coefficients for DWBA
bool m_polarized; //!< polarized computation required?
SimulationOptions m_sim_params; //!< simulation parameters
const ILayout* mp_layout;
//! R and T coefficients for DWBA
const SafePointerVector<ILayerSpecularInfo>* mp_specular_info_map;
bool m_polarized; //!< polarized computation required?
SimulationOptions m_sim_params;
size_t m_layer_index;
};
......
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