Skip to content

Coordinate systems (numerical)

The same operators with derivatives by automatic differentiation. Usage: Numerical coordinate systems.

The accessors listed under Coordinate systemsLame, Christoffel, normalized_basis, natural_basis, unitvec, natvec — all take an extra point argument here.

TensND.CoorSystemNum Type
julia
CoorSystemNum{dim,T<:Real} <: AbstractCoorSystem{dim,T}

Numerical coordinate system for automatic-differentiation-based differential operators.

Stores three point-wise functions:

  • χ_func(x) : Lamé coefficients at point x

  • R_func(x) : rotation matrix (columns = unit vectors of the normalized basis) at x

  • Γ_func(x) : Christoffel symbols at xArray{T,3} with Γ[i,j,k] = Γᵏᵢⱼ

All three functions accept an AbstractVector of coordinates and are called at each evaluation point. Predefined constructors are available:

julia
coorsys_cartesian_num(T=Float64)
coorsys_polar_num(T=Float64)
coorsys_cylindrical_num(T=Float64)
coorsys_spherical_num(T=Float64)

A generic constructor from an OM::Function (position vector) is also provided:

julia
CoorSystemNum(OM::Function, dim::Integer, T::Type=Float64)

Unlike CoorSystemSym, the normalized basis, natural basis vectors, Lamé coefficients, and Christoffel symbols all depend on the evaluation point x₀ and are accessed via point-wise accessors normalized_basis(CS, x₀), natural_basis(CS, x₀), etc.

TensND.coorsys_cartesian_num Function
julia
coorsys_cartesian_num(T=Float64)

Numerical Cartesian coordinate system in 3D. Coordinates: (x, y, z).

TensND.coorsys_polar_num Function
julia
coorsys_polar_num(T=Float64)

Numerical polar coordinate system. Coordinates: (r, θ). Lamé coefficients: (1, r).

TensND.coorsys_cylindrical_num Function
julia
coorsys_cylindrical_num(T=Float64)

Numerical cylindrical coordinate system. Coordinates: (r, θ, z). Lamé coefficients: (1, r, 1).

TensND.coorsys_spherical_num Function
julia
coorsys_spherical_num(T=Float64)

Numerical spherical coordinate system. Coordinates: (θ, ϕ, r) — same convention as coorsys_spherical(). Lamé coefficients: (r, r·sin(θ), 1).