Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## fix/precomputed-search-query-capacity #1351 +/- ##
=========================================================================
+ Coverage 79.92% 80.04% +0.11%
=========================================================================
Files 146 147 +1
Lines 11084 11153 +69
=========================================================================
+ Hits 8859 8927 +68
- Misses 2225 2226 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…re-boundary-correction-caches
…re-boundary-correction-caches
|
Addressed the contact-only-neighbor finding from the #1252 review in 95c5a66. Hydrodynamic correction assembly and its search lifecycle now skip rigid neighbors without a boundary model, while mechanical contact remains enabled. The new regressions compare correction caches with an isolated-body reference and verify finite, equal-and-opposite nonzero contact forces for all five correction types with shared, pair-local, and precomputed searches. Validation: 266/266 dummy-particle and RHS checks passed with Julia 1.11.9, two threads, bounds checking, and -O0; JuliaFormatter 2.1.1 and whitespace checks passed. |
…re-boundary-correction-caches # Conflicts: # NEWS.md
…ings - Temporarily require `correction=nothing` for the `BoundaryModelDummyParticles` of a `TotalLagrangianSPHSystem` or `RigidBodySystem`. Their correction values require the complete current hydrodynamic neighborhood, which is added in #1351. - Assemble the renormalized density gradient of `DensityDiffusionAntuono` from the uncorrected kernel gradient instead of the corrected fluid gradient, whose correction values are not computed yet when the density diffusion is updated. - Allocate the dummy-particle correction caches with the element type of the density. - Compute the kernel gradient of the boundary model once for the pressure acceleration and the continuity equation in the structure-fluid interaction. - Define `system_correction` for `BoundaryModelDummyParticles` instead of a custom `smoothing_kernel_grad` method, so that the safe and unsafe gradients are consistent.
- Allow corrections of the `BoundaryModelDummyParticles` of structures again. The correction may differ from the fluid correction, but a boundary gradient that doesn't vanish at zero distance (`KernelCorrection`, `MixedKernelGradientCorrection`) requires every fluid to use such a correction, since pairs at the same position are skipped otherwise. - With `SummationDensity`, compute the density of structure boundary models in every update with the kernel of the boundary model over the current hydrodynamic neighborhood. Previously, it kept its initial value, and `ShepardKernelCorrection` divided this value by the Shepard coefficient in every update. - Reuse the regular structure-fluid searches for the hydrodynamic sums instead of creating and updating copies, and don't update searches of static walls. - Rename the correction-specific search helpers to hydrodynamic search helpers, since they are also used for the density summation.
…re-boundary-correction-caches
Like rigid bodies with only a contact model, a `TotalLagrangianSPHSystem` without boundary model has no hydrodynamic density or mass. Including it in the correction values or summation density of a structure boundary model failed with an error.
…tion method is used (#1342) * Use boundary-model kernel for corrected FSI pressure * address review * reduce tests * AI review * review * revert * address review * Require uncorrected structure boundary models and address review findings - Temporarily require `correction=nothing` for the `BoundaryModelDummyParticles` of a `TotalLagrangianSPHSystem` or `RigidBodySystem`. Their correction values require the complete current hydrodynamic neighborhood, which is added in #1351. - Assemble the renormalized density gradient of `DensityDiffusionAntuono` from the uncorrected kernel gradient instead of the corrected fluid gradient, whose correction values are not computed yet when the density diffusion is updated. - Allocate the dummy-particle correction caches with the element type of the density. - Compute the kernel gradient of the boundary model once for the pressure acceleration and the continuity equation in the structure-fluid interaction. - Define `system_correction` for `BoundaryModelDummyParticles` instead of a custom `smoothing_kernel_grad` method, so that the safe and unsafe gradients are consistent. * remove support for continuitydensity in dummy bnds of tlshp structures * address review comments * review --------- Co-authored-by: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com>
…re-boundary-correction-caches
Current stack refresh (2026-11-13)
2af99a208, propagated through Fix precomputed-search capacity for unequal particle counts #1350 (d4a60b90b).bfba2a38e. Parent updates were merged without rewriting history.-O1, bounds checking enabled: 7,383/7,383 neighborhood-search, semidiscretization, boundary-cache, FSI RHS and TLSPH checks passed.Earlier revision-specific stack pins and validation results below are historical.
Summary
Compute the hydrodynamic sums of the
BoundaryModelDummyParticlesofTotalLagrangianSPHSystems andRigidBodySystems over their current hydrodynamicneighborhood, and lift the temporary
correction=nothingrestriction of #1342.values and gradient-correction matrix) are computed with the kernel and smoothing length of
the boundary model and with hydrodynamic masses and densities. The sums include all
particles within the support of the boundary model in the current configuration,
including the particles of the structure itself, independently of the frozen TLSPH
self-interaction search and the contact search of rigid bodies. Structures without
boundary model, e.g., contact-only rigid bodies, and disabled interactions don't
contribute.
SummationDensity, the density of structure boundary models is now computed in everyupdate over the same neighborhood. Before, it kept its initial value, and
ShepardKernelCorrectiondivided it by the Shepard coefficient in every update, so thatit grew without bound.
Only
KernelCorrectionandMixedKernelGradientCorrection, whose kernel gradients don'tvanish at zero distance, require all fluids to use one of these two corrections, since
pairs of particles at the same position are skipped otherwise.
The requirement of equal kernels and smoothing lengths of boundary model and fluid, the
continuity equation and the
almostzero(h)convention are unchanged.Validation
Fluid layer with uniform pressure on a structure, load relative to the continuum value
(uncorrected SPH: 0.98):
KernelCorrectionGradientCorrectionGradientCorrectionA rigid body moving into fluid at rest now compresses its
ContinuityDensityboundary withKernelCorrection. Before, the density rate was exactly zero.The dummy-particle, semidiscretization, neighborhood-search, FSI RHS, restart and
density-calculator tests passed on Julia 1.11.9 with 2 threads. New tests cover the
summation density (fails without the recomputation), the reuse of the regular fluid
searches, the relaxed correction rule, coincident particles with corrected boundary
gradients, and structure neighbors without boundary model. JuliaFormatter 2.1.1 and
typos 1.50.3 passed.
Performance
The regular structure-fluid searches already use the support of the boundary model in the
current configuration, so they are reused instead of copied. Additional searches are only
created for non-fluid neighbors, and grid searches with static walls are not updated.
In a 2D case with 10,000 fluid and 400 structure particles,
update_nhs!is about 2% slowerwith boundary corrections (45% in the previous version of this PR). Structures without
boundary correction and without
SummationDensityhave no overhead.Stack
Based on #1350, which is based on #1342.