CFD-GO / TCLB

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

Adding clang-format configuration and script #458

Closed llaniewski closed 11 months ago

llaniewski commented 1 year ago

This adds tools/format.sh script for formatting C++ files that uses a simple .clang-format configuration, and then compacts small for loops and multiplications/divisions with sed.

FYI @kubagalecki

codecov-commenter commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (57dd196) 44.52% compared to head (14d193a) 44.52%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #458 +/- ## ======================================== Coverage 44.52% 44.52% ======================================== Files 169 169 Lines 7879 7879 ======================================== Hits 3508 3508 Misses 4371 4371 ``` | [Flag](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458/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/458/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `30.67% <ø> (ø)` | | | [d2q9_bc](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `26.96% <ø> (ø)` | | | [d2q9_kuper](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `27.76% <ø> (ø)` | | | [d3q27_PSM_NEBB](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `36.22% <ø> (ø)` | | | [d3q27_pf_velocity](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | `30.77% <ø> (ø)` | | 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. | [Files](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | Coverage Δ | | |---|---|---| | [src/Factory.h](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#diff-c3JjL0ZhY3RvcnkuaA==) | `100.00% <ø> (ø)` | | | [src/Region.h](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#diff-c3JjL1JlZ2lvbi5o) | `75.00% <ø> (ø)` | | | [src/SolidGrid.h](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#diff-c3JjL1NvbGlkR3JpZC5o) | `100.00% <ø> (ø)` | | | [src/SolidTree.h](https://app.codecov.io/gh/CFD-GO/TCLB/pull/458?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#diff-c3JjL1NvbGlkVHJlZS5o) | `100.00% <ø> (ø)` | |

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

kubagalecki commented 1 year ago

@llaniewski Some notes (I will add more as I think of them):