pub fn uniaxial_reflectivity_points_jvp(
q: &[f64],
stack_of: &[usize],
layers: &[Vec<Layer>],
tensor: &[Vec<Matrix3<Complex<f64>>>],
energies_ev: &[f64],
tangents: &PointsTangents,
parallel: bool,
) -> Result<PointsJvpOutput>Expand description
Reflectance and directional derivatives for independent (q, stack) points.
Evaluates the decoupled uniaxial-z recursion (equal to the 4x4 kernel in
this scope) with forward-mode derivatives, see
crate::kernel::solve_point_recursive_jvp. Direction k moves q by
tangents.dq[k] and the stack inputs by tangents.dlayers[k] /
tangents.dtensor[k]; tangents enter through the same linear packing as
the values, so any parameterization whose host-side Jacobian is known
(analytically or by finite differences of the f64 materialization)
maps onto exact kernel derivatives.
§Parameters
q,stack_of,layers,tensor,energies_ev: as inuniaxial_reflectivity_points.tangents: per-direction tangents with matching shapes.parallel: distribute(direction, point)pairs across rayon.
§Errors
Shape and energy errors as for uniaxial_reflectivity_points, plus
[RefloxideError::InvalidShape] for tangent shape mismatches.