CFD-GO / TCLB

TCLB - Templated MPI+CUDA/CPU Lattice Boltzmann code
https://tclb.io
GNU General Public License v3.0
183 stars 72 forks source link

Improve the Sweep geometry #507

Closed bhill23 closed 9 months ago

bhill23 commented 9 months ago

The main loop for the sweep was unnecessarily repeating the spline calculation, and also looping over regions unnecessarily large. A very simple 'adaptive' step is also added, and the distance calculation brought into line with the other geometry types (pipes/spheres/etc) with the 0.5 offset, so the sweep can be combined smoothly with the other types.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (662f81b) 44.27% compared to head (43567db) 44.24%.

Files Patch % Lines
src/Geometry.cpp.Rt 0.00% 16 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #507 +/- ## ========================================== - Coverage 44.27% 44.24% -0.04% ========================================== Files 166 166 Lines 7561 7567 +6 ========================================== Hits 3348 3348 - Misses 4213 4219 +6 ``` | [Flag](https://app.codecov.io/gh/CFD-GO/TCLB/pull/507/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | Coverage Δ | | |---|---|---| | [d2q9](https://app.codecov.io/gh/CFD-GO/TCLB/pull/507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `31.89% <0.00%> (-0.04%)` | :arrow_down: | | [d3q27_PSM_NEBB](https://app.codecov.io/gh/CFD-GO/TCLB/pull/507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `36.34% <0.00%> (-0.04%)` | :arrow_down: | | [d3q27_pf_velocity](https://app.codecov.io/gh/CFD-GO/TCLB/pull/507/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `30.88% <0.00%> (-0.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.