Skip to content
Projects

Field maps

The equations of beamtracer.field_map, declared on the code that implements them and checked by the tests.

FieldMap

classsource

A gridded external field in the shared field-map layout, interpolated to positions.

multilinear
F(x)=∑c∈{0,1}dFi+c∏k=1d(ckwk+(1−ck)(1−wk)),wk=xk−xk,ikxk,ik+1−xk,ikF(\mathbf x) = \sum_{\mathbf c \in \{0, 1\}^d} F_{\mathbf i + \mathbf c} \prod_{k=1}^{d} \left(c_k w_k + (1 - c_k)(1 - w_k)\right), \qquad w_k = \frac{x_k - x_{k, i_k}}{x_{k, i_k + 1} - x_{k, i_k}}
outside
F(x)=F(clip⁡(x)) (clip),0 (zero)F(\mathbf x) = F(\operatorname{clip}(\mathbf x)) \ \text{(clip)}, \quad 0 \ \text{(zero)}
Order
2
Assumes
  • each component on the nodes of a tensor-product mesh of d≤3d \le 3 increasing (not necessarily uniform) coordinates
  • a map with fewer dims than the positions is uniform along the missing axes
  • the order is in the node spacing, for a smooth field