Skip to content
Snippets Groups Projects
Commit 1b9e25b8 authored by Yurov, Dmitry's avatar Yurov, Dmitry
Browse files

Add wavelength parameter to refractiveIndex functions

Redmine: #1858
parent f80e0948
No related branches found
No related tags found
No related merge requests found
......@@ -72,12 +72,12 @@ HomogeneousMaterial HomogeneousMaterial::inverted() const
return result;
}
complex_t HomogeneousMaterial::refractiveIndex() const
complex_t HomogeneousMaterial::refractiveIndex(double) const
{
return m_refractive_index;
}
complex_t HomogeneousMaterial::refractiveIndex2() const
complex_t HomogeneousMaterial::refractiveIndex2(double) const
{
return m_refractive_index*m_refractive_index;
}
......@@ -96,8 +96,7 @@ complex_t HomogeneousMaterial::scalarSubtrSLD(const WavevectorInfo& wavevectors)
{
double wavelength = wavevectors.getWavelength();
double prefactor = M_PI/wavelength/wavelength;
complex_t refractive_index = refractiveIndex();
return prefactor * refractive_index * refractive_index;
return prefactor * refractiveIndex2(wavelength);
}
Eigen::Matrix2cd HomogeneousMaterial::polarizedSubtrSLD(const WavevectorInfo& wavevectors) const
......
......@@ -47,8 +47,8 @@ public:
//! Constructs a material with inverted magnetization
HomogeneousMaterial inverted() const;
complex_t refractiveIndex() const;
complex_t refractiveIndex2() const;
complex_t refractiveIndex(double wavelength) const;
complex_t refractiveIndex2(double wavelength) const;
//! Indicates whether the interaction with the material is scalar.
//! This means that different polarization states will be diffracted equally
......
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