15 #ifndef BORNAGAIN_CORE_MATERIAL_BASEMATERIALIMPL_H 
   16 #define BORNAGAIN_CORE_MATERIAL_BASEMATERIALIMPL_H 
   25 enum class MATERIAL_TYPES { InvalidMaterialType = -1, RefractiveMaterial = 0, MaterialBySLD };
 
   55     virtual bool isMagneticMaterial() 
const = 0;
 
   64     virtual MATERIAL_TYPES 
typeID() 
const = 0;
 
   75     virtual void print(std::ostream& ostr) 
const = 0;
 
   78     const std::string& 
getName()
 const { 
return m_name; }
 
   81     const std::string m_name;
 
Defines complex_t, and a few elementary functions.
 
Include to deal with Eigen alignment centrally.
 
Defines basic vectors in R^3 and C^3.
 
Interface for material implementation classes.
 
BaseMaterialImpl(const std::string &name)
Constructs basic material with name.
 
virtual complex_t refractiveIndex(double wavelength) const =0
Returns refractive index.
 
const std::string & getName() const
Returns name of the material.
 
virtual complex_t materialData() const =0
Returns underlying material data.
 
virtual BaseMaterialImpl * clone() const =0
Returns pointer to a copy of material.
 
virtual kvector_t magnetization() const =0
Returns the magnetization (in A/m)
 
virtual BaseMaterialImpl * inverted() const =0
Constructs a material with inverted magnetization.
 
virtual bool isScalarMaterial() const =0
Indicates whether the interaction with the material is scalar.
 
virtual complex_t scalarSubtrSLD(const WavevectorInfo &wavevectors) const =0
Returns (  - sld), sld being the scattering length density.
 
virtual complex_t refractiveIndex2(double wavelength) const =0
Returns squared refractive index.
 
virtual MATERIAL_TYPES typeID() const =0
Returns type of material implementation.
 
virtual Eigen::Matrix2cd polarizedSubtrSLD(const WavevectorInfo &wavevectors) const =0
Returns (  - sld) matrix with magnetization corrections.
 
virtual void print(std::ostream &ostr) const =0
Prints object data.
 
Holds all wavevector information relevant for calculating form factors.