Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Public Member Functions | List of all members
srfm::tensor::CachedChristoffelSymbols Class Reference

#include <tensor.hpp>

Public Member Functions

 CachedChristoffelSymbols (const MetricTensor &metric, double h=constants::DEFAULT_FD_STEP, double cache_tol=1e-8)
 Construct from a metric tensor with an optional cache tolerance.
 
ChristoffelArray compute (const SpacetimePoint &x) const
 Compute (or return cached) Christoffel symbols at point x.
 
FourVelocity contract (const ChristoffelArray &gamma, const FourVelocity &u) const
 Contract cached symbols with a four-velocity.
 
void invalidate () const noexcept
 Invalidate the cache (e.g. after a metric parameter change).
 

Detailed Description

Thread-local cache wrapper around ChristoffelSymbols.

Caches the most recently computed ChristoffelArray so that repeated calls from the RK4 geodesic solver at the same (or very nearby) spacetime point do not re-evaluate all 64 finite-difference metric derivatives.

Cache invalidation: the cached result is reused when the requested point is within cache_tol (default 1e-8) of the cached point in L∞ norm.

Thread safety: NOT thread-safe (one instance per thread / per GeodesicSolver).

Definition at line 403 of file tensor.hpp.

Constructor & Destructor Documentation

◆ CachedChristoffelSymbols()

srfm::tensor::CachedChristoffelSymbols::CachedChristoffelSymbols ( const MetricTensor &  metric,
double  h = constants::DEFAULT_FD_STEP,
double  cache_tol = 1e-8 
)
inlineexplicit

Construct from a metric tensor with an optional cache tolerance.

Definition at line 406 of file tensor.hpp.

Member Function Documentation

◆ compute()

ChristoffelArray srfm::tensor::CachedChristoffelSymbols::compute ( const SpacetimePoint &  x) const
inline

Compute (or return cached) Christoffel symbols at point x.

Definition at line 412 of file tensor.hpp.

◆ contract()

FourVelocity srfm::tensor::CachedChristoffelSymbols::contract ( const ChristoffelArray &  gamma,
const FourVelocity &  u 
) const
inline

Contract cached symbols with a four-velocity.

Definition at line 423 of file tensor.hpp.

◆ invalidate()

void srfm::tensor::CachedChristoffelSymbols::invalidate ( ) const
inlinenoexcept

Invalidate the cache (e.g. after a metric parameter change).

Definition at line 429 of file tensor.hpp.


The documentation for this class was generated from the following file: