Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1b23772
Refactor tests: extract shared utilities and fixtures
sbryngelson Jan 6, 2026
a870f4c
Refactor Poisson test files to use shared utilities
sbryngelson Jan 6, 2026
59488f0
Apply FOR_INTERIOR_2D macro to test_cpu_gpu_consistency.cpp
sbryngelson Jan 6, 2026
43aeb9e
Trim unused code from test utility headers
sbryngelson Jan 6, 2026
4c6bf66
Fix missing FieldComparison::update(double, double) overload
sbryngelson Jan 6, 2026
9774115
Refactor test suite with shared test_framework.hpp
sbryngelson Jan 6, 2026
31e79db
Add data-driven test framework for massive test code reduction
sbryngelson Jan 6, 2026
9d1220a
Add data-driven test demo to CI fast tests
sbryngelson Jan 6, 2026
c867523
Fix unused parameter warnings in test_framework.hpp
sbryngelson Jan 6, 2026
51eb241
Fix channel_flow_suite CPU convergence
sbryngelson Jan 6, 2026
9032808
Fix C++17 compatibility warnings in test_runner.hpp
sbryngelson Jan 6, 2026
83e026f
Fix all C++17 warnings in test framework
sbryngelson Jan 6, 2026
764c357
Increase data-driven demo timeout to 180s
sbryngelson Jan 6, 2026
88f79f8
Add unified test suite with 3D support (39 tests in 481 lines)
sbryngelson Jan 7, 2026
0ec5d1e
Remove 8 redundant test files covered by test_unified_suite
sbryngelson Jan 7, 2026
14f9d83
Add EARSM_Pope model to unified test suite (41 tests)
sbryngelson Jan 7, 2026
5764452
Migrate 3D Poiseuille tests to unified test suite
sbryngelson Jan 7, 2026
4e204ab
Consolidate 10 Poisson test files into test_poisson_unified.cpp
sbryngelson Jan 7, 2026
1de646e
Update CI script for consolidated Poisson tests
sbryngelson Jan 7, 2026
c1025ee
Fix stale references to deleted Poisson test files
sbryngelson Jan 7, 2026
b86b162
Clean up stale comments and history logs
sbryngelson Jan 7, 2026
945f967
Consolidate test suite: 12 files → 3 unified tests (-3,437 lines)
sbryngelson Jan 7, 2026
5f8843a
Delete test_fft2d_debug.cpp - redundant debug test (386 lines)
sbryngelson Jan 7, 2026
057e0b9
Consolidate FFT tests: 3 files → 1 unified test (-408 lines)
sbryngelson Jan 7, 2026
507576d
Fix CI: update references to consolidated test_backend_unified
sbryngelson Jan 7, 2026
1d14631
Consolidate turbulence tests: 6 files → 1 unified test (-1,433 lines)
sbryngelson Jan 7, 2026
51abf5d
Fix unused parameter warnings in test_backend_unified.cpp
sbryngelson Jan 7, 2026
160366e
Fix unused function warnings in CPU builds
sbryngelson Jan 7, 2026
930a363
Fix test_backend_unified crash on GPU: skip direct NN model tests
sbryngelson Jan 7, 2026
c3f16db
Remove stale cross-build test references from ci.sh
sbryngelson Jan 7, 2026
75cc3cc
Clean up stale test references after test consolidation
sbryngelson Jan 7, 2026
c3031bd
Address code review suggestions for test robustness
sbryngelson Jan 7, 2026
eea274b
Address additional code review suggestions
sbryngelson Jan 7, 2026
dde0f62
Improve messaging and document tolerance rationale
sbryngelson Jan 7, 2026
e19c840
Fix test framework robustness issues
sbryngelson Jan 7, 2026
5daf775
Fix misleading test function names and stride calculation
sbryngelson Jan 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If terminal execution is unavailable or blocked by approvals, ask for approval o

The project has a gold-standard validation suite that rigorously verifies the Navier-Stokes solver:

#### Core Tests (tests/test_physics_validation.cpp) - ~2 min on GPU:
#### Core Tests (tests/test_physics_validation_advanced.cpp) - ~2 min on GPU:

1. Poiseuille Flow (Analytical)
- Tests: Viscous terms, pressure gradient, parabolic profile
Expand Down Expand Up @@ -50,7 +50,7 @@ The project has a gold-standard validation suite that rigorously verifies the Na
- Tests: No NaN/Inf, realizability (ν_t >= 0)
- Validates: Numerical stability

#### Advanced Validation (tests/test_tg_validation.cpp) - ~30 sec:
#### Taylor-Green Validation (in tests/test_physics_validation_advanced.cpp):

