41 * (Pauli_X * polarization.x() + Pauli_Y * polarization.y()
42 + Pauli_Z * polarization.z());
48 double magnetic_factor, R3 polarization);
50 double magnetic_factor, C3 polarization);
54 return n * n - n_ref * n_ref * R3Util::sin2Theta(k);
67 bool isDefault =
true;
68 for (
const Material* mat : materials) {
70 result = mat->typeID();
71 isDefault = mat->isDefaultMaterial();
74 if (mat->typeID() != result && !mat->isDefaultMaterial())
constexpr double magnetic_prefactor
Declares functions in namespace MaterialUtils.
Defines the values of physical constants (SI)
Defines class SpinMatrix.
A wrapper for underlying material implementation.
MATERIAL_TYPES checkMaterialTypes(const std::vector< const Material * > &materials)
Checks if all non-default materials in materials are of the same type and returns this type....
SpinMatrix PolarizedReducedPotential(complex_t n, R3 b_field, R3 k, double n_ref)
Function for calculating the reduced potential, used for obtaining the Fresnel coefficients (polarize...
complex_t ScalarReducedPotential(complex_t n, R3 k, double n_ref)
Function for calculating the reduced potential, used for obtaining the Fresnel coefficients (non-pola...
SpinMatrix MagnetizationCorrection(complex_t unit_factor, double magnetic_factor, Vec3< T > polarization)
constexpr double g_factor_n
neutron g-factor
constexpr double h_bar
Reduced Plank constant, J s.
constexpr double m_n
Neutron mass, kg.
constexpr double mu_N
Nuclear magneton ( ), J/T.