Skip to content

Commit fcd0899

Browse files
committed
Add warp drive dark fluid UQ tool and corresponding tests; update progress log and roadmap
1 parent 8472558 commit fcd0899

11 files changed

Lines changed: 217 additions & 74 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ jobs:
9696
run: |
9797
cd negative-energy-generator
9898
python scripts/detection_threshold_uq.py --alpha 1.0 --beta 1.0 --thresholds -1.0 0.0 1.0 --N 50 --L 10.0 --output results/detection_threshold_uq.json
99+
- name: Run warp drive dark fluid UQ demo
100+
run: |
101+
cd negative-energy-generator
102+
python scripts/dark_fluid_warp_drive_uq.py --rho0 -1.0 --R_values 1.0 2.0 --sigma_values 0.2 --N 50 --dx 0.1 --dt 0.05 --steps 10 --output results/dark_fluid_warp_drive_uq.json
99103
- name: Run sensor readout simulation demo
100104
run: |
101105
cd negative-energy-generator

docs/progress_log.md

Lines changed: 31 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,30 @@
1414
```file-history
1515
~/Code/asciimath/negative-energy-generator$ find . -path "./.venv" -prune -o -type f -regex '.*\.\(ps1\|py\|sh\|ndjson\|json\|md\|yml\|toml\|h5\|ini\)$' -print | while read file; do stat -c '%Y %n' "$file"; done | sort -nr | while read timestamp file; do echo "$(date -d @$timestamp '+%Y-%m-%d %H:%M:%S') $file"; done | head -n 40
1616
# LATEST-FILES-LIST-BEGIN
17+
2025-08-04 14:43:56 ./tests/test_dark_fluid_warp_drive_uq.py
18+
2025-08-04 14:43:56 ./tests/test_alcubierre_fluid.py
19+
2025-08-04 14:43:56 ./src/simulation/dark_fluid.py
20+
2025-08-04 14:43:56 ./scripts/dark_fluid_warp_drive_uq.py
21+
2025-08-04 14:43:56 ./docs/progress_log.ndjson
22+
2025-08-04 14:43:56 ./.github/workflows/ci.yml
23+
2025-08-04 14:30:43 ./tests/test_warp_bubble_fluid.py
24+
2025-08-04 14:30:43 ./tests/test_vacuum_fluctuation_fluid.py
25+
2025-08-04 14:30:43 ./tests/test_phase_transition_fluid.py
26+
2025-08-04 14:30:43 ./docs/roadmap.ndjson
27+
2025-08-04 14:21:03 ./tests/test_phantom_dark_fluid.py
28+
2025-08-03 22:44:19 ./docs/progress_log.md
29+
2025-08-03 22:44:16 ./results/dynamic_evolution_metrics.json
30+
2025-08-03 22:44:15 ./results/dynamic_evolution.h5
1731
2025-08-03 22:43:58 ./tests/test_simulate_sensor_readout.py
18-
2025-08-03 22:43:46 ./results/dynamic_evolution_metrics.json
19-
2025-08-03 22:43:45 ./results/dynamic_evolution.h5
20-
2025-08-03 22:41:08 ./docs/progress_log.md
2132
2025-08-03 22:40:53 ./scripts/backreaction_demo.py
22-
2025-08-03 22:40:53 ./docs/progress_log.ndjson
2333
2025-08-03 22:37:40 ./scripts/simulate_sensor_readout.py
24-
2025-08-03 22:37:40 ./.github/workflows/ci.yml
2534
2025-08-03 22:31:32 ./tests/test_detection_threshold_uq.py
2635
2025-08-03 22:30:00 ./scripts/detection_threshold_uq.py
2736
2025-08-03 22:26:19 ./tests/test_local_energy_resolution_uq.py
2837
2025-08-03 22:26:19 ./scripts/local_energy_resolution_uq.py
2938
2025-08-03 22:21:52 ./src/simulation/qft_backend.py
3039
2025-08-03 22:14:25 ./tests/test_dark_fluid_demo.py
3140
2025-08-03 22:14:25 ./tests/test_dark_fluid.py
32-
2025-08-03 22:14:25 ./src/simulation/dark_fluid.py
3341
2025-08-03 22:14:25 ./scripts/dark_fluid_demo.py
3442
2025-08-03 22:07:31 ./tests/test_backreaction_uq_report.py
3543
2025-08-03 22:07:31 ./scripts/backreaction_uq_report.py
@@ -46,19 +54,12 @@
4654
2025-08-03 18:40:04 ./src/simulation/parameter_sweep.py
4755
2025-08-03 18:40:04 ./scripts/qft_toy_ansatz_uq.py
4856
2025-08-03 18:34:04 ./tests/test_dynamic_evolution_accuracy.py
49-
2025-08-03 18:34:04 ./scripts/dynamic_evolution_demo.py
50-
2025-08-03 18:22:27 ./tests/test_dynamic_evolution_plot.py
51-
2025-08-03 18:22:27 ./src/simulation/lattice_qft.py
52-
2025-08-03 18:22:27 ./docs/future-directions.md
53-
2025-08-03 17:53:24 ./scripts/dynamic_evolution_report.py
54-
2025-08-03 17:37:59 ./tests/test_dynamic_evolution_report.py
55-
2025-08-03 17:12:04 ./tests/test_dynamic_evolution_analysis.py
56-
2025-08-03 13:48:52 ./scripts/dynamic_evolution_analysis.py
5757
# LATEST-FILES-LIST-END
5858
5959
~/Code/asciimath/negative-energy-generator$ ls .. -lt | awk '{print $1, $2, $5, $6, $7, $8, $9}'
6060
# REPO-LIST-BEGIN
6161
total 252
62+
drwxrwxrwx 18 4096 Aug 4 08:15 energy
6263
drwxrwxrwx 15 12288 Aug 3 19:37 negative-energy-generator
6364
drwxrwxrwx 8 4096 Aug 1 20:49 casimir-nanopositioning-platform
6465
drwxrwxrwx 22 4096 Aug 1 20:49 enhanced-simulation-hardware-abstraction-framework
@@ -67,7 +68,6 @@ drwxrwxrwx 9 4096 Aug 1 20:49 lqg-positive-matter-assembler
6768
drwxrwxrwx 9 4096 Aug 1 20:49 warp-spacetime-stability-controller
6869
drwxrwxrwx 28 12288 Aug 1 20:28 warp-bubble-optimizer
6970
drwxrwxrwx 23 4096 Jul 31 22:38 lqg-ftl-metric-engineering
70-
drwxrwxrwx 17 4096 Jul 31 22:19 energy
7171
drwxrwxrwx 7 4096 Jul 31 22:03 lqg-first-principles-gravitational-constant
7272
drwxrwxrwx 7 4096 Jul 31 19:25 warp-solver-equations
7373
drwxrwxrwx 5 4096 Jul 31 19:25 warp-signature-workflow
@@ -125,66 +125,23 @@ cachedir: .pytest_cache
125125
rootdir: /home/echo_/Code/asciimath/negative-energy-generator
126126
configfile: pytest.ini
127127
testpaths: tests
128-
collecting ... collected 56 items
128+
collecting ... collected 0 items / 1 error
129129
130-
tests/test_analytical_solution.py::test_analytical_solution_massless PASSED [ 1%]
131-
tests/test_backreaction.py::test_solve_semiclassical_metric_shapes_and_initial_step PASSED [ 3%]
132-
tests/test_backreaction_export.py::test_backreaction_demo_export PASSED [ 5%]
133-
tests/test_backreaction_stability.py::test_constant_source_growth_matches_theoretical PASSED [ 7%]
134-
tests/test_backreaction_uq.py::test_backreaction_uq_script PASSED [ 8%]
135-
tests/test_backreaction_uq_report.py::test_backreaction_uq_report_script PASSED [ 10%]
136-
tests/test_backreaction_wave.py::test_zero_source_remains_zero PASSED [ 12%]
137-
tests/test_dark_fluid.py::test_generate_negative_mass_fluid_defaults PASSED [ 14%]
138-
tests/test_dark_fluid.py::test_anec_negative_fluid PASSED [ 16%]
139-
tests/test_dark_fluid_demo.py::test_dark_fluid_demo_script PASSED [ 17%]
140-
tests/test_detection_threshold_uq.py::test_detection_threshold_uq PASSED [ 19%]
141-
tests/test_diagnostics.py::TestInterferometricProbe::test_frequency_response PASSED [ 21%]
142-
tests/test_diagnostics.py::TestInterferometricProbe::test_initialization PASSED [ 23%]
143-
tests/test_diagnostics.py::TestInterferometricProbe::test_phase_shift_calculation PASSED [ 25%]
144-
tests/test_diagnostics.py::TestInterferometricProbe::test_phase_shift_scaling PASSED [ 26%]
145-
tests/test_diagnostics.py::TestInterferometricProbe::test_simulate_pulse PASSED [ 28%]
146-
tests/test_diagnostics.py::TestCalorimetricSensor::test_initialization PASSED [ 30%]
147-
tests/test_diagnostics.py::TestCalorimetricSensor::test_simulate_pulse PASSED [ 32%]
148-
tests/test_diagnostics.py::TestCalorimetricSensor::test_temp_rise_calculation PASSED [ 33%]
149-
tests/test_diagnostics.py::TestPhaseShiftInterferometer::test_acquire PASSED [ 35%]
150-
tests/test_diagnostics.py::TestPhaseShiftInterferometer::test_frequency_sweep PASSED [ 37%]
151-
tests/test_diagnostics.py::TestPhaseShiftInterferometer::test_initialization PASSED [ 39%]
152-
tests/test_diagnostics.py::TestRealTimeDAQ::test_add_sample PASSED [ 41%]
153-
tests/test_diagnostics.py::TestRealTimeDAQ::test_circular_buffer PASSED [ 42%]
154-
tests/test_diagnostics.py::TestRealTimeDAQ::test_initialization PASSED [ 44%]
155-
tests/test_diagnostics.py::TestRealTimeDAQ::test_reset PASSED [ 46%]
156-
tests/test_diagnostics.py::TestRealTimeDAQ::test_statistics PASSED [ 48%]
157-
tests/test_diagnostics.py::TestRealTimeDAQ::test_trigger_modes PASSED [ 50%]
158-
tests/test_diagnostics.py::TestUtilityFunctions::test_benchmark_instrumentation_suite PASSED [ 51%]
159-
tests/test_diagnostics.py::TestUtilityFunctions::test_generate_T00_pulse PASSED [ 53%]
160-
tests/test_diagnostics.py::TestIntegration::test_complete_measurement_chain PASSED [ 55%]
161-
tests/test_diagnostics.py::TestIntegration::test_multi_sensor_comparison PASSED [ 57%]
162-
tests/test_dynamic_evolution.py::test_dynamic_energy_conservation PASSED [ 58%]
163-
tests/test_dynamic_evolution_accuracy.py::test_dynamic_evolution_energy_drift PASSED [ 60%]
164-
tests/test_dynamic_evolution_analysis.py::test_dynamic_evolution_analysis PASSED [ 62%]
165-
tests/test_dynamic_evolution_discretization.py::test_dynamic_evolution_discretization_accuracy PASSED [ 64%]
166-
tests/test_dynamic_evolution_export.py::test_dynamic_evolution_demo_export PASSED [ 66%]
167-
tests/test_dynamic_evolution_plot.py::test_dynamic_evolution_plot PASSED [ 67%]
168-
tests/test_dynamic_evolution_report.py::test_dynamic_evolution_report PASSED [ 69%]
169-
tests/test_energy_conservation.py::test_energy_conservation PASSED [ 71%]
170-
tests/test_evolve_qft.py::test_evolve_qft_fallback_identity PASSED [ 73%]
171-
tests/test_lattice_discretization.py::test_laplacian_accuracy_for_sine_wave PASSED [ 75%]
172-
tests/test_lattice_energy.py::test_compute_energy_density_zero_field PASSED [ 76%]
173-
tests/test_lattice_energy.py::test_solve_klein_gordon_basic PASSED [ 78%]
174-
tests/test_lattice_sweep_demo.py::test_lattice_sweep_demo PASSED [ 80%]
175-
tests/test_local_energy_resolution_uq.py::test_local_energy_resolution_uq PASSED [ 82%]
176-
tests/test_parameter_sweep_export.py::test_parameter_sweep_export PASSED [ 83%]
177-
tests/test_qft_backend.py::test_qft_backend_smoke PASSED [ 85%]
178-
tests/test_qft_backend_anec.py::test_compute_anec_and_check_anec_positive PASSED [ 87%]
179-
tests/test_qft_backend_anec.py::test_compute_anec_and_check_anec_negative PASSED [ 89%]
180-
tests/test_qft_backend_vnv.py::test_build_toy_ansatz_shape_and_values PASSED [ 91%]
181-
tests/test_qft_backend_vnv.py::test_local_energy_density_and_find_negative PASSED [ 92%]
182-
tests/test_qft_toy_ansatz_uq.py::test_qft_toy_ansatz_uq_script PASSED [ 94%]
183-
tests/test_simulate_sensor_readout.py::test_simulate_sensor_readout PASSED [ 96%]
184-
tests/test_time_integration_basic.py::test_solve_klein_gordon_shapes_and_values PASSED [ 98%]
185-
tests/test_zero_initial_condition.py::test_zero_initial_condition PASSED [100%]
186-
187-
============================= 56 passed in 10.50s ==============================
130+
==================================== ERRORS ====================================
131+
_______________ ERROR collecting tests/test_alcubierre_fluid.py ________________
132+
ImportError while importing test module '/home/echo_/Code/asciimath/negative-energy-generator/tests/test_alcubierre_fluid.py'.
133+
Hint: make sure your test modules/packages have valid Python names.
134+
Traceback:
135+
../../../miniconda3/lib/python3.13/importlib/__init__.py:88: in import_module
136+
return _bootstrap._gcd_import(name[level:], package, level)
137+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138+
tests/test_alcubierre_fluid.py:2: in <module>
139+
from simulation.dark_fluid import generate_alcubierre_fluid
140+
E ImportError: cannot import name 'generate_alcubierre_fluid' from 'simulation.dark_fluid' (/home/echo_/Code/asciimath/negative-energy-generator/src/simulation/dark_fluid.py)
141+
=========================== short test summary info ============================
142+
ERROR tests/test_alcubierre_fluid.py
143+
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
144+
=============================== 1 error in 1.13s ===============================
188145
# PYTEST-RESULTS-END
189146
# Never skip a test if an import isn't available. Those tests should fail and the import should be fixed.
190147
~/Code/asciimath$ grep -r "importerskip" --include="*.py" . | wc -l

docs/progress_log.ndjson

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{"date":"2025-08-04","event":"Implemented Alcubierre warp bubble fluid generator and unit test","status":"completed"}
2+
{"date":"2025-08-04","event":"Created warp drive dark fluid UQ tool and integration test","status":"completed"}
13
{"date":"2025-08-03","event":"Migrated dynamic evolution tasks to NDJSON","status":"completed"}
24
{"date":"2025-08-03","event":"Migrate progress tracking to ndjson format","status":"completed"}
35
{"date":"2025-08-03","event":"Created dynamic_evolution_analysis.py to compute JSON metrics from energy time-series","status":"completed"}

docs/roadmap.ndjson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{"milestone":"Field-Only Parameter Sweeps - Testing and Demo","description":"Build comprehensive testing and demonstration suite","deliverables":["tests/test_lattice_energy.py: unit tests","scripts/lattice_sweep_demo.py: CLI demo","scripts/dynamic_evolution_demo.py: evolution demo","HDF5 export to results/lattice_energy.h5"],"status":"completed","associated_tasks":["Integration test for HDF5 export result validation implemented (test_parameter_sweep_export.py)","Add integration tests for HDF5 export result validation in tests/test_parameter_sweep_export.py","CI workflow tested and confirmed to run unit tests and CLI demos successfully"]}
99
{"milestone":"Semiclassical Backreaction in 1+1D","description":"Extend to include first-order backreaction using semiclassical gravity","deliverables":["1+1D Einstein equations implementation","Couple lattice-derived ⟨T_μν⟩ into metric evolution","Toy metric evolution solver","Stability analysis of exotic stress-energy inputs"],"status":"completed","associated_tasks":["Write unit test for metric wave propagation (dispersion on Gaussian pulse)","Refine solve_semiclassical_metric to support spatial backreaction Laplacian and test accordingly","Run CI to confirm wave propagation solver and tests pass under the updated model","Document backreaction wave solver assumptions and equations in technical-documentation.md"]}
1010
{"milestone":"Dark Fluid Exploration - LQC Foundation","description":"Explore dark fluid models within Loop Quantum Cosmology framework","deliverables":["LQC Effective Fluid Description implementation","Phantom Dark Energy modeling","Quantum Geometry as Fluid representation","Holonomy Corrections via polymer quantization"],"status":"in_progress","associated_tasks":["Created dark fluid model module (`dark_fluid.py`) and unit tests","Created dark fluid demo script (`dark_fluid_demo.py`) and integration test"]}
11+
{"milestone":"Dark Fluid Composition Models","description":"Implement various dark fluid composition models","deliverables":["Negative Mass Fluid (Jamie Farnes-style)","Quantum Vacuum Fluctuations modeling","Unified Dark Components with phase transitions","Alternative Phases (superfluid dark matter, etc.)"],"status":"in_progress","associated_tasks":["Added unit tests for phantom, warp bubble, vacuum fluctuation, and phase transition fluid generators"]}
1112
{"milestone":"Dark Fluid Exploration - Warp Drive Applications","description":"Apply dark fluid models to warp drive applications","deliverables":["Distributed Exotic Matter manipulation","Equation of State Engineering for Alcubierre conditions","Dynamic Spacetime Effects implementation","Warp bubble geometry shaping"],"status":"pending"}
1213
{"milestone":"Dark Fluid Composition Models","description":"Implement various dark fluid composition models","deliverables":["Negative Mass Fluid (Jamie Farnes-style)","Quantum Vacuum Fluctuations modeling","Unified Dark Components with phase transitions","Alternative Phases (superfluid dark matter, etc.)"],"status":"pending"}
1314
{"milestone":"Dark Fluid Production and Manipulation","description":"Address production and manipulation challenges for dark fluids","deliverables":["Quantum Inequalities & Energy Bounds quantification","Stability & Containment numerical models","Concentration Mechanisms design","Casimir-inspired field-manipulation schemes"],"status":"pending"}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env python3
2+
"""
3+
CLI tool for Warp Drive Parameter UQ using dark fluid warp bubble profiles.
4+
"""
5+
import os
6+
import json
7+
import argparse
8+
import numpy as np
9+
from simulation.dark_fluid import generate_warp_bubble_fluid
10+
from simulation.qft_backend import PhysicsCore
11+
from simulation.backreaction import solve_semiclassical_metric
12+
13+
def main():
14+
parser = argparse.ArgumentParser(description="Warp Drive Dark Fluid UQ")
15+
parser.add_argument("--rho0", type=float, default=-1.0, help="Amplitude of negative density")
16+
parser.add_argument("--R_values", nargs='+', type=float, default=[1.0], help="Bubble radius values for sampling")
17+
parser.add_argument("--sigma_values", nargs='+', type=float, default=[0.2], help="Width parameter values for sampling")
18+
parser.add_argument("--N", type=int, default=100, help="Grid size")
19+
parser.add_argument("--dx", type=float, default=0.1, help="Spatial step dx")
20+
parser.add_argument("--dt", type=float, default=0.05, help="Time step dt for backreaction")
21+
parser.add_argument("--steps", type=int, default=20, help="Time steps for backreaction")
22+
parser.add_argument("--output", type=str, default="results/dark_fluid_warp_drive_uq.json", help="Output JSON file")
23+
args = parser.parse_args()
24+
25+
metrics = []
26+
# Prepare grid for PhysicsCore
27+
xs = None
28+
for R in args.R_values:
29+
for sigma in args.sigma_values:
30+
# Generate fluid profile
31+
x, rho = generate_warp_bubble_fluid(args.N, args.dx, args.rho0, R, sigma)
32+
# Setup PhysicsCore for ANEC
33+
core = PhysicsCore(grid=(x, x, x), dx=args.dx)
34+
anec_val = core.compute_anec(rho, args.dx)
35+
violated = core.check_anec(rho, args.dx)
36+
# Simulate backreaction
37+
h_final, history = solve_semiclassical_metric(x, rho, dt=args.dt, steps=args.steps)
38+
max_h = float(np.max(np.abs(h_final)))
39+
# Aggregate
40+
metrics.append({
41+
'R': R,
42+
'sigma': sigma,
43+
'anec_integral': anec_val,
44+
'anec_violated': violated,
45+
'max_h': max_h
46+
})
47+
# Save results
48+
os.makedirs(os.path.dirname(args.output), exist_ok=True)
49+
with open(args.output, 'w') as f:
50+
json.dump({'metrics': metrics}, f, indent=2)
51+
print(f"Warp drive UQ metrics saved to {args.output}")
52+
53+
if __name__ == '__main__':
54+
main()

src/simulation/dark_fluid.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,23 @@ def generate_phase_transition_fluid(N, dx, rho_core=-1.0, rho_env=-0.1, R_core=1
112112
# interpolate between env and core: core inside, env outside
113113
rho = rho_env + (rho_core - rho_env) * t
114114
return x, rho
115+
116+
def generate_superfluid_dark_fluid(N, dx, rho0=-1.0, k=1.0):
117+
"""
118+
Generate a superfluid dark matter density profile as a sine wave pattern.
119+
120+
Args:
121+
N (int): number of grid points
122+
dx (float): spatial step size
123+
rho0 (float): amplitude of density oscillation (default: -1.0)
124+
k (float): wave number of oscillation
125+
126+
Returns:
127+
x (np.ndarray): spatial grid points centered at zero, length N
128+
rho (np.ndarray): density profile length N, values = rho0 * sin(k*x)
129+
"""
130+
# Spatial grid centered at zero
131+
x = np.linspace(- (N//2) * dx, (N//2) * dx, N)
132+
# Sine-wave pattern
133+
rho = rho0 * np.sin(k * x)
134+
return x, rho

tests/test_alcubierre_fluid.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import numpy as np
2+
from simulation.dark_fluid import generate_alcubierre_fluid
3+
4+
def test_generate_alcubierre_fluid_basic():
5+
N = 101
6+
dx = 0.1
7+
rho0 = -1.0
8+
R = 2.0
9+
sigma = 0.5
10+
x, rho = generate_alcubierre_fluid(N, dx, rho0, R, sigma)
11+
# Check shapes and spacing
12+
assert isinstance(x, np.ndarray) and x.shape == (N,)
13+
assert isinstance(rho, np.ndarray) and rho.shape == (N,)
14+
assert np.isclose(x[1] - x[0], dx)
15+
# f(r) shape ensures max |rho| equals rho0
16+
assert np.isclose(np.max(np.abs(rho)), abs(rho0), atol=1e-6)
17+
# density is non-positive everywhere
18+
assert np.all(rho <= 0)
19+
# near center (r=0), f(0) ~ [tanh(R/sigma)-tanh(-R/sigma)]/(2*tanh(R/sigma)) ~1
20+
center_idx = N // 2
21+
assert rho[center_idx] == pytest.approx(rho0)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import json
2+
import subprocess
3+
import sys
4+
import pathlib
5+
6+
def test_dark_fluid_warp_drive_uq(tmp_path, monkeypatch):
7+
# Run CLI tool for warp drive UQ
8+
output = tmp_path / 'warp_drive_uq.json'
9+
script = pathlib.Path(__file__).parent.parent / 'scripts' / 'dark_fluid_warp_drive_uq.py'
10+
cmd = [sys.executable, str(script),
11+
'--rho0', '-1.0',
12+
'--R_values', '1.0', '2.0',
13+
'--sigma_values', '0.2',
14+
'--N', '50',
15+
'--dx', '0.1',
16+
'--dt', '0.05',
17+
'--steps', '10',
18+
'--output', str(output)]
19+
subprocess.check_call(cmd)
20+
data = json.loads(output.read_text())
21+
assert 'metrics' in data
22+
assert isinstance(data['metrics'], list)
23+
assert len(data['metrics']) == 2
24+
for entry in data['metrics']:
25+
assert 'R' in entry and 'sigma' in entry
26+
assert 'anec_integral' in entry
27+
assert 'max_h' in entry

0 commit comments

Comments
 (0)