diff options
author | 2023-08-01 13:38:19 +0200 | |
---|---|---|
committer | 2023-08-01 13:38:19 +0200 | |
commit | 0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661 (patch) | |
tree | 3a96aabdc6ad518c2d1300800aaa8ee2cafebba3 /Source/Particles/WarpXParticleContainer.cpp | |
parent | 63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814 (diff) | |
download | WarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.tar.gz WarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.tar.zst WarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.zip |
Clang tidy CI test: add several readability checks to clang tidy CI test (#4124)
* add few readability checks to clang-tidy CI test
* address all the issues found with clang-tidy
* fix bug
* fixed bug
* fix residual issue
* fix issue found with clang-tidy
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index f0f745f76..ea9a6b3ec 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -1013,7 +1013,7 @@ WarpXParticleContainer::DepositCharge (amrex::Vector<std::unique_ptr<amrex::Mult #endif // Exchange guard cells - if (local == false) { + if (!local) { // Possible performance optimization: // pass less than `rho[lev]->nGrowVect()` in the fifth input variable `dst_ng` ablastr::utils::communication::SumBoundary( @@ -1106,7 +1106,7 @@ WarpXParticleContainer::GetChargeDensity (int lev, bool local) WarpX::GetInstance().ApplyInverseVolumeScalingToChargeDensity(rho.get(), lev); #endif - if (local == false) { + if (!local) { // Possible performance optimization: // pass less than `rho->nGrowVect()` in the fifth input variable `dst_ng` ablastr::utils::communication::SumBoundary( @@ -1146,7 +1146,7 @@ amrex::ParticleReal WarpXParticleContainer::sumParticleCharge(bool local) { total_charge = get<0>(reduce_data.value()); - if (local == false) ParallelDescriptor::ReduceRealSum(total_charge); + if (!local) ParallelDescriptor::ReduceRealSum(total_charge); total_charge *= this->charge; return total_charge; } @@ -1222,7 +1222,7 @@ std::array<ParticleReal, 3> WarpXParticleContainer::meanParticleVelocity(bool lo } } - if (local == false) { + if (!local) { ParallelDescriptor::ReduceRealSum<ParticleReal>({vx_total,vy_total,vz_total}); ParallelDescriptor::ReduceLongSum(np_total); } @@ -1259,7 +1259,7 @@ amrex::ParticleReal WarpXParticleContainer::maxParticleVelocity(bool local) { } } - if (local == false) ParallelAllReduce::Max(max_v, ParallelDescriptor::Communicator()); + if (!local) ParallelAllReduce::Max(max_v, ParallelDescriptor::Communicator()); return max_v; } |