Make density diffusion in open boundaries settable#1043
Make density diffusion in open boundaries settable#1043LasNikas merged 18 commits intotrixi-framework:mainfrom
Conversation
|
/run-gpu-tests |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
=======================================
Coverage 88.70% 88.71%
=======================================
Files 128 128
Lines 9746 9752 +6
=======================================
+ Hits 8645 8651 +6
Misses 1101 1101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c426f9c to
c8125bb
Compare
efaulhaber
left a comment
There was a problem hiding this comment.
Please don't force-push on a PR that is in review. This breaks the "changes since last review" feature (among other things).
| pos_diff, distance, m_b, rho_a, rho_b, | ||
| particle_system, grad_kernel) | ||
| # Propagate `@inbounds` to the continuity equation, which accesses particle data | ||
| @inbounds continuity_equation!(dv, particle_system, neighbor_system, |
There was a problem hiding this comment.
| @inbounds continuity_equation!(dv, particle_system, neighbor_system, | |
| @inbounds continuity_equation!(dv, ContinuityDensity(), | |
| particle_system, neighbor_system, |
Then you don't need to add the new function in fluid.jl.
There was a problem hiding this comment.
Doesn't this cause heap allocations? Or is this optimized away by the compiler?
There was a problem hiding this comment.
An immutable struct with immutable fields lives on the stack. Just like a Tuple, which is a struct to bundle multiple scalar values. This struct doesn't even have any fields, so it doesn't require any memory and is just a tool for dispatch, which will be completely optimized away by the compiler.
|
/run-gpu-tests |
|
/run-gpu-tests |
On main, the density diffusion is taken from the fluid system and cannot be set.
With this PR, one can take density diffusion independent of the fluid.
In addition, the same method of
continuity_equation!is now called as for theAbstractFluidSystem(I only had to copy the method because of the include order).
It also fixes a bug with the
v_maxcalculation forParticleShiftingTechnique.Closes #1072.