pyoculus.toybox.cylindrical_toybox.rot
- pyoculus.toybox.cylindrical_toybox.rot(f, from_holonomous=True)
Decorator that calculate the curl in cylindrical coordinates, useful to get the \(B\) field from a vector potential \(A\) using the relation \(B = \nabla \times A\).
- Parameters:
f (function) – Function that returns the vector potential \(A\) field. The function must take the position vector \(\textbf{r}\) as first argument.
from_holonomous (bool) – If True, the input of the function is in holonomous coordinates \(\{\partial_r, \partial_\phi, \partial_z\}\). If False, the input is in non-holonomous coordinates \(\{\textbf{e}_r, \textbf{e}_\phi, \textbf{e}_z\}\).
- Returns:
Function that returns the \(B\) field.
- Return type:
function