16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_SAMPLE_SPECULAR_SPECULARSCALARSTRATEGY_H
21 #define BORNAGAIN_SAMPLE_SPECULAR_SPECULARSCALARSTRATEGY_H
44 using coeffs_t = std::vector<coefficient_pointer_type>;
52 const std::vector<complex_t>& kz)
const override;
56 virtual std::variant<complex_t, Eigen::Matrix2cd>
58 const std::vector<complex_t>& kz)
const override;
62 double sigma)
const = 0;
64 std::vector<ScalarRTCoefficients>
computeTR(
const std::vector<Slice>& slices,
65 const std::vector<complex_t>& kz)
const;
67 static void setZeroBelow(std::vector<ScalarRTCoefficients>& coeff,
size_t current_layer);
70 const std::vector<Slice>& slices,
71 const std::vector<complex_t>& kz)
const;
std::complex< double > complex_t
Defines and implements class ISpecularStrategy.
Defines class ScalarRTCoefficients.
Interface for the Fresnel computations, both in the scalar and magnetic case.
std::vector< std::unique_ptr< const ILayerRTCoefficients > > coeffs_t
Specular reflection and transmission coefficients in a layer in case of scalar interactions between t...
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Implements the scalar Fresnel computation.
virtual ISpecularStrategy::coeffs_t Execute(const std::vector< Slice > &slices, const kvector_t &k) const override
Computes refraction angles and transmission/reflection coefficients for given coherent wave propagati...
std::vector< ScalarRTCoefficients > computeTR(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const
std::unique_ptr< const coefficient_type > coefficient_pointer_type
virtual std::pair< complex_t, complex_t > transition(complex_t kzi, complex_t kzi1, double sigma) const =0
virtual std::variant< complex_t, Eigen::Matrix2cd > computeTopLayerR(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const override
Computes the Fresnel R coefficient for the top layer only Introduced in order to speed up pure reflec...
void calculateUpFromLayer(std::vector< ScalarRTCoefficients > &coeff, const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const
static void setZeroBelow(std::vector< ScalarRTCoefficients > &coeff, size_t current_layer)