Skip to content
Snippets Groups Projects

Before starting scattering simulation check that refractive index has reasonable magnitude (#715)

Merged Wuttke, Joachim requested to merge j.715a into main
Files
5
@@ -81,10 +81,10 @@ void Material::checkRefractiveIndex(double wavelength) const
{
const complex_t n = refractiveIndex(wavelength);
if (n.real() < 0.9 || n.real() > 1.1) {
std::stringstream msg;
msg << "Refractive index " << n << " at wavelength " << wavelength
<< " is too far from 1. Invalid material data?";
throw std::runtime_error(msg.str());
std::stringstream msg;
msg << "Refractive index " << n << " at wavelength " << wavelength
<< " is too far from 1. Invalid material data?";
throw std::runtime_error(msg.str());
}
}
Loading