Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Constants§

MAX_DIM
Maximum dimension supported for general metric tensor operations.

Functions§

add3
Add two 3-vectors.
christoffel_symbols_numerical
Numerically approximate Christoffel symbols Γ^k_ij for a surface defined by a mapping r(u, v) via finite differences.
covariant_derivative_covector
Covariant derivative of a covector (1-form) field.
covariant_derivative_vector
Covariant derivative of a vector field.
cross3
Cross product of two 3-vectors.
dot3
Dot product of two 3-vectors.
einstein_tensor
Einstein tensor G_{mu nu} = R_{mu nu} - 0.5 g_{mu nu} R.
gauss_bonnet_2d_integrand
Compute the Gauss-Bonnet integrand in N=2 dimensions.
gauss_bonnet_integral
Numerically integrate Gaussian curvature over a patch of a surface.
geodesic_curve
Compute a geodesic curve on a surface given initial conditions.
geodesic_deviation
Geodesic deviation equation (Jacobi equation).
geodesic_equation_solve
Solve the geodesic equation in N dimensions.
geodesic_step
Integrate a geodesic on a surface by one step (Euler).
killing_equation_violation
Check if a vector field is a Killing vector field.
kretschner_scalar
Kretschner scalar K = R_{abcd} R^{abcd} (fully contracted Riemann tensor).
lie_bracket_mat3
Lie bracket [A, B] = AB - BA for 3×3 matrices (elements of gl(3)).
mat3_add
Add two 3×3 matrices.
mat3_det
3×3 determinant.
mat3_exp
Compute matrix exponential of a 3×3 matrix via Cayley-Hamilton theorem.
mat3_frobenius_norm
Frobenius norm of a 3×3 matrix.
mat3_identity
3×3 identity matrix.
mat3_mul
Matrix–matrix multiply: A·B.
mat3_mul_vec3
Matrix–vector multiply: M·v.
mat3_scale
Scale a 3×3 matrix by scalar.
mat3_trace
Matrix trace.
mat3_transpose
Matrix transpose.
mat3_zero
3×3 zero matrix.
norm3
Norm of a 3-vector.
normalize3
Normalize a 3-vector (returns zero vector if near zero).
parallel_transport
Parallel transport along a sequence of angular velocities.
parallel_transport_nd
Parallel transport a vector along a curve in N dimensions.
parallel_transport_step
Parallel transport of a vector along a curve on SO(3).
ricci_scalar
Ricci scalar R = g^{mu nu} R_{mu nu}.
ricci_scalar_from_metric_fn
Compute the Ricci scalar directly from a metric function at a point.
scale3
Scale a 3-vector.
skew3
Skew-symmetric (hat) operator: converts a 3-vector ω to [ω]×.
so3_adjoint
Adjoint action of SO(3) on so(3): Ad_R(ω) = R ω.
so3_coadjoint
Coadjoint action of SO(3) on so(3): Ad_R(μ) = R⁻ᵀ μ = R μ.
so3_exp_map
Riemannian exponential map on SO(3) at base point R₀.
so3_geodesic
Geodesic on SO(3) between two rotations, sampled at parameter t ∈ [0,1].
so3_lie_bracket
Lie bracket for so(3) elements (skew-symmetric matrices): [ω̂₁, ω̂₂] = ω̂₁×ω̂₂ hat.
so3_log_map
Riemannian logarithm map on SO(3): log_{R₀}(R₁).
so3_log_matrix
Compute matrix logarithm of a rotation matrix (SO(3)) via Rodrigues formula.
so3_small_adjoint
Small adjoint (ad): ad_ω₁(ω₂) = ω₁ × ω₂.
sub3
Subtract two 3-vectors.
vee3
Vee (inverse hat) operator: extracts 3-vector from skew-symmetric matrix.
wedge
Wedge product of two 1-forms: α ∧ β.
weyl_tensor
Weyl tensor C^rho_{sigma mu nu} for dim >= 3.

Type Aliases§

Mat3
A 3×3 matrix stored row-major.
Mat4
A 4×4 matrix stored row-major.
Quat
A unit quaternion [w, x, y, z].
Vec3
A 3-vector.