aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2023-06-13 05:07:42 +0200
committerGravatar GitHub <noreply@github.com> 2023-06-13 03:07:42 +0000
commit297dd2d31527acc9676d4eb0c3a9c54c2688abd6 (patch)
tree86e14ea3325872030f7fe3fb7b6e20013fa1d032 /Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
parentd1a2d04521691a9489f53cc003142e91d98571ee (diff)
downloadWarpX-297dd2d31527acc9676d4eb0c3a9c54c2688abd6.tar.gz
WarpX-297dd2d31527acc9676d4eb0c3a9c54c2688abd6.tar.zst
WarpX-297dd2d31527acc9676d4eb0c3a9c54c2688abd6.zip
Enforce const correctness using clang-tidy CI test (#3921)
* add clang-tidy workflow * fix missing newline * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * make clang.14.sh executable * remove non explicitly selected checks * complete list of dependencies * fix bug * specify path of clang-tidy file * fix bug * add new check * remove one check * add magic numbers check * removed one check * keep only one check * Docs: Conda Dev w/ Boost (#3911) Add the `boost` package to the conda developer environment. Used for QED table generation. * Fix typo in Adastra cluster documentation (#3918) * add back three checks * prepare clang-tidy wrapper * actually use clang-tidy in the script * test * fix bug * actually use clang-tidy * fixed bug * fixed bug * fixed bug * fixed bug * remove all checks except the selected 3 * fixed bug * fixed bug * fixed bug * enforce const correctness using clang-tidy * remove one check * Fix Concurrency Issue * BLAS++/LAPACK++ for RZ+PSATD * Build all 4 WarpX DIMS * add few echo for test purposes * try to debug mysterious error * don't test RZ with clang-tidy * add back RZ test * add some const * fix bug * check also header files * remove header filter since it does not work as expected * fixed bug * check also WarpX headers * fix bugs * continue enforcing const correctness * continue enforcing const correctness * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed bug * fix bugs and add new const * clean .clang-tidy * make regex more precise according to Weiqun's suggestion * add more const * fix bugs * fix bug * silence warning on float comparison * fixed bug * fixed bugs * fix bug and add const * fixed bugs * fix bug * fix bug * fix bug * fixed bug * fix bug
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp b/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
index eecae3037..10575b189 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
@@ -319,7 +319,7 @@ SpectralFieldDataRZ::FABZForwardTransform (amrex::MFIter const & mfi, amrex::Box
// are grouped together in memory.
amrex::Box const& spectralspace_bx = tmpSpectralField[mfi].box();
int const nz = spectralspace_bx.length(1);
- amrex::Real inv_nz = 1._rt/nz;
+ const amrex::Real inv_nz = 1._rt/nz;
const int n_fields = m_n_fields;
ParallelFor(spectralspace_bx, modes,
@@ -446,7 +446,7 @@ SpectralFieldDataRZ::ForwardTransform (const int lev,
int const i_comp)
{
amrex::LayoutData<amrex::Real>* cost = WarpX::getCosts(lev);
- bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf.boxArray(), field_mf.DistributionMap());
+ const bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf.boxArray(), field_mf.DistributionMap());
// Check field index type, in order to apply proper shift in spectral space.
// Only cell centered in r is supported.
@@ -506,11 +506,11 @@ SpectralFieldDataRZ::ForwardTransform (const int lev,
amrex::MultiFab const & field_mf_t, int const field_index_t)
{
amrex::LayoutData<amrex::Real>* cost = WarpX::getCosts(lev);
- bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf_r.boxArray(), field_mf_r.DistributionMap());
+ const bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf_r.boxArray(), field_mf_r.DistributionMap());
// Check field index type, in order to apply proper shift in spectral space.
// Only cell centered in r is supported.
- bool const is_nodal_z = field_mf_r.is_nodal(1);
+ const bool is_nodal_z = field_mf_r.is_nodal(1);
// Create copies of the input multifabs. The copies will include the imaginary part of mode 0.
// Also note that the Hankel transform will overwrite the copies.
@@ -571,10 +571,10 @@ SpectralFieldDataRZ::BackwardTransform (const int lev,
int const i_comp)
{
amrex::LayoutData<amrex::Real>* cost = WarpX::getCosts(lev);
- bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf.boxArray(), field_mf.DistributionMap());
+ const bool do_costs = WarpXUtilLoadBalance::doCosts(cost, field_mf.boxArray(), field_mf.DistributionMap());
// Check field index type, in order to apply proper shift in spectral space.
- bool const is_nodal_z = field_mf.is_nodal(1);
+ const bool is_nodal_z = field_mf.is_nodal(1);
// A full multifab is created so that each GPU stream has its own temp space.
amrex::MultiFab tempHTransformedSplit(tempHTransformed.boxArray(), tempHTransformed.DistributionMap(), 2*n_rz_azimuthal_modes, 0);