universal-physics-tensor 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -1
- package/dist/bridges/equations/be-37-shapiro-delay.js +7 -9
- package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +13 -2
- package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
- package/dist/bridges/gravitational-lensing.js +17 -6
- package/dist/bridges/gravitational-lensing.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +18 -3
- package/dist/bridges/perihelion-precession.d.ts.map +1 -1
- package/dist/bridges/perihelion-precession.js +22 -8
- package/dist/bridges/perihelion-precession.js.map +1 -1
- package/dist/core/constants.d.ts +50 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +50 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/dimensional/connection-validators.d.ts +60 -2
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js +76 -2
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/curvature.d.ts +361 -0
- package/dist/dimensional/curvature.d.ts.map +1 -0
- package/dist/dimensional/curvature.js +299 -0
- package/dist/dimensional/curvature.js.map +1 -0
- package/dist/dimensional/validator.d.ts +5 -3
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +58 -1
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.d.ts +112 -39
- package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.js +219 -40
- package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +189 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -0
- package/dist/numerical/curvature-lowering-helpers.js +412 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -0
- package/dist/numerical/engine-registry.js +4 -4
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +16 -0
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +20 -0
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +213 -0
- package/dist/numerical/gl4-integrator.d.ts.map +1 -0
- package/dist/numerical/gl4-integrator.js +307 -0
- package/dist/numerical/gl4-integrator.js.map +1 -0
- package/dist/numerical/index.d.ts +8 -0
- package/dist/numerical/index.d.ts.map +1 -1
- package/dist/numerical/index.js +4 -0
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +180 -3
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.js +8 -8
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.d.ts.map +1 -1
- package/dist/numerical/metric-inverse.js +28 -0
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/null-ray-integrator.js +6 -3
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/pderiv.d.ts +27 -3
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +44 -12
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +111 -0
- package/dist/numerical/perihelion-finder.d.ts.map +1 -0
- package/dist/numerical/perihelion-finder.js +288 -0
- package/dist/numerical/perihelion-finder.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gauss-Legendre 4th-order quadrature nodes c₁, c₂ — the two roots of the
|
|
3
|
+
* shifted Legendre polynomial P₂(x) on [0,1].
|
|
4
|
+
*
|
|
5
|
+
* c₁ = ½ − √3/6, c₂ = ½ + √3/6.
|
|
6
|
+
*
|
|
7
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
8
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
9
|
+
*/
|
|
10
|
+
export declare const GL4_C: readonly [number, number];
|
|
11
|
+
/**
|
|
12
|
+
* GL4 Butcher matrix a_{ij} — the 2×2 collocation table for the implicit
|
|
13
|
+
* stages:
|
|
14
|
+
*
|
|
15
|
+
* [ 1/4 1/4 − √3/6 ]
|
|
16
|
+
* [ 1/4 + √3/6 1/4 ]
|
|
17
|
+
*
|
|
18
|
+
* (Hairer/Lubich/Wanner §II.1, Table 1.1.)
|
|
19
|
+
*
|
|
20
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
21
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
22
|
+
*/
|
|
23
|
+
export declare const GL4_A: readonly [readonly [number, number], readonly [number, number]];
|
|
24
|
+
/**
|
|
25
|
+
* GL4 stage weights — the 2-point Gauss-Legendre quadrature weights on
|
|
26
|
+
* [0,1]: b₁ = b₂ = ½.
|
|
27
|
+
*
|
|
28
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
29
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GL4_B: readonly [number, number];
|
|
32
|
+
/**
|
|
33
|
+
* Canonical (x, p) phase-space state for the geodesic flow on T*M.
|
|
34
|
+
*
|
|
35
|
+
* x^μ — coordinate 4-vector
|
|
36
|
+
* p_μ — covariant momentum, p_μ = g_μν dx^ν/dτ
|
|
37
|
+
*
|
|
38
|
+
* Decision #3 (v0.5.0): the canonical state is (x, p), not (x, v). The
|
|
39
|
+
* symplectic 2-form ω = dp_μ ∧ dx^μ is preserved by the GL4 flow only on
|
|
40
|
+
* this representation.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface GL4State {
|
|
45
|
+
/** Coordinate 4-vector x^μ. */
|
|
46
|
+
readonly x: readonly number[];
|
|
47
|
+
/** Covariant momentum p_μ = g_μν v^ν. */
|
|
48
|
+
readonly p: readonly number[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Per-step snapshot recorded by the integrator. `v` (the contravariant
|
|
52
|
+
* 4-velocity v^μ = g^{μν} p_ν) is optional — emitted when the caller asks
|
|
53
|
+
* for it, since it requires an extra metric-inverse contraction.
|
|
54
|
+
*
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
export interface GL4Snapshot {
|
|
58
|
+
readonly tau: number;
|
|
59
|
+
readonly x: readonly number[];
|
|
60
|
+
readonly p: readonly number[];
|
|
61
|
+
readonly v?: readonly number[];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Options for `integrateGeodesicGL4` (lands in Task 3).
|
|
65
|
+
*
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export interface GL4Options {
|
|
69
|
+
/** Number of integration steps (uniform-step baseline; may be subdivided
|
|
70
|
+
* by adaptive step-halving). */
|
|
71
|
+
readonly steps: number;
|
|
72
|
+
/** Final proper time τ_max (initial τ = 0). */
|
|
73
|
+
readonly tauMax: number;
|
|
74
|
+
/** Inverse-metric closure: `gInverseFn(x)[μ][ν] = g^{μν}(x)`. */
|
|
75
|
+
readonly gInverseFn: (x: readonly number[]) => readonly (readonly number[])[];
|
|
76
|
+
/**
|
|
77
|
+
* Partial derivatives of the inverse metric.
|
|
78
|
+
* Index order: `dgInverseFn(x)[lambda][mu][nu] = ∂_lambda g^{mu nu}` at coords x.
|
|
79
|
+
* (I2: axis semantics pinned here to prevent silent transposition bugs.)
|
|
80
|
+
*/
|
|
81
|
+
readonly dgInverseFn: (x: readonly number[]) => readonly (readonly (readonly number[])[])[];
|
|
82
|
+
/** Picard fixed-point tolerance (default chosen in Task 2). */
|
|
83
|
+
readonly picardTol?: number;
|
|
84
|
+
/** Picard fixed-point iteration cap (default chosen in Task 2). */
|
|
85
|
+
readonly picardMaxIter?: number;
|
|
86
|
+
/** Adaptive step-halving floor (I4). If step-halving reaches h_min, throws with diagnostic. */
|
|
87
|
+
readonly hMin?: number;
|
|
88
|
+
/** Minimum radial coordinate (or domain analog) — abort integration if
|
|
89
|
+
* the trajectory crosses inside this radius (e.g., the Schwarzschild
|
|
90
|
+
* event horizon at r = r_s). */
|
|
91
|
+
readonly domainMinRadius?: number;
|
|
92
|
+
/**
|
|
93
|
+
* v0.5.1 PD-4: opt-in per-step diagnostics callback. Fires once per
|
|
94
|
+
* successful step with the Picard iteration count consumed and whether
|
|
95
|
+
* adaptive step-halving had to subdivide (an "exhaustion" event from the
|
|
96
|
+
* caller's perspective: the original h failed Picard and was halved).
|
|
97
|
+
*
|
|
98
|
+
* Used by the gated `GL4_LONG=1` Mercury 100-orbit Picard-convergence
|
|
99
|
+
* test to measure the failure fraction across millions of steps without
|
|
100
|
+
* polluting the integrator's return shape for normal callers.
|
|
101
|
+
*
|
|
102
|
+
* - `iterations`: Picard iteration count actually consumed at the
|
|
103
|
+
* successful step size (always 1..picardMaxIter).
|
|
104
|
+
* - `halvings`: number of step-halvings the step required before
|
|
105
|
+
* succeeding (0 = first try; ≥1 means original h hit picardMaxIter).
|
|
106
|
+
*/
|
|
107
|
+
readonly onStep?: (event: {
|
|
108
|
+
step: number;
|
|
109
|
+
iterations: number;
|
|
110
|
+
halvings: number;
|
|
111
|
+
}) => void;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Result of `solveGL4Stage` — the two converged stage values plus the
|
|
115
|
+
* iteration count actually consumed. Consumed by the upcoming
|
|
116
|
+
* `integrateGeodesicGL4` step driver (Task 3).
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
export interface StageSolveResult {
|
|
121
|
+
readonly stageX: readonly [readonly number[], readonly number[]];
|
|
122
|
+
readonly stageP: readonly [readonly number[], readonly number[]];
|
|
123
|
+
readonly iterations: number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Picard fixed-point solver for the GL4 implicit stage system.
|
|
127
|
+
*
|
|
128
|
+
* Per Design §3 Task 1a, the implicit system is:
|
|
129
|
+
* X_i = x_n + h · Σ_j a_{ij} · g^{·ν}(X_j) P_{j,ν}
|
|
130
|
+
* P_{i,μ} = p_n − h · Σ_j a_{ij} · ½ (∂_μ g^νρ)(X_j) P_{j,ν} P_{j,ρ}
|
|
131
|
+
*
|
|
132
|
+
* Data flow (F15 / M1): stage values (X_j, P_j) at iterate k feed forward
|
|
133
|
+
* to update (X_i, P_i) at iterate k+1. This is Picard iteration (NOT
|
|
134
|
+
* Newton) — no Jacobian assembly or LU decomposition. Convergence is
|
|
135
|
+
* linear with contraction rate ≈ h·|∂f/∂x|. For Mercury (h ≈ 150 s),
|
|
136
|
+
* expect 30–40 iterations at tol=1e-12. GL4's symplecticity is guaranteed
|
|
137
|
+
* by the Butcher tableau, not by the inner solver's convergence speed
|
|
138
|
+
* (Sanz-Serna 1988; Hairer/Lubich/Wanner §II.1).
|
|
139
|
+
*
|
|
140
|
+
* The `dgInverseFn` index order is `dg[λ][μ][ν] = ∂_λ g^{μν}` (Task 0 I2
|
|
141
|
+
* pin, also recorded on `GL4Options.dgInverseFn`). When we evaluate
|
|
142
|
+
* `dp_μ = −½ (∂_μ g^{νρ}) P_ν P_ρ` we therefore read
|
|
143
|
+
* `dgInvAtXj[mu][nu][rho]` — `mu` is the differentiation axis (λ in the
|
|
144
|
+
* pinned order) and `(nu, rho)` are the upper metric indices.
|
|
145
|
+
*
|
|
146
|
+
* Throws `GL4ConvergenceError` with message matching
|
|
147
|
+
* `/Picard iteration did not converge/` if `picardMaxIter` is exhausted.
|
|
148
|
+
*
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
export declare function solveGL4Stage(state: GL4State, h: number, gInverseFn: (x: readonly number[]) => readonly (readonly number[])[], dgInverseFn: (x: readonly number[]) => readonly (readonly (readonly number[])[])[], opts: {
|
|
152
|
+
picardTol: number;
|
|
153
|
+
picardMaxIter: number;
|
|
154
|
+
}): StageSolveResult;
|
|
155
|
+
/**
|
|
156
|
+
* GL4 symplectic integrator on the canonical (x, p) geodesic Hamiltonian.
|
|
157
|
+
*
|
|
158
|
+
* H(x, p) = ½ g^{μν}(x) p_μ p_ν
|
|
159
|
+
*
|
|
160
|
+
* Drives the implicit Picard stage solver (`solveGL4Stage`) for each step,
|
|
161
|
+
* with **adaptive step-halving on Picard non-convergence** (Adam+Eve I4,
|
|
162
|
+
* replaces the single-retry R8): if Picard fails at step size h, retry at
|
|
163
|
+
* h/2, h/4, … down to `hMin` (default `h · 1e-9`); throw
|
|
164
|
+
* `GL4ConvergenceError` with a diagnostic message only when h_min is also
|
|
165
|
+
* exhausted.
|
|
166
|
+
*
|
|
167
|
+
* Symplecticity (preservation of ω = dp_μ ∧ dx^μ) is a property of the
|
|
168
|
+
* Butcher tableau, not of the inner Picard solver — see Sanz-Serna 1988,
|
|
169
|
+
* Hairer/Lubich/Wanner §II.1. Hamiltonian drift over long integrations is
|
|
170
|
+
* bounded; for non-resonant systems it remains O(h^p) over exponentially
|
|
171
|
+
* long times (`p = 4` for GL4).
|
|
172
|
+
*
|
|
173
|
+
* **Domain guard.** If `domainMinRadius` is provided and `initialState.x[1]`
|
|
174
|
+
* (radial coordinate) is below the bound, throws `NumericalBackendError`
|
|
175
|
+
* synchronously with a `/domain/i`-matching message. The mid-trajectory
|
|
176
|
+
* domain crossing is not checked here — callers needing that supply a
|
|
177
|
+
* `gInverseFn` that throws on out-of-domain input.
|
|
178
|
+
*
|
|
179
|
+
* **Units.** The integrator is metric-agnostic — units follow the units of
|
|
180
|
+
* the supplied `gInverseFn` and `initialState`. For UPT's canonical SI
|
|
181
|
+
* Schwarzschild applications (BE-37 Shapiro delay, BE-52 Mercury):
|
|
182
|
+
* - `initialState.x` — `(t, r, θ, φ)` in **(s, m, rad, rad)** (SI).
|
|
183
|
+
* - `initialState.p` — covariant 4-momentum `p_μ = g_μν v^ν` in
|
|
184
|
+
* **(J·s, kg·m, kg·m², kg·m²)** under the affine normalization
|
|
185
|
+
* `p_t = −c²` used by `evaluateBE37CovariantEikonalNumerical`.
|
|
186
|
+
* - `tauMax` — affine-parameter (proper-time for timelike, coordinate-
|
|
187
|
+
* time-like for the null normalization) extent in **seconds** under
|
|
188
|
+
* the BE-37 convention; **dimensionless** if the caller chose
|
|
189
|
+
* geometric units. The integrator does not enforce a choice.
|
|
190
|
+
* - `domainMinRadius` — radial coordinate lower bound in the same length
|
|
191
|
+
* units as `initialState.x[1]` (typically **metres** for SI).
|
|
192
|
+
*
|
|
193
|
+
* @param initialState — canonical (x, p) at τ = 0. Units follow the
|
|
194
|
+
* `gInverseFn` convention (see above).
|
|
195
|
+
* @param options — see {@link GL4Options}:
|
|
196
|
+
* - `steps` — integer step count (dimensionless).
|
|
197
|
+
* - `tauMax` — affine-parameter extent (seconds in canonical SI).
|
|
198
|
+
* - `gInverseFn(x)[μ][ν]` — inverse metric g^{μν}(x).
|
|
199
|
+
* - `dgInverseFn(x)[λ][μ][ν]` — ∂_λ g^{μν}(x).
|
|
200
|
+
* - `picardTol` — convergence tolerance (dimensionless, default 1e-12).
|
|
201
|
+
* - `picardMaxIter` — fixed-point iteration cap (dimensionless, default 50).
|
|
202
|
+
* - `hMin` — step-halving floor (same units as `tauMax / steps`).
|
|
203
|
+
* - `domainMinRadius` — radial cutoff (same units as `initialState.x[1]`).
|
|
204
|
+
* @returns `steps + 1` snapshots: index `0` is the initial state, index `n`
|
|
205
|
+
* is the state after `n` steps (τ = n · h). Each snapshot carries `tau`,
|
|
206
|
+
* `x`, `p` (and optional `v` = g^{μν} p_ν) in the units chosen above.
|
|
207
|
+
* @throws NumericalBackendError if `initialState.x[1] < domainMinRadius`.
|
|
208
|
+
* @throws GL4ConvergenceError if Picard fails even after step-halving to h_min.
|
|
209
|
+
*
|
|
210
|
+
* @public
|
|
211
|
+
*/
|
|
212
|
+
export declare function integrateGeodesicGL4(initialState: GL4State, options: GL4Options): readonly GL4Snapshot[];
|
|
213
|
+
//# sourceMappingURL=gl4-integrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gl4-integrator.d.ts","sourceRoot":"","sources":["../../src/numerical/gl4-integrator.ts"],"names":[],"mappings":"AA6BA;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAA4C,CAAC;AAEzF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAGjF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAc,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,QAAQ;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,yCAAyC;IACzC,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;qCACiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ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S,MAAM,EAAE,KAAK,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpE,WAAW,EAAE,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,SAAS,CAAC,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAClF,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACjD,gBAAgB,CAiElB;AA8ED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,QAAQ,EACtB,OAAO,EAAE,UAAU,GAClB,SAAS,WAAW,EAAE,CA4DxB"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gauss-Legendre 4th-order (GL4) symplectic integrator — types + Butcher
|
|
3
|
+
* tableau scaffold (v0.5.0 Task 1, Phase 1a-i).
|
|
4
|
+
*
|
|
5
|
+
* GL4 is a 2-stage implicit Runge-Kutta method built on the roots of the
|
|
6
|
+
* shifted Legendre polynomial P₂, with order p = 4 and stage order s = 2.
|
|
7
|
+
* It is symplectic for non-separable Hamiltonians — the property that
|
|
8
|
+
* justifies its selection over Ruth-4 for the geodesic Hamiltonian
|
|
9
|
+
*
|
|
10
|
+
* H(x, p) = ½ g^{μν}(x) p_μ p_ν,
|
|
11
|
+
*
|
|
12
|
+
* which is non-separable because g^{μν} depends on x. (v0.5.0 Decision #2,
|
|
13
|
+
* post-adversarial reconciliation; Sanz-Serna 1988; Hairer/Lubich/Wanner
|
|
14
|
+
* "Geometric Numerical Integration" §II.1.)
|
|
15
|
+
*
|
|
16
|
+
* The state is canonical (x, p) (Decision #3) — covariant momentum
|
|
17
|
+
* p_μ = g_μν dx^ν/dτ — not (x, v). This is what makes the flow symplectic
|
|
18
|
+
* on T*M.
|
|
19
|
+
*
|
|
20
|
+
* This module ships **types + Butcher constants only**. The implicit Picard
|
|
21
|
+
* stage solver lands in Task 2; the integrator entry-point
|
|
22
|
+
* `integrateGeodesicGL4` lands in Task 3.
|
|
23
|
+
*
|
|
24
|
+
* @module numerical/gl4-integrator
|
|
25
|
+
*/
|
|
26
|
+
import { GL4ConvergenceError, NumericalBackendError } from './errors.js';
|
|
27
|
+
const SQRT3_OVER_6 = Math.sqrt(3) / 6;
|
|
28
|
+
/**
|
|
29
|
+
* Gauss-Legendre 4th-order quadrature nodes c₁, c₂ — the two roots of the
|
|
30
|
+
* shifted Legendre polynomial P₂(x) on [0,1].
|
|
31
|
+
*
|
|
32
|
+
* c₁ = ½ − √3/6, c₂ = ½ + √3/6.
|
|
33
|
+
*
|
|
34
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
35
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
36
|
+
*/
|
|
37
|
+
export const GL4_C = [0.5 - SQRT3_OVER_6, 0.5 + SQRT3_OVER_6];
|
|
38
|
+
/**
|
|
39
|
+
* GL4 Butcher matrix a_{ij} — the 2×2 collocation table for the implicit
|
|
40
|
+
* stages:
|
|
41
|
+
*
|
|
42
|
+
* [ 1/4 1/4 − √3/6 ]
|
|
43
|
+
* [ 1/4 + √3/6 1/4 ]
|
|
44
|
+
*
|
|
45
|
+
* (Hairer/Lubich/Wanner §II.1, Table 1.1.)
|
|
46
|
+
*
|
|
47
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
48
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
49
|
+
*/
|
|
50
|
+
export const GL4_A = [
|
|
51
|
+
[0.25, 0.25 - SQRT3_OVER_6],
|
|
52
|
+
[0.25 + SQRT3_OVER_6, 0.25],
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* GL4 stage weights — the 2-point Gauss-Legendre quadrature weights on
|
|
56
|
+
* [0,1]: b₁ = b₂ = ½.
|
|
57
|
+
*
|
|
58
|
+
* @internal — exported for unit tests pinning the Butcher tableau invariants.
|
|
59
|
+
* Public callers should use {@link integrateGeodesicGL4}, not the raw constants.
|
|
60
|
+
*/
|
|
61
|
+
export const GL4_B = [0.5, 0.5];
|
|
62
|
+
/**
|
|
63
|
+
* Picard fixed-point solver for the GL4 implicit stage system.
|
|
64
|
+
*
|
|
65
|
+
* Per Design §3 Task 1a, the implicit system is:
|
|
66
|
+
* X_i = x_n + h · Σ_j a_{ij} · g^{·ν}(X_j) P_{j,ν}
|
|
67
|
+
* P_{i,μ} = p_n − h · Σ_j a_{ij} · ½ (∂_μ g^νρ)(X_j) P_{j,ν} P_{j,ρ}
|
|
68
|
+
*
|
|
69
|
+
* Data flow (F15 / M1): stage values (X_j, P_j) at iterate k feed forward
|
|
70
|
+
* to update (X_i, P_i) at iterate k+1. This is Picard iteration (NOT
|
|
71
|
+
* Newton) — no Jacobian assembly or LU decomposition. Convergence is
|
|
72
|
+
* linear with contraction rate ≈ h·|∂f/∂x|. For Mercury (h ≈ 150 s),
|
|
73
|
+
* expect 30–40 iterations at tol=1e-12. GL4's symplecticity is guaranteed
|
|
74
|
+
* by the Butcher tableau, not by the inner solver's convergence speed
|
|
75
|
+
* (Sanz-Serna 1988; Hairer/Lubich/Wanner §II.1).
|
|
76
|
+
*
|
|
77
|
+
* The `dgInverseFn` index order is `dg[λ][μ][ν] = ∂_λ g^{μν}` (Task 0 I2
|
|
78
|
+
* pin, also recorded on `GL4Options.dgInverseFn`). When we evaluate
|
|
79
|
+
* `dp_μ = −½ (∂_μ g^{νρ}) P_ν P_ρ` we therefore read
|
|
80
|
+
* `dgInvAtXj[mu][nu][rho]` — `mu` is the differentiation axis (λ in the
|
|
81
|
+
* pinned order) and `(nu, rho)` are the upper metric indices.
|
|
82
|
+
*
|
|
83
|
+
* Throws `GL4ConvergenceError` with message matching
|
|
84
|
+
* `/Picard iteration did not converge/` if `picardMaxIter` is exhausted.
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
export function solveGL4Stage(state, h, gInverseFn, dgInverseFn, opts) {
|
|
89
|
+
const dim = state.x.length;
|
|
90
|
+
// Initial guess: stage values = state values (k=0 of fixed-point iteration).
|
|
91
|
+
let X = [state.x.slice(), state.x.slice()];
|
|
92
|
+
let P = [state.p.slice(), state.p.slice()];
|
|
93
|
+
for (let k = 0; k < opts.picardMaxIter; k++) {
|
|
94
|
+
const Xnew = [new Array(dim).fill(0), new Array(dim).fill(0)];
|
|
95
|
+
const Pnew = [new Array(dim).fill(0), new Array(dim).fill(0)];
|
|
96
|
+
for (let i = 0; i < 2; i++) {
|
|
97
|
+
// dx^μ/dτ at stage j = g^{μν}(X_j) P_{j,ν}
|
|
98
|
+
// dp_μ/dτ at stage j = −½ (∂_μ g^νρ)(X_j) P_{j,ν} P_{j,ρ}
|
|
99
|
+
for (let mu = 0; mu < dim; mu++) {
|
|
100
|
+
let xAccum = state.x[mu];
|
|
101
|
+
let pAccum = state.p[mu];
|
|
102
|
+
for (let j = 0; j < 2; j++) {
|
|
103
|
+
const gInvAtXj = gInverseFn(X[j]);
|
|
104
|
+
const dgInvAtXj = dgInverseFn(X[j]);
|
|
105
|
+
// dx^μ contribution: + h · a_{ij} · Σ_ν g^{μν}(X_j) P_{j,ν}
|
|
106
|
+
let dxStage = 0;
|
|
107
|
+
for (let nu = 0; nu < dim; nu++) {
|
|
108
|
+
dxStage += gInvAtXj[mu][nu] * P[j][nu];
|
|
109
|
+
}
|
|
110
|
+
xAccum += h * GL4_A[i][j] * dxStage;
|
|
111
|
+
// dp_μ contribution: − h · a_{ij} · ½ Σ_{νρ} (∂_μ g^{νρ})(X_j) P_{j,ν} P_{j,ρ}
|
|
112
|
+
// I2 pin: dgInvAtXj[mu][nu][rho] = ∂_mu g^{nu rho}.
|
|
113
|
+
let dpStage = 0;
|
|
114
|
+
for (let nu = 0; nu < dim; nu++) {
|
|
115
|
+
for (let rho = 0; rho < dim; rho++) {
|
|
116
|
+
dpStage += dgInvAtXj[mu][nu][rho] * P[j][nu] * P[j][rho];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
pAccum -= h * GL4_A[i][j] * 0.5 * dpStage;
|
|
120
|
+
}
|
|
121
|
+
Xnew[i][mu] = xAccum;
|
|
122
|
+
Pnew[i][mu] = pAccum;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Convergence check: max |δX, δP|
|
|
126
|
+
let maxDelta = 0;
|
|
127
|
+
for (let i = 0; i < 2; i++) {
|
|
128
|
+
for (let mu = 0; mu < dim; mu++) {
|
|
129
|
+
maxDelta = Math.max(maxDelta, Math.abs(Xnew[i][mu] - X[i][mu]));
|
|
130
|
+
maxDelta = Math.max(maxDelta, Math.abs(Pnew[i][mu] - P[i][mu]));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
X = Xnew;
|
|
134
|
+
P = Pnew;
|
|
135
|
+
if (maxDelta < opts.picardTol) {
|
|
136
|
+
return {
|
|
137
|
+
stageX: [X[0], X[1]],
|
|
138
|
+
stageP: [P[0], P[1]],
|
|
139
|
+
iterations: k + 1,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
throw new GL4ConvergenceError(`Picard iteration did not converge in ${opts.picardMaxIter} iterations (maxDelta above picardTol=${opts.picardTol})`);
|
|
144
|
+
}
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
// Integrator entry-point (Task 3, Phase 1a-iii)
|
|
147
|
+
// ---------------------------------------------------------------------------
|
|
148
|
+
/**
|
|
149
|
+
* Step update for x^μ given converged GL4 stage values.
|
|
150
|
+
*
|
|
151
|
+
* x^μ_{n+1} = x^μ_n + h · Σ_i b_i · (g^{μν}(X_i) P_{i,ν})
|
|
152
|
+
*
|
|
153
|
+
* Module-private — only `integrateGeodesicGL4` consumes it.
|
|
154
|
+
*
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
function updateFromStages(xPrev, h, stageX, stageP, gInverseFn) {
|
|
158
|
+
const dim = xPrev.length;
|
|
159
|
+
const x = xPrev.slice();
|
|
160
|
+
for (let mu = 0; mu < dim; mu++) {
|
|
161
|
+
let delta = 0;
|
|
162
|
+
for (let i = 0; i < 2; i++) {
|
|
163
|
+
const gInv = gInverseFn(stageX[i]);
|
|
164
|
+
let xDot = 0;
|
|
165
|
+
for (let nu = 0; nu < dim; nu++) {
|
|
166
|
+
xDot += gInv[mu][nu] * stageP[i][nu];
|
|
167
|
+
}
|
|
168
|
+
delta += GL4_B[i] * xDot;
|
|
169
|
+
}
|
|
170
|
+
x[mu] += h * delta;
|
|
171
|
+
}
|
|
172
|
+
return x;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Step update for p_μ given converged GL4 stage values.
|
|
176
|
+
*
|
|
177
|
+
* p_μ_{n+1} = p_μ_n − ½ h · Σ_i b_i · (∂_μ g^{νρ})(X_i) P_{i,ν} P_{i,ρ}
|
|
178
|
+
*
|
|
179
|
+
* I2 pin: `dgInverseFn(x)[mu][nu][rho] = ∂_mu g^{nu rho}` — `mu` is the
|
|
180
|
+
* differentiation axis (`λ` in the pinned order). Consistent with the
|
|
181
|
+
* Picard solver's stage update.
|
|
182
|
+
*
|
|
183
|
+
* Module-private.
|
|
184
|
+
*
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
function updateMomentumFromStages(pPrev, h, stageX, stageP, dgInverseFn) {
|
|
188
|
+
const dim = pPrev.length;
|
|
189
|
+
const p = pPrev.slice();
|
|
190
|
+
for (let mu = 0; mu < dim; mu++) {
|
|
191
|
+
let delta = 0;
|
|
192
|
+
for (let i = 0; i < 2; i++) {
|
|
193
|
+
const dg = dgInverseFn(stageX[i]);
|
|
194
|
+
let pDot = 0;
|
|
195
|
+
for (let nu = 0; nu < dim; nu++) {
|
|
196
|
+
for (let rho = 0; rho < dim; rho++) {
|
|
197
|
+
pDot += dg[mu][nu][rho] * stageP[i][nu] * stageP[i][rho];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
delta += GL4_B[i] * (-0.5 * pDot);
|
|
201
|
+
}
|
|
202
|
+
p[mu] += h * delta;
|
|
203
|
+
}
|
|
204
|
+
return p;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* GL4 symplectic integrator on the canonical (x, p) geodesic Hamiltonian.
|
|
208
|
+
*
|
|
209
|
+
* H(x, p) = ½ g^{μν}(x) p_μ p_ν
|
|
210
|
+
*
|
|
211
|
+
* Drives the implicit Picard stage solver (`solveGL4Stage`) for each step,
|
|
212
|
+
* with **adaptive step-halving on Picard non-convergence** (Adam+Eve I4,
|
|
213
|
+
* replaces the single-retry R8): if Picard fails at step size h, retry at
|
|
214
|
+
* h/2, h/4, … down to `hMin` (default `h · 1e-9`); throw
|
|
215
|
+
* `GL4ConvergenceError` with a diagnostic message only when h_min is also
|
|
216
|
+
* exhausted.
|
|
217
|
+
*
|
|
218
|
+
* Symplecticity (preservation of ω = dp_μ ∧ dx^μ) is a property of the
|
|
219
|
+
* Butcher tableau, not of the inner Picard solver — see Sanz-Serna 1988,
|
|
220
|
+
* Hairer/Lubich/Wanner §II.1. Hamiltonian drift over long integrations is
|
|
221
|
+
* bounded; for non-resonant systems it remains O(h^p) over exponentially
|
|
222
|
+
* long times (`p = 4` for GL4).
|
|
223
|
+
*
|
|
224
|
+
* **Domain guard.** If `domainMinRadius` is provided and `initialState.x[1]`
|
|
225
|
+
* (radial coordinate) is below the bound, throws `NumericalBackendError`
|
|
226
|
+
* synchronously with a `/domain/i`-matching message. The mid-trajectory
|
|
227
|
+
* domain crossing is not checked here — callers needing that supply a
|
|
228
|
+
* `gInverseFn` that throws on out-of-domain input.
|
|
229
|
+
*
|
|
230
|
+
* **Units.** The integrator is metric-agnostic — units follow the units of
|
|
231
|
+
* the supplied `gInverseFn` and `initialState`. For UPT's canonical SI
|
|
232
|
+
* Schwarzschild applications (BE-37 Shapiro delay, BE-52 Mercury):
|
|
233
|
+
* - `initialState.x` — `(t, r, θ, φ)` in **(s, m, rad, rad)** (SI).
|
|
234
|
+
* - `initialState.p` — covariant 4-momentum `p_μ = g_μν v^ν` in
|
|
235
|
+
* **(J·s, kg·m, kg·m², kg·m²)** under the affine normalization
|
|
236
|
+
* `p_t = −c²` used by `evaluateBE37CovariantEikonalNumerical`.
|
|
237
|
+
* - `tauMax` — affine-parameter (proper-time for timelike, coordinate-
|
|
238
|
+
* time-like for the null normalization) extent in **seconds** under
|
|
239
|
+
* the BE-37 convention; **dimensionless** if the caller chose
|
|
240
|
+
* geometric units. The integrator does not enforce a choice.
|
|
241
|
+
* - `domainMinRadius` — radial coordinate lower bound in the same length
|
|
242
|
+
* units as `initialState.x[1]` (typically **metres** for SI).
|
|
243
|
+
*
|
|
244
|
+
* @param initialState — canonical (x, p) at τ = 0. Units follow the
|
|
245
|
+
* `gInverseFn` convention (see above).
|
|
246
|
+
* @param options — see {@link GL4Options}:
|
|
247
|
+
* - `steps` — integer step count (dimensionless).
|
|
248
|
+
* - `tauMax` — affine-parameter extent (seconds in canonical SI).
|
|
249
|
+
* - `gInverseFn(x)[μ][ν]` — inverse metric g^{μν}(x).
|
|
250
|
+
* - `dgInverseFn(x)[λ][μ][ν]` — ∂_λ g^{μν}(x).
|
|
251
|
+
* - `picardTol` — convergence tolerance (dimensionless, default 1e-12).
|
|
252
|
+
* - `picardMaxIter` — fixed-point iteration cap (dimensionless, default 50).
|
|
253
|
+
* - `hMin` — step-halving floor (same units as `tauMax / steps`).
|
|
254
|
+
* - `domainMinRadius` — radial cutoff (same units as `initialState.x[1]`).
|
|
255
|
+
* @returns `steps + 1` snapshots: index `0` is the initial state, index `n`
|
|
256
|
+
* is the state after `n` steps (τ = n · h). Each snapshot carries `tau`,
|
|
257
|
+
* `x`, `p` (and optional `v` = g^{μν} p_ν) in the units chosen above.
|
|
258
|
+
* @throws NumericalBackendError if `initialState.x[1] < domainMinRadius`.
|
|
259
|
+
* @throws GL4ConvergenceError if Picard fails even after step-halving to h_min.
|
|
260
|
+
*
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
export function integrateGeodesicGL4(initialState, options) {
|
|
264
|
+
const { steps, tauMax, gInverseFn, dgInverseFn, picardTol = 1e-12, picardMaxIter = 50, hMin, domainMinRadius, onStep, } = options;
|
|
265
|
+
if (domainMinRadius !== undefined && initialState.x[1] < domainMinRadius) {
|
|
266
|
+
throw new NumericalBackendError(`GL4 integrator: initial r=${initialState.x[1]} < domainMinRadius=${domainMinRadius} (domain violation)`);
|
|
267
|
+
}
|
|
268
|
+
const h = tauMax / steps;
|
|
269
|
+
const hFloor = hMin ?? h * 1e-9;
|
|
270
|
+
const snapshots = [
|
|
271
|
+
{ tau: 0, x: initialState.x.slice(), p: initialState.p.slice() },
|
|
272
|
+
];
|
|
273
|
+
let x = initialState.x.slice();
|
|
274
|
+
let p = initialState.p.slice();
|
|
275
|
+
for (let n = 0; n < steps; n++) {
|
|
276
|
+
let stages;
|
|
277
|
+
// I4: adaptive step-halving loop (not single-retry) on Picard non-convergence.
|
|
278
|
+
let stepH = h;
|
|
279
|
+
let stepSucceeded = false;
|
|
280
|
+
let halvings = 0;
|
|
281
|
+
while (stepH >= hFloor) {
|
|
282
|
+
try {
|
|
283
|
+
stages = solveGL4Stage({ x, p }, stepH, gInverseFn, dgInverseFn, {
|
|
284
|
+
picardTol,
|
|
285
|
+
picardMaxIter,
|
|
286
|
+
});
|
|
287
|
+
stepSucceeded = true;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
stepH /= 2;
|
|
292
|
+
halvings++;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
if (!stepSucceeded || stages === undefined) {
|
|
296
|
+
throw new GL4ConvergenceError(`GL4 integrator: Picard iteration did not converge even at h_min=${hFloor} (step ${n}). Diagnose step-size or metric singularity.`);
|
|
297
|
+
}
|
|
298
|
+
x = updateFromStages(x, h, stages.stageX, stages.stageP, gInverseFn);
|
|
299
|
+
p = updateMomentumFromStages(p, h, stages.stageX, stages.stageP, dgInverseFn);
|
|
300
|
+
snapshots.push({ tau: (n + 1) * h, x: x.slice(), p: p.slice() });
|
|
301
|
+
if (onStep !== undefined) {
|
|
302
|
+
onStep({ step: n, iterations: stages.iterations, halvings });
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return snapshots;
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=gl4-integrator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gl4-integrator.js","sourceRoot":"","sources":["../../src/numerical/gl4-integrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEtC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8B,CAAC,GAAG,GAAG,YAAY,EAAE,GAAG,GAAG,YAAY,CAAC,CAAC;AAEzF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAoE;IACpF,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC,IAAI,GAAG,YAAY,EAAE,IAAI,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAA8B,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AA+F3D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAe,EACf,CAAS,EACT,UAAoE,EACpE,WAAkF,EAClF,IAAkD;IAElD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,IAAI,CAAC,GAAe,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAc,EAAE,K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CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC9E,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACjE,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -32,6 +32,14 @@ export { evaluateMetricInverse };
|
|
|
32
32
|
/** @public */
|
|
33
33
|
export { evaluateBE37CovariantEikonalNumerical, } from './be37-covariant-eikonal.js';
|
|
34
34
|
export type { BE37CovariantEikonalInputs, BE37CovariantEikonalResult, } from './be37-covariant-eikonal.js';
|
|
35
|
+
/** @public — v0.5.0 GL4 symplectic integrator. */
|
|
36
|
+
export { integrateGeodesicGL4 } from './gl4-integrator.js';
|
|
37
|
+
/** @public — v0.5.0 GL4 types. */
|
|
38
|
+
export type { GL4State, GL4Snapshot, GL4Options } from './gl4-integrator.js';
|
|
39
|
+
/** @public — v0.5.0 perihelion finder (Task 4, Phase 1b). */
|
|
40
|
+
export { findPerihelion } from './perihelion-finder.js';
|
|
41
|
+
/** @public — v0.5.0 perihelion-finder types. */
|
|
42
|
+
export type { PerihelionResult, FindPerihelionOptions } from './perihelion-finder.js';
|
|
35
43
|
/**
|
|
36
44
|
* Plain-JS result of `evaluateNumerical`.
|
|
37
45
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/numerical/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EA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AAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAiCD;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CAU1B;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,kBAAkB,CAAC,CAW7B"}
|
package/dist/numerical/index.js
CHANGED
|
@@ -19,6 +19,10 @@ export { DuplicateCoordinateWarning } from '../dimensional/errors.js';
|
|
|
19
19
|
export { evaluateMetricInverse };
|
|
20
20
|
/** @public */
|
|
21
21
|
export { evaluateBE37CovariantEikonalNumerical, } from './be37-covariant-eikonal.js';
|
|
22
|
+
/** @public — v0.5.0 GL4 symplectic integrator. */
|
|
23
|
+
export { integrateGeodesicGL4 } from './gl4-integrator.js';
|
|
24
|
+
/** @public — v0.5.0 perihelion finder (Task 4, Phase 1b). */
|
|
25
|
+
export { findPerihelion } from './perihelion-finder.js';
|
|
22
26
|
/** Validate the AST and return (engine, validation result) or throw. */
|
|
23
27
|
async function prepare(node, options) {
|
|
24
28
|
const vr = validate(node);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/numerical/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI/E,cAAc;AACd,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAK/E,cAAc;AACd,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,cAAc;AACd,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACxE,cAAc;AACd,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD;;0EAE0E;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,cAAc;AACd,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,cAAc;AACd,OAAO,EACL,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/numerical/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAA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F,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC9B,GAAG;QACH,WAAW;QACX,QAAQ,EAAE,CAAC,GAAG,QAAQ,EAAE,GAAG,qBAAqB,CAAC;KAClD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAc,EACd,MAAuB,EACvB,OAAyB;IAEzB,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,qBAAqB,GAAG,MAAM,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACvF,OAAO;QACL,KAAK,EAAE,MAAM;QACb,GAAG;QACH,WAAW;QACX,QAAQ,EAAE,CAAC,GAAG,QAAQ,EAAE,GAAG,qBAAqB,CAAC;QACjD,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lowering.d.ts","sourceRoot":"","sources":["../../src/numerical/lowering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"lowering.d.ts","sourceRoot":"","sources":["../../src/numerical/lowering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAY9E,OAAO,KAAK,EACV,YAAY,EAAE,YAAY,EAAE,UAAU,EACvC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,YAAY,CAAC;AAkC/D;;4DAE4D;AAC5D,KAAK,gBAAgB,GACjB,OAAO,CAAC,QAAQ,EAAE;IAAE,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,GAC1D,OAAO,CAAC,QAAQ,EAAE;IAAE,IAAI,EAAE,2BAA2B,CAAA;CAAE,CAAC,CAAC;AAqD7D;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,CAAC,gBAAgB,CAAC,EACzC,gBAAgB,EAAE,aAAa,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,EAClD,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACjE,UAAU,CA0CZ;AAiBD;gFACgF;AAChF,wBAAgB,SAAS,CACvB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,YAAY,GACnB,YAAY,CAulBd"}
|