Add error-controlled DP5(4) integration and trusted first-crossing localization, including non-monotonic energy thresholds and representable-time stepping. Preserve adaptive state and independent step/time retry grants across RayPool, refinement and movie scheduling. Expose numerical controls, record actual persistent-sample costs, and add v3 lens-map provenance with legacy v2 RK4 import. Use DP54 by default and select an 8M Schwarzschild maximum step from bounded scans and a two-run 4K comparison. Retain the conservative minimum-step guard and document critical-ray and backend capability limits. Archive self-contained benchmark inputs and raw output; keep fixed RK4 HDR references explicit. Validation: make -B -j4 BUILD_TYPE=Debug test passed; explicit RK4 HDR references have zero differences. Bounded convergence checks, benchmark reproduction, Release build and focused reviews passed. No numerical-relativity backend is added.
27 lines
1.3 KiB
C
27 lines
1.3 KiB
C
/* Diagnostic only: reuse the production regression's invalid-metric fixture. */
|
|
#define main adaptive_regression_main_not_called
|
|
#include "../../tests/test_geodesic_adaptive.c"
|
|
#undef main
|
|
|
|
int main(void) {
|
|
const double floors[] = {1e-2,1e-4,1e-6,1e-8,1e-10,1e-12,1e-14};
|
|
for (unsigned i=0;i<sizeof floors/sizeof *floors;++i) {
|
|
FixtureContext context={.bad_status=SPACETIME_POINT_INVALID_METRIC,
|
|
.bad_lo=-10,.bad_hi=-.05,.radius=100};
|
|
SpacetimeSource source={.context=&context,.ops=&fixture_ops};
|
|
GeodesicTraceConfig config=dp_config(1e-9,.1,10);
|
|
config.min_step=floors[i]; config.max_step=1;
|
|
const ObserverState observer=flat_observer_at((double[3]){0,0,0});
|
|
const double direction[3]={1,0,0};
|
|
RayEndpoint endpoint=geodesic_trace_past(&source,&observer,direction,&config);
|
|
printf("FAILURE_FLOOR min=%.0e outcome=%d reason=%d t=%.17g distance_to_invalid=%.17g accepted=%u rejected=%u rhs=%lu\n",
|
|
floors[i],endpoint.outcome,endpoint.reason,endpoint.stop_coordinate_time,
|
|
endpoint.stop_coordinate_time+.05,endpoint.accepted_steps,
|
|
endpoint.rejected_steps,endpoint.rhs_evaluations);
|
|
if(endpoint.outcome!=RAY_OUTCOME_INCOMPLETE ||
|
|
endpoint.stop_coordinate_time<=-.05) return 1;
|
|
}
|
|
puts("FAILURE_FLOOR_EXIT=0");
|
|
return 0;
|
|
}
|