22 , christoffel_(metric, christoffel_h)
23 , step_size_(step_size) {}
34 auto gamma = christoffel_.
compute(x);
41 const double h = step_size_;
43 GeodesicState k1 = derivative(state);
44 GeodesicState k2 = derivative(state + (h / 2.0) * k1);
45 GeodesicState k3 = derivative(state + (h / 2.0) * k2);
46 GeodesicState k4 = derivative(state + h * k3);
49 return state + (h / 6.0) * (k1 + 2.0 * k2 + 2.0 * k3 + k4);
59 std::vector<GeodesicState> trajectory;
60 trajectory.reserve(
static_cast<size_t>(steps) + 1);
63 trajectory.push_back(current);
65 for (
int i = 0; i < steps; ++i) {
66 current = rk4_step(current);
67 trajectory.push_back(current);
FourVelocity contract(const ChristoffelArray &gamma, const FourVelocity &u) const
ChristoffelArray compute(const SpacetimePoint &x) const
double norm_squared(const SpacetimePoint &x, const FourVelocity &u) const
std::vector< GeodesicState > integrate(const SpacetimePoint &x0, const FourVelocity &u0, int steps) const
GeodesicSolver(const MetricTensor &metric, double step_size=constants::DEFAULT_GEODESIC_STEP, double christoffel_h=constants::DEFAULT_FD_STEP)
double spacetime_interval(const SpacetimePoint &x, const FourVelocity &dx) const
Physical and financial constants for the SRFM system.
Eigen::Vector< double, SPACETIME_DIM > FourVelocity
A tangent vector at a spacetime point (four-velocity: dx^μ/dτ).
Eigen::Vector< double, SPACETIME_DIM > SpacetimePoint
Position and 4-velocity state on the manifold.
SpacetimePoint position
x^μ: position in financial spacetime
Tensor Calculus & Covariance Engine — AGT-04 public API.