15 #ifndef BORNAGAIN_CORE_MULTILAYER_MATRIXFRESNELMAP_H
16 #define BORNAGAIN_CORE_MULTILAYER_MATRIXFRESNELMAP_H
23 #include <unordered_map>
43 std::unique_ptr<const ILayerRTCoefficients>
45 size_t layer_index)
const final override;
57 using CoefficientHash = std::unordered_map<kvector_t, ISpecularStrategy::coeffs_t, HashKVector>;
60 size_t layer_index)
const override;
63 const std::vector<Slice>&
slices,
70 const std::vector<Slice>&
slices,
Defines class IFresnelMap.
Defines class MatrixRTCoefficients.
Defines class SpecularMagneticStrategy.
Holds the necessary information to calculate the radiation wavefunction in every layer for different ...
const std::vector< Slice > & slices() const
Interface to access reflection/transmission coefficients.
std::vector< std::unique_ptr< const ILayerRTCoefficients > > coeffs_t
Provides a hash function for a 3-vector of doubles, for use in MatrixFresnelMap.
size_t operator()(const kvector_t &kvec) const noexcept
Returns hash value of a 3-vector, computed by exclusive-or of the component hash values.
Implementation of IFresnelMap for matrix valued reflection/transmission coefficients.
std::vector< Slice > m_inverted_slices
CoefficientHash m_hash_table_in
std::unordered_map< kvector_t, ISpecularStrategy::coeffs_t, HashKVector > CoefficientHash
std::unique_ptr< const ILayerRTCoefficients > getCoefficients(const kvector_t &kvec, size_t layer_index) const override
void setSlices(const std::vector< Slice > &slices) final override
MatrixFresnelMap & operator=(const MatrixFresnelMap &other)=delete
const ISpecularStrategy::coeffs_t & getCoefficientsFromCache(kvector_t kvec, const std::vector< Slice > &slices, CoefficientHash &hash_table) const
MatrixFresnelMap(const MatrixFresnelMap &other)=delete
std::unique_ptr< const ILayerRTCoefficients > getOutCoefficients(const SimulationElement &sim_element, size_t layer_index) const final override
Retrieves the amplitude coefficients for a (time-reversed) outgoing wavevector.
MatrixFresnelMap(std::unique_ptr< ISpecularStrategy > strategy)
CoefficientHash m_hash_table_out
~MatrixFresnelMap() override
Data stucture containing both input and output of a single detector cell.
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.