Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Namespaces
christoffel_dual.cpp File Reference

Christoffel symbols via dual-number automatic differentiation. More...

#include "srfm/tensor.hpp"
#include "srfm/constants.hpp"

Go to the source code of this file.

Namespaces

namespace  srfm
 
namespace  srfm::tensor
 

Detailed Description

Christoffel symbols via dual-number automatic differentiation.

Replaces the O(h²) central finite-difference approximation in christoffel.cpp with exact forward-mode autodiff using DualNumber.

Method

For each coordinate direction σ ∈ {0,1,2,3}:

  1. Seed the input point: xd[k] = {x(k), k==σ ? 1.0 : 0.0}
  2. Evaluate the dual-number metric function at xd.
  3. The .deriv component of each matrix entry is ∂g_μν/∂x^σ — exactly, with no finite-difference truncation error.

The assembled Christoffel symbols then use these exact derivatives: Γ^λ_μν = ½ g^λσ (∂_μ g_{νσ} + ∂_ν g_{μσ} − ∂_σ g_{μν})

Comparison with ChristoffelSymbols (finite differences)

Definition in file christoffel_dual.cpp.