Taylor-Green Vortex Test
- Initial: u=sin(x)cos(y), v=-cos(x)sin(y) (divergence-free)
Expand Down
4 changes: 2 additions & 2 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The project has a **gold-standard validation suite** that rigorously verifies the Navier-Stokes solver:

#### Core Tests (`tests/test_physics_validation.cpp`) - ~2 min on GPU:
#### Core Tests (`tests/test_physics_validation_advanced.cpp`) - ~2 min on GPU:

1. **Poiseuille Flow (Analytical)**
- Tests: Viscous terms, pressure gradient, parabolic profile
Expand Down Expand Up @@ -37,7 +37,7 @@ The project has a **gold-standard validation suite** that rigorously verifies th
- Tests: No NaN/Inf, realizability (ν_t ≥ 0)
- Validates: Numerical stability

#### Advanced Validation (`tests/test_tg_validation.cpp`) - ~30 sec:
#### Taylor-Green Validation (in `tests/test_physics_validation_advanced.cpp`):

**Taylor-Green Vortex Test**
- Initial: u=sin(x)cos(y), v=-cos(x)sin(y) (divergence-free)
Expand Down
35 changes: 3 additions & 32 deletions .github/scripts/compare_cpu_gpu_builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,8 @@ mkdir -p cpu_gpu_comparison
echo "[FAIL] Bitwise CPU reference generation failed!"
exit 1
}
./test_poisson_cpu_gpu_3d --dump-prefix cpu_gpu_comparison/poisson3d || {
echo "[FAIL] Poisson 3D CPU reference generation failed!"
exit 1
}
./test_cpu_gpu_consistency --dump-prefix cpu_gpu_comparison/consistency || {
echo "[FAIL] Consistency CPU reference generation failed!"
exit 1
}
./test_solver_cpu_gpu --dump-prefix cpu_gpu_comparison/solver || {
echo "[FAIL] Solver CPU reference generation failed!"
exit 1
}
./test_time_history_consistency --dump-prefix cpu_gpu_comparison/timehistory || {
echo "[FAIL] Time-history CPU reference generation failed!"
exit 1
}
# Note: test_cpu_gpu_consistency, test_solver_cpu_gpu, test_time_history_consistency
# were consolidated into test_cpu_gpu_unified (runs within single-build, not cross-build)

echo ""
echo "--- Step 2: Run GPU and compare against CPU reference ---"
Expand All @@ -74,22 +60,7 @@ fi
echo "[FAIL] Bitwise GPU vs CPU comparison failed!"
exit 1
}
./test_poisson_cpu_gpu_3d --compare-prefix "$WORKDIR/build_ci_cpu_ref/cpu_gpu_comparison/poisson3d" || {
echo "[FAIL] Poisson 3D GPU vs CPU comparison failed!"
exit 1
}
./test_cpu_gpu_consistency --compare-prefix "$WORKDIR/build_ci_cpu_ref/cpu_gpu_comparison/consistency" || {
echo "[FAIL] Consistency GPU vs CPU comparison failed!"
exit 1
}
./test_solver_cpu_gpu --compare-prefix "$WORKDIR/build_ci_cpu_ref/cpu_gpu_comparison/solver" || {
echo "[FAIL] Solver GPU vs CPU comparison failed!"
exit 1
}
./test_time_history_consistency --compare-prefix "$WORKDIR/build_ci_cpu_ref/cpu_gpu_comparison/timehistory" || {
echo "[FAIL] Time-history GPU vs CPU comparison failed!"
exit 1
}
# Note: Additional consistency tests consolidated into test_cpu_gpu_unified (single-build)

echo ""
echo "[PASS] CPU-only vs GPU-offload comparison completed successfully"
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/cpu_sanity_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ run_test "3D Gradients" "./test_3d_gradients" 60
# Poisson solver tests
echo ""
echo "--- Poisson Solver Tests ---"
run_test "Poisson Selection" "./test_poisson_selection" 60
run_test "Poisson Unified" "./test_poisson_unified" 180
run_test "Residual Consistency" "./test_residual_consistency" 120
run_test "Poisson Nullspace" "./test_poisson_nullspace" 120

# MPI guard test
echo ""
Expand Down
5 changes: 2 additions & 3 deletions .github/scripts/gpu_correctness_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ echo "==================================================================="
echo " 6. CPU/GPU Consistency Validation (Critical)"
echo "==================================================================="
echo ""
./test_cpu_gpu_consistency
./test_cpu_gpu_unified

echo ""
echo "==================================================================="
Expand All @@ -125,8 +125,7 @@ echo "==================================================================="
echo " 8. Physics Validation (Comprehensive)"
echo "==================================================================="
echo ""
./test_physics_validation
./test_tg_validation
./test_physics_validation_advanced

echo ""
echo "==================================================================="
Expand Down
Loading