From d4146a31f2912583a84960c84ae9888a0ca2fb5d Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 14 Jul 2021 20:20:04 +0200 Subject: [PATCH] rm remnants of use_cache --- Resample/Fresnel/IFresnelMap.cpp | 5 +---- Resample/Fresnel/IFresnelMap.h | 3 +-- Resample/Fresnel/MatrixFresnelMap.cpp | 4 ++-- Resample/Fresnel/MatrixFresnelMap.h | 3 +-- Resample/Fresnel/ScalarFresnelMap.cpp | 4 ++-- Resample/Fresnel/ScalarFresnelMap.h | 3 +-- Resample/Processed/ProcessedSample.cpp | 7 +++---- auto/Wrap/doxygenResample.i | 6 +++--- 8 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Resample/Fresnel/IFresnelMap.cpp b/Resample/Fresnel/IFresnelMap.cpp index 587c9c7712f..adda1b58c62 100644 --- a/Resample/Fresnel/IFresnelMap.cpp +++ b/Resample/Fresnel/IFresnelMap.cpp @@ -13,14 +13,11 @@ // ************************************************************************************************ #include "Resample/Fresnel/IFresnelMap.h" -#include "Base/Pixel/DiffuseElement.h" -#include "Resample/Flux/IFlux.h" #include "Resample/Slice/Slice.h" #include "Resample/Slice/SliceStack.h" #include "Resample/Specular/ISpecularStrategy.h" -IFresnelMap::IFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy, - bool /*useCache*/) +IFresnelMap::IFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy) : m_slices(stack), m_strategy(std::move(strategy)) { } diff --git a/Resample/Fresnel/IFresnelMap.h b/Resample/Fresnel/IFresnelMap.h index 4a728117e0d..a7c4bba208e 100644 --- a/Resample/Fresnel/IFresnelMap.h +++ b/Resample/Fresnel/IFresnelMap.h @@ -33,8 +33,7 @@ class DiffuseElement; class IFresnelMap { public: - IFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy, - bool useCache); + IFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy); virtual ~IFresnelMap(); //! Retrieves the amplitude coefficients for given wavevector and layer. diff --git a/Resample/Fresnel/MatrixFresnelMap.cpp b/Resample/Fresnel/MatrixFresnelMap.cpp index d52680f2611..a29caa02c85 100644 --- a/Resample/Fresnel/MatrixFresnelMap.cpp +++ b/Resample/Fresnel/MatrixFresnelMap.cpp @@ -19,8 +19,8 @@ #include "Resample/Slice/SliceStack.h" MatrixFresnelMap::MatrixFresnelMap(const SliceStack& stack, - std::unique_ptr<ISpecularStrategy>&& strategy, bool useCache) - : IFresnelMap(stack, std::move(strategy), useCache) + std::unique_ptr<ISpecularStrategy>&& strategy) + : IFresnelMap(stack, std::move(strategy)) { m_inverted_slices.clear(); for (Slice slice : m_slices) { diff --git a/Resample/Fresnel/MatrixFresnelMap.h b/Resample/Fresnel/MatrixFresnelMap.h index 1946b209f30..10865d26707 100644 --- a/Resample/Fresnel/MatrixFresnelMap.h +++ b/Resample/Fresnel/MatrixFresnelMap.h @@ -33,8 +33,7 @@ class DiffuseElement; class MatrixFresnelMap : public IFresnelMap { public: - MatrixFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy, - bool useCache); + MatrixFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy); ~MatrixFresnelMap() override; MatrixFresnelMap(const MatrixFresnelMap& other) = delete; diff --git a/Resample/Fresnel/ScalarFresnelMap.cpp b/Resample/Fresnel/ScalarFresnelMap.cpp index cada0aa49af..934ff7d14eb 100644 --- a/Resample/Fresnel/ScalarFresnelMap.cpp +++ b/Resample/Fresnel/ScalarFresnelMap.cpp @@ -17,8 +17,8 @@ #include "Resample/Flux/IFlux.h" ScalarFresnelMap::ScalarFresnelMap(const SliceStack& stack, - std::unique_ptr<ISpecularStrategy>&& strategy, bool useCache) - : IFresnelMap(stack, std::move(strategy), useCache) + std::unique_ptr<ISpecularStrategy>&& strategy) + : IFresnelMap(stack, std::move(strategy)) { } diff --git a/Resample/Fresnel/ScalarFresnelMap.h b/Resample/Fresnel/ScalarFresnelMap.h index 031b1787cf2..2791faaf6e9 100644 --- a/Resample/Fresnel/ScalarFresnelMap.h +++ b/Resample/Fresnel/ScalarFresnelMap.h @@ -33,8 +33,7 @@ class DiffuseElement; class ScalarFresnelMap : public IFresnelMap { public: - ScalarFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy, - bool useCache); + ScalarFresnelMap(const SliceStack& stack, std::unique_ptr<ISpecularStrategy>&& strategy); ~ScalarFresnelMap() override; ScalarFresnelMap(const ScalarFresnelMap& other) = delete; diff --git a/Resample/Processed/ProcessedSample.cpp b/Resample/Processed/ProcessedSample.cpp index 9f6208d83f4..d2a31e98966 100644 --- a/Resample/Processed/ProcessedSample.cpp +++ b/Resample/Processed/ProcessedSample.cpp @@ -204,17 +204,16 @@ std::unique_ptr<IFresnelMap> fresnelify(const MultiLayer& sample, const SliceSta const SimulationOptions& options) { SliceStack fresnelStack = slices; - bool useCache = !options.isIntegrate(); + if (options.useAvgMaterials()) // modify fresnelStack setAvgMatsInStack(fresnelStack, layouts); if (slices.containsMagneticMaterial()) return std::make_unique<MatrixFresnelMap>( fresnelStack, - SampleUtils::SpecularStrategyBuilder::buildMagnetic(sample.roughnessModel()), useCache); + SampleUtils::SpecularStrategyBuilder::buildMagnetic(sample.roughnessModel())); return std::make_unique<ScalarFresnelMap>( - fresnelStack, SampleUtils::SpecularStrategyBuilder::buildScalar(sample.roughnessModel()), - useCache); + fresnelStack, SampleUtils::SpecularStrategyBuilder::buildScalar(sample.roughnessModel())); } } // namespace diff --git a/auto/Wrap/doxygenResample.i b/auto/Wrap/doxygenResample.i index 3e9912701d2..cac0f79a4e3 100644 --- a/auto/Wrap/doxygenResample.i +++ b/auto/Wrap/doxygenResample.i @@ -256,7 +256,7 @@ Holds all information that is needed to compute the IFlux that characterize an C++ includes: IFresnelMap.h "; -%feature("docstring") IFresnelMap::IFresnelMap "IFresnelMap::IFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy, bool useCache) +%feature("docstring") IFresnelMap::IFresnelMap "IFresnelMap::IFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy) "; %feature("docstring") IFresnelMap::~IFresnelMap "IFresnelMap::~IFresnelMap() @@ -422,7 +422,7 @@ Implementation of IFresnelMap for matrix valued reflection/transmission coeffic C++ includes: MatrixFresnelMap.h "; -%feature("docstring") MatrixFresnelMap::MatrixFresnelMap "MatrixFresnelMap::MatrixFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy, bool useCache) +%feature("docstring") MatrixFresnelMap::MatrixFresnelMap "MatrixFresnelMap::MatrixFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy) "; %feature("docstring") MatrixFresnelMap::~MatrixFresnelMap "MatrixFresnelMap::~MatrixFresnelMap() override @@ -613,7 +613,7 @@ Implementation of IFresnelMap for scalar valued reflection/transmission coeffic C++ includes: ScalarFresnelMap.h "; -%feature("docstring") ScalarFresnelMap::ScalarFresnelMap "ScalarFresnelMap::ScalarFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy, bool useCache) +%feature("docstring") ScalarFresnelMap::ScalarFresnelMap "ScalarFresnelMap::ScalarFresnelMap(const SliceStack &stack, std::unique_ptr< ISpecularStrategy > &&strategy) "; %feature("docstring") ScalarFresnelMap::~ScalarFresnelMap "ScalarFresnelMap::~ScalarFresnelMap() override -- GitLab