31 if (base.
mag2() == 0.0)
34 return vector.
complex() - projection;
std::complex< double > complex_t
constexpr double magnetization_prefactor
Defines magnetic material base implementation.
Declares functions in namespace MaterialUtils.
Defines the values of physical constants (SI)
Interface for material implementation classes.
const std::string & getName() const
Returns name of the material.
virtual complex_t scalarSubtrSLD(const WavevectorInfo &wavevectors) const =0
Returns ( - sld), sld being the scattering length density.
double mag2() const
Returns magnitude squared of the vector.
auto dot(const BasicVector3D< U > &v) const
Returns dot product of vectors (antilinear in the first [=self] argument).
BasicVector3D< complex_t > complex() const
Returns this, trivially converted to complex type.
Basic implementation for magnetized material.
void setMagnetization(kvector_t magnetization)
MagneticMaterialImpl * clone() const override=0
Returns pointer to a copy of material.
kvector_t magnetization() const final
Returns the magnetization (in A/m)
MagneticMaterialImpl(const std::string &name, kvector_t magnetization)
Constructs basic material with name and magnetization.
bool isScalarMaterial() const final
Indicates whether the interaction with the material is scalar.
bool isMagneticMaterial() const final
Eigen::Matrix2cd polarizedSubtrSLD(const WavevectorInfo &wavevectors) const final
Returns ( - sld) matrix with magnetization corrections.
MagneticMaterialImpl * inverted() const final
Constructs a material with inverted magnetization.
MagneticMaterialImpl * rotatedMaterial(const Transform3D &transform) const final
kvector_t m_magnetization
magnetization
Holds all wavevector information relevant for calculating form factors.
Eigen::Matrix2cd MagnetizationCorrection(complex_t unit_factor, double magnetic_factor, BasicVector3D< T > polarization)
constexpr double mu_B
Bohr magneton ( ), J/T.
constexpr double r_e
Thomson scattering length ( ), m.
constexpr double gamma_n
factor for neutron magnetic moment,
QString const & name(EShape k)