Coordinate systems (numerical)
The same operators with derivatives by automatic differentiation. Usage: Numerical coordinate systems.
The accessors listed under Coordinate systems — Lame, Christoffel, normalized_basis, natural_basis, unitvec, natvec — all take an extra point argument here.
TensND.CoorSystemNum Type
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 pointxR_func(x): rotation matrix (columns = unit vectors of the normalized basis) atxΓ_func(x): Christoffel symbols atx→Array{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:
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:
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
coorsys_cartesian_num(T=Float64)Numerical Cartesian coordinate system in 3D. Coordinates: (x, y, z).
TensND.coorsys_polar_num Function
coorsys_polar_num(T=Float64)Numerical polar coordinate system. Coordinates: (r, θ). Lamé coefficients: (1, r).
TensND.coorsys_cylindrical_num Function
coorsys_cylindrical_num(T=Float64)Numerical cylindrical coordinate system. Coordinates: (r, θ, z). Lamé coefficients: (1, r, 1).
TensND.coorsys_spherical_num Function
coorsys_spherical_num(T=Float64)Numerical spherical coordinate system. Coordinates: (θ, ϕ, r) — same convention as coorsys_spherical(). Lamé coefficients: (r, r·sin(θ), 1).