Repository navigation
Conversation
SplashSurf comparison — 1M and 10M particles (synthetic frames, 20 CPU threads)Both methods receive the same particles for each case. Julia uses the production reconstruction configuration (voxel size Wave fixtures have mean water height 0.18 m in a 2 m × 1 m footprint. “Smooth” has amplitude 0.05 m and two waves across 2 m; “choppy” has amplitude 0.10 m and four waves. The 1M fixtures contain about 1.12M particles ( Times exclude compilation, mesh file I/O, and quality auditing: ours is the minimum of warmed reconstruction repeats with initial isovalue reset to 0.5; SplashSurf is one pipeline run per candidate threshold. Both use 20 CPU threads on the same workstation. Sub-millisecond small-case times are close to timer noise; the large cases are more informative.
Full results: threshold-by-threshold CSV · metrics and methodology JSON. Volume error is computed from the finished, oriented mesh and the relevant retained particle-volume target. The previous −200% figure for our choppy fixtures came from an export script mistakenly measuring raw, inward-ordered triangles; the VTP files were correctly oriented and their independently recomputed volumes agree with the reconstruction statistics. Small fixturesThe Higher-amplitude wave — 1M particlesSame higher-amplitude wave — 10M particlesThe full 3D surfaces nearly overlap; the wave-profile cross-section and crest close-up expose the small geometric offsets, while the nearest-vertex distance histogram measures them. Each figure labels its physical-distance colorbar; do not compare colors across resolutions without reading that scale. The histograms query sampled vertices against the full other mesh, not a sparse approximation. Limits: SplashSurf's threshold was selected post hoc from a five-point sweep; our correction certifies ≤0.1% only on successfully returned meshes. The small cases' topology was audited (two components for the sparse case; no boundary/nonmanifold edges). Large-case complete edge-manifoldness has not been independently audited here; at Figures, CSV and JSON are hosted on |






Summary
SurfaceReconstructionAPI and dimension-awareSurfaceMesh: area-corrected marching-squares contours in 2D and volume-corrected marching-cubes triangle surfaces in 3D, with closed boundary/structure geometry support.SurfaceReconstructionCallbackwith VTP/PVD output, optional PLY, surface statistics, and vertex interpolation. Float32 CUDA states are transferred to CPU for reconstruction; GPU neighborhood-search data is transferred only when interpolation requires it.benchmark/surface_reconstruction/.SurfaceMesh, with invalid-index checks and closure diagnostics. Share solution/surface save-schedule validation and postprocess/surface JSON/CSV persistence while keeping endpoint policies and numerical reconstruction separate.Planar reconstruction supports adaptive/fixed grids, polygon and tracked-lattice boundaries, holes/islands, area-equivalent sparse circles, offline/system/solution entry points, interpolated vertex quantities, VTK lines and PLY edges. A two-component
tank_sizeselects 2D; usendims=2for reusable adaptive reconstruction. In 2D the existing volume-tolerance option controls area; statistics expose area/perimeter aliases and the callback writes area/perimeter series. The new 2D example runs to its default final time successfully.The 3D production default uses classic marching cubes. A manufactured saddle motivates topology-aware contouring, but MarchingCubes.jl 0.1.11 can produce nonmanifold results for low-amplitude inputs; switching that default needs further work. Planar contours use a Float64 bilinear asymptotic decider and relative zero-node tie handling. The documentation states the numerical and topology limitations.
The final mathematical-review follow-up clarified that particle-lattice boundary meshes pass through outermost particle centers, which can lie h/2 inside a physical wall;
boundary_clearanceis measured from that mesh, not inferred from the physical wall. The manual also distinguishes the exact-zero/tie convention and 2D gross versus 3D net cavity statistics. These are documentation/docstring fixes only: the default, reconstruction arithmetic, and recorded 2D/3D output hashes are unchanged.SplashSurf comparison: why the sparse image has two shapes
The
sparseinput is a 343-particle block plus one isolated particle at(0.9, 0.9, 0.9). Consequently, both reconstructions show a large block and a small, separate droplet—two components, not duplicate renders. Our small shape is a volume-equivalent sparse-fallback sphere; SplashSurf directly contours the isolated particle. The comparison comment now includes the full threshold table and diagnostic images for both ~1M and ~10M synthetic waves, including a higher-amplitude four-wave variant. The full 3D surfaces nearly coincide; the cross-sections, crest close-ups and distance histograms are more informative than side-by-side full-scene renders.Stack
Depends on #1293 (
drafty_draft). This branch starts at its head and contains only surface-reconstruction commits. It does not include the later #1325–#1327 FSI stack. The example uses the positional wall-model constructor supported on #1293.Validation on this base
SummationDensityinputs document cache synchronization with an opt-inrefresh_cachesrecompute; planar closure validation counts indexed connectivity like the analysis. Default outputs are unchanged.refresh_cachesperforms the complete time-aware update (a density-only recompute silently dropped Shepard correction, measured +1.35% target drift) and requires the state time; buffered solutions require the final simulation state to be saved (save_end=falseleaves it unsaved); non-integer frame indices are normalized before the guard. Callback 104→109; suites and Aqua green.benchmark/surface_reconstruction/; fixed-bucket 3D reconstruction fingerprints agree at 1 and 24 threads and match the pre-2D results, including a case above the 40,000-face reduction threshold.git diff --checkpass; the workstation-specific benchmark baseline is excluded.BoundaryModelDummyParticles(initial_condition; fluid_system=...)forwards the unsupportedcorrectionkeyword to a positional constructor using separate correction keywords. This breaks existing examples and their doctest setups (e.g.hydrostatic_water_column_2d.jl). A warning-tolerant full render confirmed the failures are outside the new surface page; the parent fix belongs in Drafty draft #1293.correctionkeyword. The new closure/callback checks and reconstruction suites passed in that run. The relevant failing constructor/tests are unchanged relative to Drafty draft #1293.