Skip to content

Implement multicolor surface normals and threshold handling - #1280

Draft
svchb wants to merge 7 commits into
trixi-framework:mainfrom
svchb:surface-normals/multicolor-thresholds
Draft

Implement multicolor surface normals and threshold handling#1280
svchb wants to merge 7 commits into
trixi-framework:mainfrom
svchb:surface-normals/multicolor-thresholds

Conversation

@svchb

@svchb svchb commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • implement color-weighted gradients across interacting WCSPH, EDAC, and IISPH fluids
  • make equal colors suppress an interface and preserve the sign and magnitude of unequal color contrasts
  • apply normal validity thresholds consistently to standalone, Akinci, and Morris calculations
  • retain raw gradients for standalone/Akinci use and preserve the raw momentum-Morris surface delta before unit normalization
  • validate threshold ranges and document their physical interpretation and multiphase limitations
  • exclude particle-packing preprocessing through dispatch-based color-field and normal-computation opt-outs
  • add multicolor gradient and resulting-normal figures plus focused numerical regressions

Stack

Depends on #1279, which is layered on #1258. Fork branches cannot be selected as bases for pull requests into the upstream repository, so this PR targets main and temporarily shows the preceding commits.

Review-only diff: svchb/TrixiParticles.jlOpen@surface-normals/interface-documentation...surface-normals/multicolor-thresholds

Verification

  • focused surface-normal tests: 390/390
  • focused surface-tension tests: 95/95
  • IISPH color-contribution constructor and particle-packing dispatch checks passed
  • multicolor CairoMakie figures rendered successfully with CairoMakie 0.15
  • JuliaFormatter 2.1.1 passed

Stack Order

Focused merge order:

  1. Harden surface tension model configuration #1258 - surface-tension configuration hardening
  2. Clarify and visualize SPH surface normals #1279 - surface-normal scoping, explanation, and visualization
  3. Implement multicolor surface normals and threshold handling #1280 - multicolor gradients and threshold handling
  4. Add dimensionally consistent 2D Akinci kernels #1259 - dimensionally consistent 2D Akinci kernels
  5. Fix Akinci free-surface correction with continuity density #1261 - WCSPH and EDAC free-surface correction support
  6. Use conservative Akinci pair forces across resolutions #1266 - conservative adaptive-resolution Akinci pair forces
  7. Add Akinci surface tension support to IISPH #1267 - Akinci surface tension and correction support in IISPH

Supporting views:

All focused PRs target upstream main because GitHub cannot use contributor-fork branches as upstream PR bases. Each PR links a fork comparison that isolates its own review layer.

@svchb
svchb force-pushed the surface-normals/multicolor-thresholds branch from 9d64560 to b45e704 Compare August 14, 2026 12:44
@svchb
svchb force-pushed the surface-normals/multicolor-thresholds branch from b45e704 to 9437229 Compare August 14, 2026 12:52
@svchb
svchb marked this pull request as draft August 14, 2026 12:56
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.92248% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.42%. Comparing base (a720b1d) to head (300aebe).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/preprocessing/particle_packing/system.jl 50.00% 3 Missing ⚠️
src/schemes/fluid/surface_normal_sph.jl 92.30% 3 Missing ⚠️
src/schemes/fluid/surface_tension.jl 89.65% 3 Missing ⚠️
src/general/semidiscretization.jl 81.81% 2 Missing ⚠️
src/schemes/fluid/fluid.jl 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1280      +/-   ##
==========================================
+ Coverage   90.39%   90.42%   +0.03%     
==========================================
  Files         138      139       +1     
  Lines       11322    11409      +87     
==========================================
+ Hits        10234    10317      +83     
- Misses       1088     1092       +4     
Flag Coverage Δ
total 90.43% <89.92%> (+0.03%) ⬆️
unit 77.67% <86.04%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svchb
svchb force-pushed the surface-normals/multicolor-thresholds branch from 9437229 to 4a54421 Compare August 14, 2026 16:04
@svchb
svchb force-pushed the surface-normals/multicolor-thresholds branch from 4a54421 to 300aebe Compare August 14, 2026 16:12
@svchb

svchb commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator Author

Coordination note: #1282 now contains the multicolor surface semantics, threshold handling, and focused regressions that overlap this draft. After #1282 settles, this PR should retain only any unique documentation/figures, or be closed if fully subsumed. No replacement stack layer is planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant