Amari Calculus
Geometric calculus - a unified framework for differential and integral calculus using geometric algebra.
Overview
This crate provides geometric calculus operations that unify:
- Vector calculus (gradient, divergence, curl)
- Differential forms
- Tensor calculus
- Covariant derivatives on manifolds
Mathematical Foundation
Geometric calculus is built on the vector derivative operator:
∇ = e^i ∂_i (sum over basis vectors)
This operator combines:
- Dot product → divergence (∇·F)
- Wedge product → curl (∇∧F)
- Full geometric product → complete derivative (∇F = ∇·F + ∇∧F)
Key Features
- Vector Derivative Operator: The fundamental ∇ operator
- Classical Operators: Gradient, divergence, curl, Laplacian
- Manifold Calculus: Covariant derivatives, connections, geodesics
- Lie Derivatives: Derivatives along vector fields
- Integration: Integration on manifolds using amari-measure
- Fundamental Theorem: ∫V (∇F) dV = ∮∂V F dS
Examples
Gradient of a scalar field
use ;
use Multivector;
// Define scalar field f(x, y) = x² + y²
let f = new;
// Create vector derivative operator
let nabla = new;
// Compute gradient at point (1, 2)
let grad_f = nabla.gradient;
// Gradient should be approximately (2, 4, 0)
Divergence of a vector field
use ;
// Define vector field F(x, y, z) = (x, y, z)
let f = new;
let nabla = new;
// Compute divergence (should be 3)
let div_f = nabla.divergence;
Curl of a vector field
use ;
// Define vector field F(x, y, z) = (-y, x, 0) (rotation around z-axis)
let f = new;
let nabla = new;
// Compute curl (should be (0, 0, 2) bivector representing rotation)
let curl_f = nabla.curl;