Submanifolds
Hypersurfaces embedded in Rᵈ. Theory: Submanifolds; usage: Submanifolds.
TensND.SubManifoldSym Type
SubManifoldSym(OM::AbstractTens{1,dim,Sym}, coords::NTuple{dim-1,Sym},
tmp_coords::NTuple = (), params::NTuple = ();
rules::Dict = Dict(), tmp_var::Dict = Dict(), to_coords::Dict = Dict())Hypersurface of dimension dim-1 embedded in Rᵈⁱᵐ, parametrized by the position vector OM of the dim-1 surface coordinates coords.
Unlike CoorSystemSym, which describes a chart of the whole space, a SubManifoldSym describes an embedded surface: it carries one coordinate fewer than the ambient dimension, and it completes the tangent frame with the unit normal, so that the stored bases are still dim-dimensional.
Construction
Surface indices run from 1 to dim-1 and are written α, β, γ; ambient indices run to dim and are written i, j, k.
The dim-1 tangent vectors are the derivatives of the position vector,
𝐚_α = ∂_α OM , χ_α = ‖𝐚_α‖ , 𝐞_α = 𝐚_α / χ_α (α = 1 … dim-1)and the frame is closed by the unit normal 𝐧, obtained as the generalized cross product of the tangent vectors. 𝐧 is stored last, with Lamé coefficient χ_dim = 1; normal(SM) returns it.
Fundamental forms
Two order-2 tensors describe the surface, both stored with a vanishing last row and column so that they live in the tangent block:
the first fundamental form
𝐚(induced metric), returned bysubmetric—a_αβ = 𝐚_α ⋅ 𝐚_β;the second fundamental form
𝐛(curvature tensor), returned bycurvature—b_αβ = 𝐧 ⋅ ∂_α 𝐚_β.
The stored array Γ holds the Gauss–Weingarten equations of the embedded frame rather than a plain Christoffel array: Γ[:,:,dim] is 𝐛 (Gauss formula, the normal component of ∂_α 𝐚_β) and Γ[:,dim,:] is -𝐛 with one index raised (Weingarten formula, the tangential derivative of 𝐧). Its purely tangential block — the intrinsic connection coefficients Γᵞ_αβ of the induced metric — is what connection returns.
The optional tmp_coords, params, rules, tmp_var and to_coords arguments have exactly the meaning they have for CoorSystemSym: they drive the symbolic simplification of intermediate expressions.
Examples
julia> θ, ϕ = symbols("θ ϕ", real = true) ; R = symbols("R", positive = true) ;
julia> OM = Tens(R * [sin(θ)cos(ϕ), sin(θ)sin(ϕ), cos(θ)]) ;
julia> Sphere = SubManifoldSym(OM, (θ, ϕ), (), (R,)) ;
julia> normal(Sphere) # outward unit normal 𝐞ʳ
julia> curvature(Sphere) # 𝐛 = -𝐚/R for a sphere of radius RSee also CoorSystemSym, normal, submetric, curvature, connection.
TensND.normal Function
normal(SM::SubManifoldSym{dim}) → AbstractTens{1,dim,Sym}Unit normal 𝐧 of the hypersurface, i.e. the last vector of the natural basis. Its orientation is that of the generalized cross product of the tangent vectors ∂_α OM taken in the order of coords, so reversing two coordinates reverses 𝐧 — and with it the sign of curvature.
Examples
julia> θ, ϕ = symbols("θ ϕ", real = true) ; R = symbols("R", positive = true) ;
julia> Sphere = SubManifoldSym(Tens(R * [sin(θ)cos(ϕ), sin(θ)sin(ϕ), cos(θ)]), (θ, ϕ), (), (R,)) ;
julia> normal(Sphere) # the outward radial vector 𝐞ʳSee also SubManifoldSym, curvature.
TensND.submetric Function
submetric(SM::SubManifoldSym) → AbstractTens{2,dim,Sym}First fundamental form 𝐚 of the hypersurface (the metric induced by the embedding), a_αβ = 𝐚_α ⋅ 𝐚_β, with Greek surface indices running to dim-1.
It is returned as a dim-dimensional order-2 tensor whose last row and column vanish, so that it can be combined directly with curvature and with tensors expressed in the full embedded frame.
For a sphere of radius R parametrized by (θ, ϕ), 𝐚 = diag(R², R² sin²θ, 0).
See also SubManifoldSym, curvature.
TensND.curvature Function
curvature(SM::SubManifoldSym) → AbstractTens{2,dim,Sym}Second fundamental form 𝐛 of the hypersurface, b_αβ = 𝐧 ⋅ ∂_α 𝐚_β, with 𝐧 the unit normal returned by normal.
Like submetric it is stored as a dim-dimensional order-2 tensor with a vanishing last row and column. Its sign follows the orientation of 𝐧: with the outward normal, a sphere of radius R gives 𝐛 = -𝐚/R, hence the principal curvatures -1/R.
The mixed form b_α{}^β is the Weingarten (shape) operator; its trace is the mean curvature and its determinant, restricted to the tangent block, the Gaussian curvature.
See also SubManifoldSym, submetric, normal.
TensND.connection Function
connection(SM::SubManifoldSym{dim}) → Array{Sym,3}Intrinsic connection coefficients of the hypersurface — the Christoffel symbols Γᵞ_αβ of the induced metric — indexed Γ[α,β,γ], the contravariant index last.
Surface indices run from 1 to dim-1 and are written with Greek letters α, β, γ throughout, to distinguish them from ambient indices i, j, k which run to dim. This is the purely tangential block of the Gauss–Weingarten array returned by Christoffel.
For a sphere of radius R parametrized by (θ, φ):
Γᶿ_φφ = −sinθ cosθ , Γᵠ_θφ = Γᵠ_φθ = cotθThese are connection coefficients, not curvature: they are not the components of a tensor, they transform inhomogeneously under a change of chart, and they can be made to vanish at any single point. The intrinsic curvature follows from them by the Gauss equation, or directly from curvature and submetric.
Renamed from Riemann
This function was called Riemann, which named the wrong object entirely — it never returned a Riemann curvature tensor. Riemann still works and forwards here, with a deprecation warning.
See also SubManifoldSym, Christoffel, curvature.