Module coordinates

Module coordinates 

Source
Expand description

Coordinate and vector-component transformations in orthonormal local frames.

Upstream: treams.special.car2cyl, car2sph, cyl2car, cyl2sph, sph2car, sph2cyl, car2pol, pol2car (point) and their v-prefixed vector twins such as vcar2sph (vector), from _coord.pyx. Spherical coordinates are (r, theta, phi) with the polar angle theta, cylindrical ones (rho, phi, z), as in treams.

Enumsยง

Transform
Coordinate conversion; vector positions are expressed in the input system.

Functionsยง

apply ๐Ÿ”’
The product of a real 3 x 3 matrix and a complex vector.
cartesian_from_cylindrical ๐Ÿ”’
Cartesian (x, y, z) of cylindrical (rho, phi, z).
cylindrical_from_cartesian ๐Ÿ”’
Cylindrical (rho, phi, z) of Cartesian (x, y, z).
cylindrical_from_spherical ๐Ÿ”’
Cylindrical (rho, phi, z) of spherical (r, theta, phi).
frame ๐Ÿ”’
Rotation of vector components into the output frame of transform, and its derivatives with respect to the (at most two) angles it depends on. Inverse transforms use the transposed matrices. Polar vectors use the first two rows/columns; no radial metric factors occur.
point
Transform a point. Polar conversions ignore and return zero in the third slot.
point_pullback
The gradient with respect to the input coordinates of point, given the gradient cotangent with respect to its output.
point_pushforward
The directional derivative of point along the input tangent.
radius ๐Ÿ”’
sqrt(a^2 + b^2): a fused multiply-add where the squares stay normal, hypot elsewhere.
spherical_from_cylindrical ๐Ÿ”’
Spherical (r, theta, phi) of cylindrical (rho, phi, z).
transpose ๐Ÿ”’
The transpose of a 3 x 3 matrix.
validate ๐Ÿ”’
Checks that every component is finite.
vector
Transform vector components at a point in the source coordinate system.
vector_pullback
The gradients with respect to the vector components and the position of vector, given the gradient cotangent with respect to its output components.
vector_pushforward
The directional derivative of vector along its components and position.