From 994ab5bf24f9c90201b9e9b3fd9838c4be909580 Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Thu, 30 Dec 2021 18:43:09 -0700 Subject: [PATCH] Reintroduce readability-inconsistent-declaration-parameter-name check. (#541) --- .clang-tidy | 2 +- amr-wind/core/FieldRepo.H | 14 +++++++------- .../icns/source_terms/DensityBuoyancy.H | 2 +- .../icns/source_terms/GravityForcing.H | 2 +- amr-wind/physics/VortexRing.H | 2 +- amr-wind/utilities/FieldPlaneAveraging.H | 4 ++-- amr-wind/utilities/SecondMomentAveraging.H | 4 ++-- amr-wind/utilities/ThirdMomentAveraging.H | 4 ++-- amr-wind/utilities/console_io.H | 2 +- amr-wind/wind_energy/ABLFieldInit.H | 2 +- amr-wind/wind_energy/ABLFillInflow.H | 2 +- amr-wind/wind_energy/ABLWallFunction.H | 2 +- amr-wind/wind_energy/actuator/actuator_utils.H | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 065b8a26bc..a26c511338 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: 'clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-named-parameter,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-braces-around-statements,-readability-inconsistent-declaration-parameter-name,-modernize-pass-by-value,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.NonNullParamChecker' +Checks: 'clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-named-parameter,-readability-implicit-bool-conversion,-readability-isolate-declaration,-readability-braces-around-statements,-modernize-pass-by-value,-clang-analyzer-optin.cplusplus.VirtualCall,-clang-analyzer-core.NonNullParamChecker' WarningsAsErrors: '' HeaderFilterRegex: '^((?!/amrex/Src/|/googletest/).)*$' AnalyzeTemporaryDtors: false diff --git a/amr-wind/core/FieldRepo.H b/amr-wind/core/FieldRepo.H index e122bfd7c7..0864d6d262 100644 --- a/amr-wind/core/FieldRepo.H +++ b/amr-wind/core/FieldRepo.H @@ -298,7 +298,7 @@ public: std::unique_ptr create_scratch_field( const std::string& name, const int ncomp = 1, - const int ngrow = 0, + const int nghost = 0, const FieldLoc floc = FieldLoc::CELL) const; /** Create a scratch field @@ -313,7 +313,7 @@ public: */ std::unique_ptr create_scratch_field( const int ncomp = 1, - const int ngrow = 0, + const int nghost = 0, const FieldLoc floc = FieldLoc::CELL) const; //! Advance all fields with more than one timestate to the new timestep @@ -373,7 +373,7 @@ protected: void allocate_field_data( int lev, const Field& field, - LevelDataHolder& fdata, + LevelDataHolder& level_data, const amrex::FabFactory& factory); //! Allocate field data at all levels @@ -383,18 +383,18 @@ protected: void allocate_field_data( const amrex::BoxArray& ba, const amrex::DistributionMapping& dm, - LevelDataHolder& fdata, + LevelDataHolder& level_data, const amrex::FabFactory& factory); - void - allocate_field_data(int lev, const IntField& field, LevelDataHolder& fdata); + void allocate_field_data( + int lev, const IntField& field, LevelDataHolder& level_data); void allocate_field_data(const IntField& field); void allocate_field_data( const amrex::BoxArray& ba, const amrex::DistributionMapping& dm, - LevelDataHolder& fdata, + LevelDataHolder& level_data, const amrex::FabFactory& factory); //! Reference to the mesh instance diff --git a/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H b/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H index 11f3de922f..cd2a47d2fb 100644 --- a/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H +++ b/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H @@ -32,7 +32,7 @@ public: const amrex::MFIter& mfi, const amrex::Box& bx, const FieldState fstate, - const amrex::Array4& src_term) const override; + const amrex::Array4& vel_forces) const override; private: amrex::Vector m_gravity{{0.0, 0.0, -9.81}}; diff --git a/amr-wind/equation_systems/icns/source_terms/GravityForcing.H b/amr-wind/equation_systems/icns/source_terms/GravityForcing.H index c4c71838e8..f083001ee1 100644 --- a/amr-wind/equation_systems/icns/source_terms/GravityForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/GravityForcing.H @@ -25,7 +25,7 @@ public: const amrex::MFIter& mfi, const amrex::Box& bx, const FieldState fstate, - const amrex::Array4& src_term) const override; + const amrex::Array4& vel_forces) const override; private: amrex::Vector m_gravity{{0.0, 0.0, -9.81}}; diff --git a/amr-wind/physics/VortexRing.H b/amr-wind/physics/VortexRing.H index 90f028b2e3..5000e395c8 100644 --- a/amr-wind/physics/VortexRing.H +++ b/amr-wind/physics/VortexRing.H @@ -29,7 +29,7 @@ public: void post_advance_work() override {} template - void initialize_velocity(const VortexRingType& core); + void initialize_velocity(const VortexRingType& vorticity_theta); private: const CFDSim& m_sim; diff --git a/amr-wind/utilities/FieldPlaneAveraging.H b/amr-wind/utilities/FieldPlaneAveraging.H index 84f7c76672..d8c923c9a5 100644 --- a/amr-wind/utilities/FieldPlaneAveraging.H +++ b/amr-wind/utilities/FieldPlaneAveraging.H @@ -49,7 +49,7 @@ public: /** evaluate line average at specific location for any average component */ amrex::Real line_average_interpolated(amrex::Real x, int comp) const; /** evaluate line average at specific cell for any average component */ - amrex::Real line_average_cell(int cell, int comp) const; + amrex::Real line_average_cell(int ind, int comp) const; /** evaluate line average derivative at specific location for any average component */ @@ -168,7 +168,7 @@ public: // public for GPU amrex::Real line_hvelmag_average_interpolated(amrex::Real x) const; /** evaluate line average at specific cell for horizontal velocity magnitude */ - amrex::Real line_hvelmag_average_cell(int cell) const; + amrex::Real line_hvelmag_average_cell(int ind) const; /** compute derivatives of horizontal velocity magnitude */ void compute_line_hvelmag_derivatives(); diff --git a/amr-wind/utilities/SecondMomentAveraging.H b/amr-wind/utilities/SecondMomentAveraging.H index c6c4d740d0..1b98cd122e 100644 --- a/amr-wind/utilities/SecondMomentAveraging.H +++ b/amr-wind/utilities/SecondMomentAveraging.H @@ -37,9 +37,9 @@ public: /** evaluate second moment at specific location for each component */ amrex::Real line_average_interpolated(amrex::Real x, int comp) const; /** evaluate second moment at specific cell for both components */ - amrex::Real line_average_cell(int cell, int comp1, int comp2) const; + amrex::Real line_average_cell(int ind, int comp1, int comp2) const; /** evaluate second moment at specific cell for each component */ - amrex::Real line_average_cell(int cell, int comp) const; + amrex::Real line_average_cell(int ind, int comp) const; const amrex::Vector& line_moment() { diff --git a/amr-wind/utilities/ThirdMomentAveraging.H b/amr-wind/utilities/ThirdMomentAveraging.H index b83b62ff8c..a932a4413b 100644 --- a/amr-wind/utilities/ThirdMomentAveraging.H +++ b/amr-wind/utilities/ThirdMomentAveraging.H @@ -31,9 +31,9 @@ public: amrex::Real line_average_interpolated(amrex::Real x, int comp) const; /** evaluate third moment at specific cell for both components */ amrex::Real - line_average_cell(int cell, int comp1, int comp2, int comp3) const; + line_average_cell(int ind, int comp1, int comp2, int comp3) const; /** evaluate third moment at specific cell for each component */ - amrex::Real line_average_cell(int cell, int comp) const; + amrex::Real line_average_cell(int ind, int comp) const; const amrex::Vector& line_moment() { diff --git a/amr-wind/utilities/console_io.H b/amr-wind/utilities/console_io.H index d2aee71ee3..4b17b3f0fc 100644 --- a/amr-wind/utilities/console_io.H +++ b/amr-wind/utilities/console_io.H @@ -17,7 +17,7 @@ void print_summary(std::ostream&); void print_mlmg_header(const std::string&); -void print_mlmg_info(const std::string& solver, const amrex::MLMG& mlmg); +void print_mlmg_info(const std::string& solve_name, const amrex::MLMG& mlmg); void print_tpls(std::ostream&); diff --git a/amr-wind/wind_energy/ABLFieldInit.H b/amr-wind/wind_energy/ABLFieldInit.H index ad9ae31212..85ac779989 100644 --- a/amr-wind/wind_energy/ABLFieldInit.H +++ b/amr-wind/wind_energy/ABLFieldInit.H @@ -27,7 +27,7 @@ public: const amrex::Geometry& geom, const amrex::Array4& velocity, const amrex::Array4& density, - const amrex::Array4& tracer) const; + const amrex::Array4& temperature) const; /** Add temperature perturbations * diff --git a/amr-wind/wind_energy/ABLFillInflow.H b/amr-wind/wind_energy/ABLFillInflow.H index 1b7780c551..17bf3243ec 100644 --- a/amr-wind/wind_energy/ABLFillInflow.H +++ b/amr-wind/wind_energy/ABLFillInflow.H @@ -22,7 +22,7 @@ public: Field& field, const amrex::AmrCore& mesh, const SimTime& time, - const ABLBoundaryPlane& abl_bc); + const ABLBoundaryPlane& bndry_plane); virtual ~ABLFillInflow(); diff --git a/amr-wind/wind_energy/ABLWallFunction.H b/amr-wind/wind_energy/ABLWallFunction.H index b3c17a0062..a57fab155b 100644 --- a/amr-wind/wind_energy/ABLWallFunction.H +++ b/amr-wind/wind_energy/ABLWallFunction.H @@ -84,7 +84,7 @@ private: class ABLTempWallFunc : public FieldBCIface { public: - ABLTempWallFunc(Field& temperature, const ABLWallFunction& wall_func); + ABLTempWallFunc(Field& temperature, const ABLWallFunction& wall_fuc); void operator()(Field& temperature, const FieldState rho_state) override; diff --git a/amr-wind/wind_energy/actuator/actuator_utils.H b/amr-wind/wind_energy/actuator/actuator_utils.H index 3ecbdb8c08..03f266039e 100644 --- a/amr-wind/wind_energy/actuator/actuator_utils.H +++ b/amr-wind/wind_energy/actuator/actuator_utils.H @@ -27,7 +27,7 @@ namespace utils { * turbine */ std::set determine_influenced_procs( - const amrex::AmrCore& mesh, const amrex::RealBox& rbox); + const amrex::AmrCore& mesh, const amrex::RealBox& rbx); void determine_root_proc(ActInfo&, amrex::Vector&);