Jean-François Barthélémy
  • Home
  • Software
  • Teaching
  • Publications
  • Postprints

On this page

  • Key features
  • Installation
  • Links

TensND.jl

Julia
Tensors
Linear Algebra

Julia package for symbolic and numerical tensor calculations of any order and dimension in arbitrary coordinate systems, with structured tensor types carrying built-in symmetries.

TensND.jl performs tensor calculations of any order and dimension in arbitrary coordinate systems (cartesian, polar, cylindrical, spherical, spheroidal or user-defined). It supports both symbolic computation (SymPy.jl, Symbolics.jl) and numerical evaluation with automatic differentiation (ForwardDiff.jl). The implementation is inspired by the Maple library Tens3d by Jean Garrigues. Part of the MicroPoroChemoMechanics ecosystem.

Key features

  • Basis types — canonical, rotated, orthogonal, and fully general (non-orthogonal, symbolic)
  • Tensor algebra — products (⊗, ⊗ˢ, ⊠, ⊠ˢ, ⋅, ⊡, ⊙), change of basis, variance management
  • Structured tensors — isotropic (TensISO), transversely isotropic (TensTI{4}, TensTI) and orthotropic (TensOrtho), with compact storage and efficient algebra
  • Symmetry projection — closest ISO, TI or ORTHO tensor, with rotation optimised via NLopt.jl
  • Differential operators — gradient, symmetric gradient, divergence, Laplacian and Hessian in curvilinear coordinates, symbolically or numerically
  • Generic type system — Float64, symbolic types (Sym, Num) and ForwardDiff.Dual

Installation

TensND.jl is registered in Julia’s General registry:

using Pkg
Pkg.add("TensND")

Links

Docs Repository DOI