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

Add isDefaultMaterial() method to Material class

Redmine: #1871
parent 286dd10b
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,11 @@ complex_t Material::materialData() const
return m_material_impl->materialData();
}
bool Material::isDefaultMaterial() const
{
return materialData() == complex_t() && isScalarMaterial();
}
complex_t Material::scalarSubtrSLD(const WavevectorInfo& wavevectors) const
{
return m_material_impl->scalarSubtrSLD(wavevectors);
......
......@@ -81,6 +81,10 @@ public:
//! Returns true if material underlying data is nullptr
bool isEmpty() const {return !m_material_impl;}
//! Returns true if material has refractive index of (1.0, 0.0)
//! and zero magnetization.
bool isDefaultMaterial() const;
//! Returns (\f$ \pi/\lambda^2 \f$ - sld), sld (in \f$nm^{-2}\f$) being the scattering length density
complex_t scalarSubtrSLD(const WavevectorInfo& wavevectors) const;
......
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