15 #ifndef BORNAGAIN_CORE_MATERIAL_MATERIAL_H
16 #define BORNAGAIN_CORE_MATERIAL_MATERIAL_H
33 Material(std::unique_ptr<BaseMaterialImpl> material_impl);
59 bool isMagneticMaterial()
const;
66 MATERIAL_TYPES
typeID()
const;
77 bool isEmpty()
const {
return !m_material_impl; }
94 friend std::ostream& operator<<(std::ostream& ostr,
const Material& mat);
97 std::unique_ptr<BaseMaterialImpl> m_material_impl;
Defines basic material implementation interface.
bool operator!=(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for inequality.
bool operator==(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for equality.
A wrapper for underlying material implementation.
kvector_t magnetization() const
Get the magnetization (in A/m)
Material inverted() const
Constructs a material with inverted magnetization.
Eigen::Matrix2cd polarizedSubtrSLD(const WavevectorInfo &wavevectors) const
Returns ( - sld) matrix with magnetization corrections.
complex_t refractiveIndex(double wavelength) const
Returns refractive index.
complex_t scalarSubtrSLD(const WavevectorInfo &wavevectors) const
Returns ( - sld), sld (in ) being the scattering length density.
bool isScalarMaterial() const
Indicates whether the interaction with the material is scalar.
complex_t refractiveIndex2(double wavelength) const
Returns squared refractive index.
std::string getName() const
Returns the name of material.
MATERIAL_TYPES typeID() const
Returns the type of underlying material implementation.
bool isDefaultMaterial() const
Returns true if material has refractive index of (1.0, 0.0) and zero magnetization.
bool isEmpty() const
Returns true if material underlying data is nullptr.
complex_t materialData() const
Returns underlying material data.
Material(std::unique_ptr< BaseMaterialImpl > material_impl)
Creates material with particular material implementation.
Holds all wavevector information relevant for calculating form factors.