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

ProcessedSample::fluxesIn used in DepthProbeComputation

parent 78c23b1d
No related branches found
No related tags found
1 merge request!197rm IFresnelMap class hierarchy
Pipeline #41366 passed
......@@ -17,7 +17,6 @@
#include "Base/Progress/ProgressHandler.h"
#include "Core/Element/DepthProbeElement.h"
#include "Resample/Flux/IFlux.h"
#include "Resample/Fresnel/IFresnelMap.h"
#include "Resample/Processed/ProcessedSample.h"
DepthProbeComputation::DepthProbeComputation(const ProcessedSample& re_sample,
......@@ -44,6 +43,8 @@ void DepthProbeComputation::runProtected()
size_t start_z_ind = n_z;
std::valarray<double> intensities(0.0, n_z);
std::vector<std::unique_ptr<const IFlux>> fluxes = m_re_sample.fluxesIn(ele.getKi());
double z_layer_bottom(0.0);
double z_layer_top(0.0);
for (size_t i_layer = 0; i_layer < n_layers && start_z_ind != 0; ++i_layer) {
......@@ -51,7 +52,7 @@ void DepthProbeComputation::runProtected()
z_layer_top = i_layer ? m_re_sample.sliceTopZ(i_layer) : 0;
// get R & T coefficients for current layer
const auto flux = m_re_sample.fresnelMap()->getInFlux(ele.getKi(), i_layer);
const auto& flux = fluxes[i_layer];
const complex_t R = flux->getScalarR();
const complex_t T = flux->getScalarT();
const complex_t kz_out = flux->getScalarKz();
......
......@@ -323,6 +323,11 @@ bool ProcessedSample::hasRoughness() const
return false;
}
std::vector<std::unique_ptr<const IFlux>> ProcessedSample::fluxesIn(const kvector_t& k) const
{
return m_specular_strategy->Execute(m_refined_stack, k);
}
double ProcessedSample::crossCorrSpectralFun(const kvector_t kvec, size_t j, size_t k) const
{
const double xCorrLength = m_sample.crossCorrLength();
......
......@@ -25,6 +25,7 @@
#include <memory>
#include <vector>
class IFlux;
class IFresnelMap;
class ISpecularStrategy;
class Material;
......@@ -59,6 +60,8 @@ public:
bool hasRoughness() const;
const MultiLayer& sample() const { return m_sample; }
std::vector<std::unique_ptr<const IFlux>> fluxesIn(const kvector_t& k) const;
//! Fourier transform of the correlation function of roughnesses between the interfaces
double crossCorrSpectralFun(const kvector_t kvec, size_t j, size_t k) const;
......
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