diff --git a/.clang-tidy b/.clang-tidy index b61e04af5a..d5afff2abc 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: 'bugprone-*,clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-isolate-declaration,-readability-avoid-const-params-in-decls,-readability-named-parameter,-modernize-make-unique' +Checks: 'bugprone-*,clang-diagnostic-*,clang-analyzer-*,corecppguidelines-*,modernize-*,readability-*,-readability-magic-numbers,-readability-identifier-naming,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,-readability-isolate-declaration,-readability-avoid-const-params-in-decls,-modernize-make-unique' WarningsAsErrors: '' HeaderFilterRegex: '.*' AnalyzeTemporaryDtors: false diff --git a/amr-wind/boundary_conditions/FixedGradientBC.H b/amr-wind/boundary_conditions/FixedGradientBC.H index 599e39c133..b4f6bb7faa 100644 --- a/amr-wind/boundary_conditions/FixedGradientBC.H +++ b/amr-wind/boundary_conditions/FixedGradientBC.H @@ -19,7 +19,7 @@ class FixedGradientBC : public FieldBCIface public: FixedGradientBC(Field& field, amrex::Orientation ori); - void operator()(Field& field, const FieldState) override; + void operator()(Field& field, const FieldState /*rho_state*/) override; private: Field& m_field; diff --git a/amr-wind/core/FieldBCOps.H b/amr-wind/core/FieldBCOps.H index 5065cb2cf4..95384f1c7a 100644 --- a/amr-wind/core/FieldBCOps.H +++ b/amr-wind/core/FieldBCOps.H @@ -47,7 +47,7 @@ struct FieldBCNoOp constexpr FieldBCNoOp() = default; AMREX_GPU_HOST - constexpr explicit FieldBCNoOp(const Field&) {} + constexpr explicit FieldBCNoOp(const Field& /*unused*/) {} FunctorType operator()() const { return *this; } @@ -66,12 +66,12 @@ struct FieldBCNoOp AMREX_GPU_DEVICE inline void set_inflow( - const amrex::IntVect&, - amrex::Array4 const&, - amrex::GeometryData const&, - const amrex::Real, - amrex::Orientation, - const int) const + const amrex::IntVect& /*unused*/, + amrex::Array4 const& /*unused*/, + amrex::GeometryData const& /*unused*/, + const amrex::Real /*unused*/, + amrex::Orientation /*unused*/, + const int /*unused*/) const {} }; @@ -94,8 +94,8 @@ struct ConstDirichlet inline void operator()( const amrex::IntVect& iv, amrex::Array4 const& field, - amrex::GeometryData const&, - const amrex::Real, + amrex::GeometryData const& /*unused*/, + const amrex::Real /*unused*/, amrex::Orientation ori, const int comp) const { diff --git a/amr-wind/core/FieldFillPatchOps.H b/amr-wind/core/FieldFillPatchOps.H index 123409b9b9..5beba2cd6b 100644 --- a/amr-wind/core/FieldFillPatchOps.H +++ b/amr-wind/core/FieldFillPatchOps.H @@ -81,44 +81,46 @@ public: class FieldFillConstScalar : public FieldFillPatchOpsBase { public: - FieldFillConstScalar(Field&, amrex::Real fill_val) : m_fill_val(fill_val) {} + FieldFillConstScalar(Field& /*unused*/, amrex::Real fill_val) + : m_fill_val(fill_val) + {} void fillpatch( - int, - amrex::Real, + int /*lev*/, + amrex::Real /*time*/, amrex::MultiFab& mfab, - const amrex::IntVect&, - const FieldState) override + const amrex::IntVect& /*nghost*/, + const FieldState /*fstate*/) override { mfab.setVal(m_fill_val); } void fillpatch_from_coarse( - int, - amrex::Real, + int /*lev*/, + amrex::Real /*time*/, amrex::MultiFab& mfab, - const amrex::IntVect&, - const FieldState) override + const amrex::IntVect& /*nghost*/, + const FieldState /*fstate*/) override { mfab.setVal(m_fill_val); } void fillphysbc( - int, - amrex::Real, + int /*lev*/, + amrex::Real /*time*/, amrex::MultiFab& mfab, - const amrex::IntVect&, - const FieldState) override + const amrex::IntVect& /*nghost*/, + const FieldState /*fstate*/) override { mfab.setVal(m_fill_val); } void set_inflow( - int, - amrex::Real, - amrex::MultiFab&, - const amrex::IntVect&, - const FieldState) override + int /*lev*/, + amrex::Real /*time*/, + amrex::MultiFab& /*mfab*/, + const amrex::IntVect& /*nghost*/, + const FieldState /*fstate*/) override { amrex::Abort("FieldFillConstScalar::set_inflow is not implemented"); } @@ -291,7 +293,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState) override + const FieldState /*fstate*/) override { amrex::PhysBCFunct> physbc( m_mesh.Geom(lev), m_field.bcrec(), bc_functor()); @@ -303,7 +305,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState) override + const FieldState /*fstate*/) override { const int ng = nghost[0]; const auto& bctype = m_field.bc_type(); diff --git a/amr-wind/core/MLMGOptions.H b/amr-wind/core/MLMGOptions.H index 7c73c12c70..7ca707f344 100644 --- a/amr-wind/core/MLMGOptions.H +++ b/amr-wind/core/MLMGOptions.H @@ -43,9 +43,9 @@ struct MLMGOptions MLMGOptions( const std::string& default_prefix, const std::string& custom_prefix); - void operator()(amrex::MLMG&); - void operator()(Hydro::NodalProjector&); - void operator()(Hydro::MacProjector&); + void operator()(amrex::MLMG& /*mlmg*/); + void operator()(Hydro::NodalProjector& /*nodal_proj*/); + void operator()(Hydro::MacProjector& /*mac_proj*/); //! Linear operator options during construction amrex::LPInfo& lpinfo() { return m_lpinfo; } @@ -60,7 +60,7 @@ struct MLMGOptions amrex::Real abs_tol{1.0e-14}; private: - void parse_options(const std::string&); + void parse_options(const std::string& /*prefix*/); //! Linear operator info object amrex::LPInfo m_lpinfo; diff --git a/amr-wind/core/MeshMap.H b/amr-wind/core/MeshMap.H index 593813e7a8..5bf232e668 100644 --- a/amr-wind/core/MeshMap.H +++ b/amr-wind/core/MeshMap.H @@ -35,7 +35,7 @@ public: ~MeshMap() override = default; //! declare mesh mapping fields - void declare_mapping_fields(const CFDSim&, int); + void declare_mapping_fields(const CFDSim& /*sim*/, int /*nghost*/); //! Construct mesh scaling field virtual void create_map(int, const amrex::Geometry&) = 0; diff --git a/amr-wind/equation_systems/AdvOp_Godunov.H b/amr-wind/equation_systems/AdvOp_Godunov.H index 9bbcb947ba..08c9a30756 100644 --- a/amr-wind/equation_systems/AdvOp_Godunov.H +++ b/amr-wind/equation_systems/AdvOp_Godunov.H @@ -67,7 +67,7 @@ struct AdvectionOp< iconserv.resize(PDE::ndim, 1); } - void preadvect(const FieldState, const amrex::Real) {} + void preadvect(const FieldState /*unused*/, const amrex::Real /*unused*/) {} void operator()(const FieldState fstate, const amrex::Real dt) { diff --git a/amr-wind/equation_systems/AdvOp_MOL.H b/amr-wind/equation_systems/AdvOp_MOL.H index 3d5efa017c..0e63dd9b22 100644 --- a/amr-wind/equation_systems/AdvOp_MOL.H +++ b/amr-wind/equation_systems/AdvOp_MOL.H @@ -36,9 +36,9 @@ struct AdvectionOp< , w_mac(fields_in.repo.get_field("w_mac")) {} - void preadvect(const FieldState, const amrex::Real) {} + void preadvect(const FieldState /*unused*/, const amrex::Real /*unused*/) {} - void operator()(const FieldState fstate, const amrex::Real) + void operator()(const FieldState fstate, const amrex::Real /*unused*/) { static_assert( PDE::ndim == 1, "Invalid number of components for scalar"); diff --git a/amr-wind/equation_systems/DiffusionOps.H b/amr-wind/equation_systems/DiffusionOps.H index b4b98d7fa7..0d123baa0b 100644 --- a/amr-wind/equation_systems/DiffusionOps.H +++ b/amr-wind/equation_systems/DiffusionOps.H @@ -52,7 +52,8 @@ public: void set_bcoeffs( L& linop, typename std::enable_if< - std::is_same::value>::type* = nullptr) + std::is_same::value>::type* /*unused*/ + = nullptr) { const int nlevels = m_pdefields.repo.num_active_levels(); const auto& viscosity = m_pdefields.mueff; @@ -72,7 +73,8 @@ public: void set_bcoeffs( L& linop, typename std::enable_if< - std::is_same::value>::type* = nullptr) + std::is_same::value>::type* /*unused*/ + = nullptr) { const int nlevels = m_pdefields.repo.num_active_levels(); const auto& viscosity = m_pdefields.mueff; diff --git a/amr-wind/equation_systems/PDE.H b/amr-wind/equation_systems/PDE.H index 0da1535453..4a013bc77a 100644 --- a/amr-wind/equation_systems/PDE.H +++ b/amr-wind/equation_systems/PDE.H @@ -104,7 +104,7 @@ public: m_src_op(fstate, m_sim.has_mesh_mapping()); } - void compute_mueff(const FieldState) override + void compute_mueff(const FieldState /*unused*/) override { if (PDE::has_diffusion) { BL_PROFILE("amr-wind::" + this->identifier() + "::compute_mueff"); diff --git a/amr-wind/equation_systems/density/density_ops.H b/amr-wind/equation_systems/density/density_ops.H index a6d05e8803..a678a9402e 100644 --- a/amr-wind/equation_systems/density/density_ops.H +++ b/amr-wind/equation_systems/density/density_ops.H @@ -12,7 +12,9 @@ struct ComputeRHSOp explicit ComputeRHSOp(PDEFields& fields_in) : fields(fields_in) {} void predictor_rhs( - const DiffusionType, const amrex::Real dt, bool /*mesh_mapping*/) + const DiffusionType /*unused*/, + const amrex::Real dt, + bool /*mesh_mapping*/) { // Field states for diffusion and advection terms. In Godunov scheme // these terms only have one state. @@ -47,7 +49,9 @@ struct ComputeRHSOp } void corrector_rhs( - const DiffusionType, const amrex::Real dt, bool /*mesh_mapping*/) + const DiffusionType /*unused*/, + const amrex::Real dt, + bool /*mesh_mapping*/) { const int nlevels = fields.repo.num_active_levels(); auto& field = fields.field; diff --git a/amr-wind/equation_systems/icns/icns_advection.H b/amr-wind/equation_systems/icns/icns_advection.H index 82cdbfa3d9..3c9ecc9b40 100644 --- a/amr-wind/equation_systems/icns/icns_advection.H +++ b/amr-wind/equation_systems/icns/icns_advection.H @@ -17,22 +17,26 @@ public: using FaceFabPtrVec = amrex::Vector>; - MacProjOp(FieldRepo&, bool, bool, bool); + MacProjOp( + FieldRepo& /*repo*/, + bool /*has_overset*/, + bool /*variable_density*/, + bool /*mesh_mapping*/); void operator()(const FieldState fstate, const amrex::Real dt); static void mac_proj_to_uniform_space( - const amr_wind::FieldRepo&, - amr_wind::Field&, - amr_wind::Field&, - amr_wind::Field&, - amrex::Array&, - amrex::Real, - int) noexcept; + const amr_wind::FieldRepo& /*repo*/, + amr_wind::Field& /*u_mac*/, + amr_wind::Field& /*v_mac*/, + amr_wind::Field& /*w_mac*/, + amrex::Array& /*rho_face*/, + amrex::Real /*ovst_fac*/, + int /*lev*/) noexcept; private: - void init_projector(const FaceFabPtrVec&) noexcept; - void init_projector(const amrex::Real) noexcept; + void init_projector(const FaceFabPtrVec& /*beta*/) noexcept; + void init_projector(const amrex::Real /*beta*/) noexcept; FieldRepo& m_repo; std::unique_ptr m_mac_proj; @@ -410,7 +414,7 @@ struct AdvectionOp m_macproj_op(fstate, dt); } - void operator()(const FieldState fstate, const amrex::Real) + void operator()(const FieldState fstate, const amrex::Real /*unused*/) { auto& repo = fields.repo; diff --git a/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H b/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H index a0473d3a2a..9b24d9be2e 100644 --- a/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H +++ b/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H @@ -32,9 +32,9 @@ public: const FieldState fstate, const amrex::Array4& src_term) const override; - void mean_temperature_init(const FieldPlaneAveraging&); + void mean_temperature_init(const FieldPlaneAveraging& /*tavg*/); - void mean_temperature_update(const FieldPlaneAveraging&); + void mean_temperature_update(const FieldPlaneAveraging& /*tavg*/); private: const amrex::AmrCore& m_mesh; diff --git a/amr-wind/equation_systems/icns/source_terms/BodyForce.H b/amr-wind/equation_systems/icns/source_terms/BodyForce.H index 33203b13f7..8de17c78b1 100644 --- a/amr-wind/equation_systems/icns/source_terms/BodyForce.H +++ b/amr-wind/equation_systems/icns/source_terms/BodyForce.H @@ -19,7 +19,7 @@ class BodyForce : public MomentumSource::Register public: static std::string identifier() { return "BodyForce"; } - explicit BodyForce(const CFDSim&); + explicit BodyForce(const CFDSim& /*sim*/); ~BodyForce() override; diff --git a/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H b/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H index 1e8e25edb4..21da4ae281 100644 --- a/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H @@ -17,7 +17,7 @@ class CoriolisForcing : public MomentumSource::Register public: static std::string identifier() { return "CoriolisForcing"; } - explicit CoriolisForcing(const CFDSim&); + explicit CoriolisForcing(const CFDSim& /*sim*/); ~CoriolisForcing() override; diff --git a/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H b/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H index 9bb7e020a8..98339de801 100644 --- a/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H @@ -16,7 +16,7 @@ class GeostrophicForcing : public MomentumSource::Register public: static std::string identifier() { return "GeostrophicForcing"; } - explicit GeostrophicForcing(const CFDSim&); + explicit GeostrophicForcing(const CFDSim& /*unused*/); ~GeostrophicForcing() override; diff --git a/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H b/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H index 33715b9ec7..b32e7ed5f3 100644 --- a/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H @@ -15,7 +15,7 @@ class SynthTurbForcing : public MomentumSource::Register public: static std::string identifier() { return "SynthTurbForcing"; } - explicit SynthTurbForcing(const CFDSim&); + explicit SynthTurbForcing(const CFDSim& /*sim*/); ~SynthTurbForcing() override; diff --git a/amr-wind/equation_systems/levelset/levelset_ops.H b/amr-wind/equation_systems/levelset/levelset_ops.H index 59ae73728d..7a0797a74d 100644 --- a/amr-wind/equation_systems/levelset/levelset_ops.H +++ b/amr-wind/equation_systems/levelset/levelset_ops.H @@ -52,7 +52,9 @@ struct ComputeRHSOp explicit ComputeRHSOp(PDEFields& fields_in) : fields(fields_in) {} void predictor_rhs( - const DiffusionType, const amrex::Real dt, bool /*mesh_mapping*/) + const DiffusionType /*unused*/, + const amrex::Real dt, + bool /*mesh_mapping*/) { // Field states for diffusion and advection terms. In Godunov scheme // these terms only have one state. @@ -87,7 +89,9 @@ struct ComputeRHSOp } void corrector_rhs( - const DiffusionType, const amrex::Real dt, bool /*mesh_mapping*/) + const DiffusionType /*unused*/, + const amrex::Real dt, + bool /*mesh_mapping*/) { const int nlevels = fields.repo.num_active_levels(); auto& field = fields.field; @@ -132,7 +136,7 @@ struct PostSolveOp PostSolveOp(CFDSim& sim, PDEFields& fields) : m_sim(sim), m_fields(fields) {} - void operator()(const amrex::Real) + void operator()(const amrex::Real /*unused*/) { m_fields.field.fillpatch(m_sim.time().current_time()); auto& multiphase = m_sim.physics_manager().get(); diff --git a/amr-wind/equation_systems/sdr/sdr_ops.H b/amr-wind/equation_systems/sdr/sdr_ops.H index a1d872b140..9643ffb577 100644 --- a/amr-wind/equation_systems/sdr/sdr_ops.H +++ b/amr-wind/equation_systems/sdr/sdr_ops.H @@ -33,7 +33,7 @@ struct TurbulenceOp template <> struct PostSolveOp { - PostSolveOp(CFDSim&, PDEFields& fields) : m_fields(fields) {} + PostSolveOp(CFDSim& /*unused*/, PDEFields& fields) : m_fields(fields) {} void operator()(const amrex::Real time) { diff --git a/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H b/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H index 8e93a33242..c03b7629a5 100644 --- a/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H +++ b/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H @@ -17,7 +17,7 @@ class SDRSrc : public SDRSource::Register public: static std::string identifier() { return "SDRSrc"; } - explicit SDRSrc(const CFDSim&); + explicit SDRSrc(const CFDSim& /*sim*/); ~SDRSrc() override; diff --git a/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H b/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H index 3d4ccdc4dc..d02bf199fe 100644 --- a/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H +++ b/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H @@ -15,7 +15,7 @@ class KsgsM84Src : public TKESource::Register public: static std::string identifier() { return "KsgsM84Src"; } - explicit KsgsM84Src(const CFDSim&); + explicit KsgsM84Src(const CFDSim& /*sim*/); ~KsgsM84Src() override; diff --git a/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H b/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H index 4b42f34991..b5a8add092 100644 --- a/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H +++ b/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H @@ -17,7 +17,7 @@ class KwSSTSrc : public TKESource::Register public: static std::string identifier() { return "KwSSTSrc"; } - explicit KwSSTSrc(const CFDSim&); + explicit KwSSTSrc(const CFDSim& /*sim*/); ~KwSSTSrc() override; diff --git a/amr-wind/equation_systems/tke/tke_ops.H b/amr-wind/equation_systems/tke/tke_ops.H index 6d47848087..77a107f897 100644 --- a/amr-wind/equation_systems/tke/tke_ops.H +++ b/amr-wind/equation_systems/tke/tke_ops.H @@ -33,7 +33,7 @@ struct TurbulenceOp template <> struct PostSolveOp { - PostSolveOp(CFDSim&, PDEFields& fields) : m_fields(fields) {} + PostSolveOp(CFDSim& /*unused*/, PDEFields& fields) : m_fields(fields) {} void operator()(const amrex::Real time) { diff --git a/amr-wind/equation_systems/vof/vof_advection.H b/amr-wind/equation_systems/vof/vof_advection.H index 5006036a66..704ea4dfce 100644 --- a/amr-wind/equation_systems/vof/vof_advection.H +++ b/amr-wind/equation_systems/vof/vof_advection.H @@ -14,7 +14,8 @@ namespace pde { template <> struct AdvectionOp { - AdvectionOp(PDEFields& fields_in, bool, bool, bool) + AdvectionOp( + PDEFields& fields_in, bool /*unused*/, bool /*unused*/, bool /*unused*/) : fields(fields_in) , u_mac(fields_in.repo.get_field("u_mac")) , v_mac(fields_in.repo.get_field("v_mac")) @@ -24,9 +25,9 @@ struct AdvectionOp pp_multiphase.query("use_lagrangian", m_use_lagrangian); } - void preadvect(const FieldState, const amrex::Real) {} + void preadvect(const FieldState /*unused*/, const amrex::Real /*unused*/) {} - void operator()(const FieldState, const amrex::Real dt) + void operator()(const FieldState /*unused*/, const amrex::Real dt) { static_assert( VOF::ndim == 1, "Invalid number of components for scalar"); diff --git a/amr-wind/equation_systems/vof/vof_ops.H b/amr-wind/equation_systems/vof/vof_ops.H index af889383fd..ef7f16a6d5 100644 --- a/amr-wind/equation_systems/vof/vof_ops.H +++ b/amr-wind/equation_systems/vof/vof_ops.H @@ -45,9 +45,17 @@ struct ComputeRHSOp { explicit ComputeRHSOp(PDEFields& fields_in) : fields(fields_in) {} - void predictor_rhs(const DiffusionType, const amrex::Real, bool) {} + void predictor_rhs( + const DiffusionType /*unused*/, + const amrex::Real /*unused*/, + bool /*unused*/) + {} - void corrector_rhs(const DiffusionType, const amrex::Real, bool) {} + void corrector_rhs( + const DiffusionType /*unused*/, + const amrex::Real /*unused*/, + bool /*unused*/) + {} // data members PDEFields& fields; @@ -63,7 +71,7 @@ struct PostSolveOp PostSolveOp(CFDSim& sim, PDEFields& fields) : m_sim(sim), m_fields(fields) {} - void operator()(const amrex::Real) + void operator()(const amrex::Real /*unused*/) { m_fields.field.fillpatch(m_sim.time().current_time()); auto& multiphase = m_sim.physics_manager().get(); diff --git a/amr-wind/fvm/stencils.H b/amr-wind/fvm/stencils.H index 4df8f5179c..002f44e483 100644 --- a/amr-wind/fvm/stencils.H +++ b/amr-wind/fvm/stencils.H @@ -146,7 +146,8 @@ struct StencilInterior static constexpr amrex::Real f21 = f01; static constexpr amrex::Real f22 = f02; - static amrex::Box box(const amrex::Box& bx, const amrex::Geometry&) + static amrex::Box + box(const amrex::Box& bx, const amrex::Geometry& /*unused*/) { return bx; } diff --git a/amr-wind/immersed_boundary/IB.H b/amr-wind/immersed_boundary/IB.H index 30e0591cc6..5356dec503 100644 --- a/amr-wind/immersed_boundary/IB.H +++ b/amr-wind/immersed_boundary/IB.H @@ -30,11 +30,13 @@ class IB : public Physics::Register public: static std::string identifier() { return "IB"; } - explicit IB(CFDSim&); + explicit IB(CFDSim& /*sim*/); ~IB() override; - void initialize_fields(int, const amrex::Geometry&) override {} + void + initialize_fields(int /*level*/, const amrex::Geometry& /*geom*/) override + {} void pre_init_actions() override; diff --git a/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H b/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H index 17df955199..e436ca25a4 100644 --- a/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H +++ b/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H @@ -17,7 +17,9 @@ namespace bluff_body { * bounary */ void read_inputs( - BluffBodyBaseData&, IBInfo&, const ::amr_wind::utils::MultiParser&); + BluffBodyBaseData& /*wdata*/, + IBInfo& /*unused*/, + const ::amr_wind::utils::MultiParser& /*pp*/); /** Initialize core data structures when modeling the IB geometry */ @@ -25,20 +27,23 @@ void init_data_structures(CFDSim&); /** Set the velocity inside the IB based on a manufactured solution */ -void apply_mms_vel(CFDSim&); +void apply_mms_vel(CFDSim& /*sim*/); /** Set the velocity inside the IB based on a dirichlet BC */ -void apply_dirichlet_vel(CFDSim&, const amrex::Vector& vel_bc); +void apply_dirichlet_vel( + CFDSim& /*sim*/, const amrex::Vector& vel_bc); void prepare_netcdf_file( - const std::string&, const BluffBodyBaseData&, const IBInfo&); + const std::string& /*ncfile*/, + const BluffBodyBaseData& /*meta*/, + const IBInfo& /*info*/); void write_netcdf( - const std::string&, - const BluffBodyBaseData&, - const IBInfo&, - const amrex::Real); + const std::string& /*ncfile*/, + const BluffBodyBaseData& /*meta*/, + const IBInfo& /*info*/, + const amrex::Real /*time*/); } // namespace bluff_body @@ -59,7 +64,7 @@ struct UpdatePosOp< typename std::enable_if< std::is_base_of::value>::type> { - void operator()(typename GeomTrait::DataType&) {} + void operator()(typename GeomTrait::DataType& /*unused*/) {} }; template @@ -89,7 +94,7 @@ struct ComputeForceOp< typename std::enable_if< std::is_base_of::value>::type> { - void operator()(typename GeomTrait::DataType&) {} + void operator()(typename GeomTrait::DataType& /*unused*/) {} }; template diff --git a/amr-wind/mesh_mapping_models/ChannelFlowMap.H b/amr-wind/mesh_mapping_models/ChannelFlowMap.H index 73949e3dc4..e5de5719c2 100644 --- a/amr-wind/mesh_mapping_models/ChannelFlowMap.H +++ b/amr-wind/mesh_mapping_models/ChannelFlowMap.H @@ -19,16 +19,16 @@ public: ~ChannelFlowMap() override = default; //! Construct the mesh scaling field - void create_map(int, const amrex::Geometry&) override; + void create_map(int /*lev*/, const amrex::Geometry& /*geom*/) override; //! Construct mesh scaling field on cell centers and nodes - void create_cell_node_map(int, const amrex::Geometry&); + void create_cell_node_map(int /*lev*/, const amrex::Geometry& /*geom*/); //! Construct mesh scaling field on cell faces - void create_face_map(int, const amrex::Geometry&); + void create_face_map(int /*lev*/, const amrex::Geometry& /*geom*/); //! Construct the non-uniform mesh field - void create_non_uniform_mesh(int, const amrex::Geometry&); + void create_non_uniform_mesh(int /*lev*/, const amrex::Geometry& /*geom*/); private: //! User input parameters diff --git a/amr-wind/mesh_mapping_models/ConstantMap.H b/amr-wind/mesh_mapping_models/ConstantMap.H index 912fb0128e..2227bdefef 100644 --- a/amr-wind/mesh_mapping_models/ConstantMap.H +++ b/amr-wind/mesh_mapping_models/ConstantMap.H @@ -19,16 +19,16 @@ public: ~ConstantMap() override = default; //! Construct the mesh scaling field - void create_map(int, const amrex::Geometry&) override; + void create_map(int /*lev*/, const amrex::Geometry& /*geom*/) override; //! Construct mesh scaling field on cell centers and nodes - void create_cell_node_map(int); + void create_cell_node_map(int /*lev*/); //! Construct mesh scaling field on cell faces - void create_face_map(int); + void create_face_map(int /*lev*/); //! Construct the non-uniform mesh field - void create_non_uniform_mesh(int, const amrex::Geometry&); + void create_non_uniform_mesh(int /*lev*/, const amrex::Geometry& /*geom*/); private: //! Factor to scale the mesh by diff --git a/amr-wind/physics/ConvectingTaylorVortex.H b/amr-wind/physics/ConvectingTaylorVortex.H index a182076ff7..35c983f578 100644 --- a/amr-wind/physics/ConvectingTaylorVortex.H +++ b/amr-wind/physics/ConvectingTaylorVortex.H @@ -12,72 +12,72 @@ namespace { struct UExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*u0*/, + const amrex::Real /*v0*/, + const amrex::Real /*omega*/, + const amrex::Real /*x*/, + const amrex::Real /*y*/, + const amrex::Real /*t*/) const; const int m_comp{0}; }; struct VExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*u0*/, + const amrex::Real /*v0*/, + const amrex::Real /*omega*/, + const amrex::Real /*x*/, + const amrex::Real /*y*/, + const amrex::Real /*t*/) const; const int m_comp{1}; }; struct WExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/) const; const int m_comp{2}; }; struct GpxExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*u0*/, + const amrex::Real /*unused*/, + const amrex::Real /*omega*/, + const amrex::Real /*x*/, + const amrex::Real /*unused*/, + const amrex::Real /*t*/) const; const int m_comp{0}; }; struct GpyExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*unused*/, + const amrex::Real /*v0*/, + const amrex::Real /*omega*/, + const amrex::Real /*unused*/, + const amrex::Real /*y*/, + const amrex::Real /*t*/) const; const int m_comp{1}; }; struct GpzExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real) const; + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/) const; const int m_comp{2}; }; @@ -98,7 +98,7 @@ public: void initialize_fields(int level, const amrex::Geometry& geom) override; template - amrex::Real compute_error(const Field&); + amrex::Real compute_error(const Field& /*field*/); void post_init_actions() override; diff --git a/amr-wind/physics/EkmanSpiral.H b/amr-wind/physics/EkmanSpiral.H index c8456786aa..603bbd0dfc 100644 --- a/amr-wind/physics/EkmanSpiral.H +++ b/amr-wind/physics/EkmanSpiral.H @@ -22,7 +22,7 @@ public: void initialize_fields(int level, const amrex::Geometry& geom) override; template - amrex::Real compute_error(const Field&); + amrex::Real compute_error(const Field& /*field*/); void post_init_actions() override; diff --git a/amr-wind/physics/SyntheticTurbulence.H b/amr-wind/physics/SyntheticTurbulence.H index 193c85dbad..e4c4271eae 100644 --- a/amr-wind/physics/SyntheticTurbulence.H +++ b/amr-wind/physics/SyntheticTurbulence.H @@ -172,8 +172,10 @@ public: void update(); template - void - update_impl(const SynthTurbDeviceData&, const InterpWeights&, const T&); + void update_impl( + const SynthTurbDeviceData& /*turb_grid*/, + const InterpWeights& /*weights*/, + const T& /*velfunc*/); private: const amr_wind::SimTime& m_time; diff --git a/amr-wind/physics/VortexRing.H b/amr-wind/physics/VortexRing.H index 3e1dac17c7..bc1e7d11c7 100644 --- a/amr-wind/physics/VortexRing.H +++ b/amr-wind/physics/VortexRing.H @@ -56,35 +56,35 @@ private: struct FatCore { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const int, - const int*, - const amrex::Real*, - const amrex::Real*) const; + const amrex::Real /*r*/, + const amrex::Real /*unused*/, + const amrex::Real /*z*/, + const amrex::Real /*R*/, + const amrex::Real /*Gamma*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/, + const int /*unused*/, + const int* /*unused*/, + const amrex::Real* /*unused*/, + const amrex::Real* /*unused*/) const; }; struct CollidingRings { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const amrex::Real, - const int, - const int*, - const amrex::Real*, - const amrex::Real*) const; + const amrex::Real /*r*/, + const amrex::Real /*theta*/, + const amrex::Real /*z*/, + const amrex::Real /*R*/, + const amrex::Real /*Gamma*/, + const amrex::Real /*delta*/, + const amrex::Real /*dz*/, + const amrex::Real /*perturbation_amplitude*/, + const int /*num_modes*/, + const int* /*perturbation_modes*/, + const amrex::Real* /*perturbation_phases_1*/, + const amrex::Real* /*perturbation_phases_2*/) const; }; } // namespace amr_wind diff --git a/amr-wind/physics/multiphase/MultiPhase.H b/amr-wind/physics/multiphase/MultiPhase.H index a620d74ba3..a5ad60df03 100644 --- a/amr-wind/physics/multiphase/MultiPhase.H +++ b/amr-wind/physics/multiphase/MultiPhase.H @@ -28,7 +28,9 @@ public: ~MultiPhase() override = default; - void initialize_fields(int, const amrex::Geometry&) override {} + void + initialize_fields(int /*level*/, const amrex::Geometry& /*geom*/) override + {} void post_init_actions() override; diff --git a/amr-wind/physics/udfs/LinearProfile.H b/amr-wind/physics/udfs/LinearProfile.H index 8f2feba766..db62b0bf98 100644 --- a/amr-wind/physics/udfs/LinearProfile.H +++ b/amr-wind/physics/udfs/LinearProfile.H @@ -25,8 +25,8 @@ struct LinearProfile const amrex::IntVect& iv, amrex::Array4 const& field, amrex::GeometryData const& geom, - const amrex::Real, - amrex::Orientation, + const amrex::Real /*unused*/, + amrex::Orientation /*unused*/, const int comp) const { const auto* problo = geom.ProbLo(); diff --git a/amr-wind/physics/udfs/PowerLawProfile.H b/amr-wind/physics/udfs/PowerLawProfile.H index af840b2486..4f5e40ab36 100644 --- a/amr-wind/physics/udfs/PowerLawProfile.H +++ b/amr-wind/physics/udfs/PowerLawProfile.H @@ -28,8 +28,8 @@ struct PowerLawProfile const amrex::IntVect& iv, amrex::Array4 const& field, amrex::GeometryData const& geom, - const amrex::Real, - amrex::Orientation, + const amrex::Real /*unused*/, + amrex::Orientation /*unused*/, const int comp) const { const auto* problo = geom.ProbLo(); diff --git a/amr-wind/physics/udfs/UDF.H b/amr-wind/physics/udfs/UDF.H index 0342379e39..1851f8f720 100644 --- a/amr-wind/physics/udfs/UDF.H +++ b/amr-wind/physics/udfs/UDF.H @@ -22,7 +22,7 @@ class ConstValue : public UDF::Register public: static std::string identifier() { return "ConstValue"; } - explicit ConstValue(Field&); + explicit ConstValue(Field& /*fld*/); void operator()(int level, const amrex::Geometry& geom) override; @@ -37,7 +37,7 @@ class UDFImpl : public UDF::Register> public: static std::string identifier() { return T::identifier(); } - explicit UDFImpl(Field&); + explicit UDFImpl(Field& /*fld*/); void operator()(int level, const amrex::Geometry& geom) override; diff --git a/amr-wind/utilities/DerivedQuantity.H b/amr-wind/utilities/DerivedQuantity.H index 8fd3117fa1..0ca50264a0 100644 --- a/amr-wind/utilities/DerivedQuantity.H +++ b/amr-wind/utilities/DerivedQuantity.H @@ -25,7 +25,7 @@ public: virtual void operator()(ScratchField& fld, const int scomp = 0) = 0; - virtual void var_names(amrex::Vector&); + virtual void var_names(amrex::Vector& /*plt_var_names*/); }; class DerivedQtyMgr @@ -50,7 +50,8 @@ public: bool contains(const std::string& key) const noexcept; //! Populate a vector of variable names (for output) - void var_names(amrex::Vector&) const noexcept; + void + var_names(amrex::Vector& /*plt_var_names*/) const noexcept; private: const FieldRepo& m_repo; diff --git a/amr-wind/utilities/DirectionSelector.H b/amr-wind/utilities/DirectionSelector.H index e11e0cd2a8..903c0d5880 100644 --- a/amr-wind/utilities/DirectionSelector.H +++ b/amr-wind/utilities/DirectionSelector.H @@ -20,19 +20,31 @@ struct DirectionSelector template <> struct DirectionSelector<0> { - AMREX_GPU_HOST_DEVICE int operator()(int i, int, int) const { return i; }; + AMREX_GPU_HOST_DEVICE int + operator()(int i, int /*unused*/, int /*unused*/) const + { + return i; + }; }; template <> struct DirectionSelector<1> { - AMREX_GPU_HOST_DEVICE int operator()(int, int j, int) const { return j; }; + AMREX_GPU_HOST_DEVICE int + operator()(int /*unused*/, int j, int /*unused*/) const + { + return j; + }; }; template <> struct DirectionSelector<2> { - AMREX_GPU_HOST_DEVICE int operator()(int, int, int k) const { return k; }; + AMREX_GPU_HOST_DEVICE int + operator()(int /*unused*/, int /*unused*/, int k) const + { + return k; + }; }; using XDir = DirectionSelector<0>; diff --git a/amr-wind/utilities/IOManager.H b/amr-wind/utilities/IOManager.H index 17843dcc18..7919b43378 100644 --- a/amr-wind/utilities/IOManager.H +++ b/amr-wind/utilities/IOManager.H @@ -31,7 +31,7 @@ class DerivedQtyMgr; class IOManager { public: - explicit IOManager(CFDSim&); + explicit IOManager(CFDSim& /*sim*/); ~IOManager(); @@ -86,9 +86,9 @@ public: const amrex::Vector& plot_fields() const { return m_plt_fields; } private: - void write_header(const std::string&, const int start_level); + void write_header(const std::string& /*chkname*/, const int start_level); - void write_info_file(const std::string&); + void write_info_file(const std::string& /*path*/); CFDSim& m_sim; diff --git a/amr-wind/utilities/averaging/ReAveraging.H b/amr-wind/utilities/averaging/ReAveraging.H index b3d977a962..bbf4bc9a01 100644 --- a/amr-wind/utilities/averaging/ReAveraging.H +++ b/amr-wind/utilities/averaging/ReAveraging.H @@ -13,7 +13,7 @@ class ReAveraging : public FieldTimeAverage::Register public: static std::string identifier() { return "ReAveraging"; } - ReAveraging(CFDSim&, const std::string& fname); + ReAveraging(CFDSim& /*sim*/, const std::string& fname); /** Update field averaging at a given timestep * @@ -22,8 +22,10 @@ public: * * \param elapsed_time Time elapsed since averaging was initiated */ - void - operator()(const SimTime&, const amrex::Real, const amrex::Real) override; + void operator()( + const SimTime& /*unused*/, + const amrex::Real /*unused*/, + const amrex::Real /*unused*/) override; const std::string& average_field_name() override; diff --git a/amr-wind/utilities/averaging/ReynoldsStress.H b/amr-wind/utilities/averaging/ReynoldsStress.H index 4ce70e8ec8..e5ea6f9daa 100644 --- a/amr-wind/utilities/averaging/ReynoldsStress.H +++ b/amr-wind/utilities/averaging/ReynoldsStress.H @@ -17,7 +17,7 @@ class ReynoldsStress : public FieldTimeAverage::Register public: static std::string identifier() { return "ReynoldsStress"; } - ReynoldsStress(CFDSim&, const std::string& fname); + ReynoldsStress(CFDSim& /*sim*/, const std::string& fname); /** Update field averaging at a given timestep * @@ -26,8 +26,10 @@ public: * * \param elapsed_time Time elapsed since averaging was initiated */ - void - operator()(const SimTime&, const amrex::Real, const amrex::Real) override; + void operator()( + const SimTime& /*time*/, + const amrex::Real /*filter_width*/, + const amrex::Real /*elapsed_time*/) override; const std::string& average_field_name() override; diff --git a/amr-wind/utilities/averaging/TimeAveraging.H b/amr-wind/utilities/averaging/TimeAveraging.H index 28dbf51f5a..c7f0ccf338 100644 --- a/amr-wind/utilities/averaging/TimeAveraging.H +++ b/amr-wind/utilities/averaging/TimeAveraging.H @@ -51,7 +51,7 @@ class TimeAveraging : public PostProcessBase::Register public: static std::string identifier() { return "TimeAveraging"; } - TimeAveraging(CFDSim&, std::string); + TimeAveraging(CFDSim& /*sim*/, std::string /*label*/); ~TimeAveraging() override; diff --git a/amr-wind/utilities/console_io.H b/amr-wind/utilities/console_io.H index 4b17b3f0fc..a1b4465bab 100644 --- a/amr-wind/utilities/console_io.H +++ b/amr-wind/utilities/console_io.H @@ -7,19 +7,19 @@ namespace amr_wind { namespace io { -void print_banner(MPI_Comm, std::ostream&); +void print_banner(MPI_Comm /*comm*/, std::ostream& /*out*/); -void print_usage(MPI_Comm, std::ostream&); +void print_usage(MPI_Comm /*comm*/, std::ostream& /*out*/); -void print_error(MPI_Comm, const std::string& msg); +void print_error(MPI_Comm /*comm*/, const std::string& msg); void print_summary(std::ostream&); -void print_mlmg_header(const std::string&); +void print_mlmg_header(const std::string& /*key*/); void print_mlmg_info(const std::string& solve_name, const amrex::MLMG& mlmg); -void print_tpls(std::ostream&); +void print_tpls(std::ostream& /*out*/); } // namespace io } // namespace amr_wind diff --git a/amr-wind/utilities/sampling/DTUSpinnerSampler.H b/amr-wind/utilities/sampling/DTUSpinnerSampler.H index b093ee3414..a3b4028c2f 100644 --- a/amr-wind/utilities/sampling/DTUSpinnerSampler.H +++ b/amr-wind/utilities/sampling/DTUSpinnerSampler.H @@ -21,7 +21,7 @@ class DTUSpinnerSampler : public LidarSampler public: static std::string identifier() { return "DTUSpinnerSampler"; } - explicit DTUSpinnerSampler(const CFDSim&); + explicit DTUSpinnerSampler(const CFDSim& /*sim*/); /** Read user inputs and initialize the sampling object * @@ -34,7 +34,7 @@ public: * */ //~ void update_sampling_locations() override; - void sampling_locations(SampleLocType&) const override; + void sampling_locations(SampleLocType& /*locs*/) const override; /** Determine how the subsampling will be done * @@ -43,12 +43,16 @@ public: int num_points() const override { return (m_npts * m_ns); } - bool output_netcdf_field(double*, ncutils::NCVar&) override; + bool output_netcdf_field( + double* /*unused*/, ncutils::NCVar& /*unused*/) override; - void define_netcdf_metadata(const ncutils::NCGroup&) const override; - void populate_netcdf_metadata(const ncutils::NCGroup&) const override; void - output_netcdf_data(const ncutils::NCGroup&, const size_t) const override; + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void + populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void output_netcdf_data( + const ncutils::NCGroup& /*unused*/, + const size_t /*unused*/) const override; private: int m_ns{1}; diff --git a/amr-wind/utilities/sampling/Enstrophy.H b/amr-wind/utilities/sampling/Enstrophy.H index c29d8647c1..4cf548fc66 100644 --- a/amr-wind/utilities/sampling/Enstrophy.H +++ b/amr-wind/utilities/sampling/Enstrophy.H @@ -19,7 +19,7 @@ class Enstrophy : public PostProcessBase::Register public: static std::string identifier() { return "Enstrophy"; } - Enstrophy(CFDSim&, std::string); + Enstrophy(CFDSim& /*sim*/, std::string /*label*/); ~Enstrophy() override; diff --git a/amr-wind/utilities/sampling/FieldNorms.H b/amr-wind/utilities/sampling/FieldNorms.H index 0428a10689..70a5e3f4f5 100644 --- a/amr-wind/utilities/sampling/FieldNorms.H +++ b/amr-wind/utilities/sampling/FieldNorms.H @@ -19,7 +19,7 @@ class FieldNorms : public PostProcessBase::Register public: static std::string identifier() { return "FieldNorms"; } - FieldNorms(CFDSim&, std::string); + FieldNorms(CFDSim& /*sim*/, std::string /*label*/); ~FieldNorms() override; diff --git a/amr-wind/utilities/sampling/FreeSurface.H b/amr-wind/utilities/sampling/FreeSurface.H index 7d280901c4..152d3a223d 100644 --- a/amr-wind/utilities/sampling/FreeSurface.H +++ b/amr-wind/utilities/sampling/FreeSurface.H @@ -32,7 +32,7 @@ class FreeSurface : public PostProcessBase::Register public: static std::string identifier() { return "FreeSurface"; } - FreeSurface(CFDSim&, std::string); + FreeSurface(CFDSim& /*sim*/, std::string /*label*/); ~FreeSurface() override; diff --git a/amr-wind/utilities/sampling/KineticEnergy.H b/amr-wind/utilities/sampling/KineticEnergy.H index fe4445b241..99e96cbc70 100644 --- a/amr-wind/utilities/sampling/KineticEnergy.H +++ b/amr-wind/utilities/sampling/KineticEnergy.H @@ -19,7 +19,7 @@ class KineticEnergy : public PostProcessBase::Register public: static std::string identifier() { return "KineticEnergy"; } - KineticEnergy(CFDSim&, std::string); + KineticEnergy(CFDSim& /*sim*/, std::string /*label*/); ~KineticEnergy() override; diff --git a/amr-wind/utilities/sampling/LidarSampler.H b/amr-wind/utilities/sampling/LidarSampler.H index 7bb6656ba0..f0b7280041 100644 --- a/amr-wind/utilities/sampling/LidarSampler.H +++ b/amr-wind/utilities/sampling/LidarSampler.H @@ -21,7 +21,7 @@ class LidarSampler : public LineSampler public: static std::string identifier() { return "LidarSampler"; } - explicit LidarSampler(const CFDSim&); + explicit LidarSampler(const CFDSim& /*sim*/); /** Read user inputs and initialize the sampling object * @@ -35,10 +35,13 @@ public: */ void update_sampling_locations() override; - void define_netcdf_metadata(const ncutils::NCGroup&) const override; - void populate_netcdf_metadata(const ncutils::NCGroup&) const override; void - output_netcdf_data(const ncutils::NCGroup&, const size_t) const override; + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void + populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void output_netcdf_data( + const ncutils::NCGroup& /*unused*/, + const size_t /*unused*/) const override; protected: amrex::Vector m_origin; diff --git a/amr-wind/utilities/sampling/LineSampler.H b/amr-wind/utilities/sampling/LineSampler.H index 3b5af1ce16..ae6b15fe79 100644 --- a/amr-wind/utilities/sampling/LineSampler.H +++ b/amr-wind/utilities/sampling/LineSampler.H @@ -18,7 +18,7 @@ class LineSampler : public SamplerBase::Register public: static std::string identifier() { return "LineSampler"; } - explicit LineSampler(const CFDSim&); + explicit LineSampler(const CFDSim& /*sim*/); ~LineSampler() override; @@ -31,10 +31,12 @@ public: void check_bounds(); //! Populate and return a vector of probe locations to be sampled - void sampling_locations(SampleLocType&) const override; + void sampling_locations(SampleLocType& /*locs*/) const override; - void define_netcdf_metadata(const ncutils::NCGroup&) const override; - void populate_netcdf_metadata(const ncutils::NCGroup&) const override; + void + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void + populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; //! Name of this sampling object std::string label() const override { return m_label; } diff --git a/amr-wind/utilities/sampling/PlaneSampler.H b/amr-wind/utilities/sampling/PlaneSampler.H index 83bdf41121..fbcf39e2ac 100644 --- a/amr-wind/utilities/sampling/PlaneSampler.H +++ b/amr-wind/utilities/sampling/PlaneSampler.H @@ -29,7 +29,7 @@ class PlaneSampler : public SamplerBase::Register public: static std::string identifier() { return "PlaneSampler"; } - explicit PlaneSampler(const CFDSim&); + explicit PlaneSampler(const CFDSim& /*unused*/); ~PlaneSampler() override; @@ -40,10 +40,12 @@ public: void initialize(const std::string& key) override; //! Populate and return a vector of probe locations to be sampled - void sampling_locations(SampleLocType&) const override; + void sampling_locations(SampleLocType& /*locs*/) const override; - void define_netcdf_metadata(const ncutils::NCGroup&) const override; - void populate_netcdf_metadata(const ncutils::NCGroup&) const override; + void + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; + void + populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; //! Name of this sampling object std::string label() const override { return m_label; } diff --git a/amr-wind/utilities/sampling/ProbeSampler.H b/amr-wind/utilities/sampling/ProbeSampler.H index aad6a5bb4f..58a91e2904 100644 --- a/amr-wind/utilities/sampling/ProbeSampler.H +++ b/amr-wind/utilities/sampling/ProbeSampler.H @@ -17,15 +17,16 @@ class ProbeSampler : public SamplerBase::Register public: static std::string identifier() { return "ProbeSampler"; } - explicit ProbeSampler(const CFDSim&); + explicit ProbeSampler(const CFDSim& /*unused*/); ~ProbeSampler() override; void initialize(const std::string& key) override; - void sampling_locations(SampleLocType&) const override; + void sampling_locations(SampleLocType& /*locs*/) const override; - void define_netcdf_metadata(const ncutils::NCGroup&) const override; + void + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; std::string label() const override { return m_label; } std::string& label() override { return m_label; } diff --git a/amr-wind/utilities/sampling/SamplerBase.H b/amr-wind/utilities/sampling/SamplerBase.H index 49e2a33f39..5347e303b0 100644 --- a/amr-wind/utilities/sampling/SamplerBase.H +++ b/amr-wind/utilities/sampling/SamplerBase.H @@ -49,12 +49,21 @@ public: virtual void update_sampling_locations() {} //! Run specific output for the sampler - virtual bool output_netcdf_field(double*, ncutils::NCVar&) { return true; } + virtual bool + output_netcdf_field(double* /*unused*/, ncutils::NCVar& /*unused*/) + { + return true; + } //! Populate metadata in the NetCDF file - virtual void define_netcdf_metadata(const ncutils::NCGroup&) const {} - virtual void populate_netcdf_metadata(const ncutils::NCGroup&) const {} - virtual void output_netcdf_data(const ncutils::NCGroup&, const size_t) const + virtual void + define_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const + {} + virtual void + populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const + {} + virtual void output_netcdf_data( + const ncutils::NCGroup& /*unused*/, const size_t /*unused*/) const {} }; diff --git a/amr-wind/utilities/sampling/Sampling.H b/amr-wind/utilities/sampling/Sampling.H index 75e9206a99..9cd033c2a0 100644 --- a/amr-wind/utilities/sampling/Sampling.H +++ b/amr-wind/utilities/sampling/Sampling.H @@ -42,7 +42,7 @@ class Sampling : public PostProcessBase::Register public: static std::string identifier() { return "Sampling"; } - Sampling(CFDSim&, std::string); + Sampling(CFDSim& /*sim*/, std::string /*label*/); ~Sampling() override; diff --git a/amr-wind/utilities/sampling/SamplingContainer.H b/amr-wind/utilities/sampling/SamplingContainer.H index 1a691352cc..d7133ac934 100644 --- a/amr-wind/utilities/sampling/SamplingContainer.H +++ b/amr-wind/utilities/sampling/SamplingContainer.H @@ -79,8 +79,8 @@ public: /** Create particle information for all the sampling locations */ - void - initialize_particles(const amrex::Vector>&); + void initialize_particles( + const amrex::Vector>& /*samplers*/); //! Perform field interpolation to sampling locations void interpolate_fields(const amrex::Vector fields); diff --git a/amr-wind/utilities/tagging/BoxRefiner.H b/amr-wind/utilities/tagging/BoxRefiner.H index 2e800bb3b4..14296d9022 100644 --- a/amr-wind/utilities/tagging/BoxRefiner.H +++ b/amr-wind/utilities/tagging/BoxRefiner.H @@ -22,12 +22,12 @@ class BoxRefiner : public GeometryType::Register public: static std::string identifier() { return "box"; } - BoxRefiner(const CFDSim&, const std::string& key); + BoxRefiner(const CFDSim& /*unused*/, const std::string& key); ~BoxRefiner() override = default; void operator()( - const amrex::Box&, + const amrex::Box& /*bx*/, const amrex::Geometry& geom, const amrex::Array4& tags) const override; diff --git a/amr-wind/utilities/tagging/CartBoxRefinement.H b/amr-wind/utilities/tagging/CartBoxRefinement.H index 702e1933b7..bd70a39dcb 100644 --- a/amr-wind/utilities/tagging/CartBoxRefinement.H +++ b/amr-wind/utilities/tagging/CartBoxRefinement.H @@ -35,7 +35,7 @@ public: //! Helper function to process inputs //! //! Created separate from initialize to allow unit testing - void read_inputs(const amrex::AmrCore&, std::istream&); + void read_inputs(const amrex::AmrCore& /*mesh*/, std::istream& /*ifh*/); //! Vector of boxarrays that define refinement zones at each level const amrex::Vector& boxarray_vec() const diff --git a/amr-wind/utilities/tagging/CylinderRefiner.H b/amr-wind/utilities/tagging/CylinderRefiner.H index bc667e2952..a7da1c070e 100644 --- a/amr-wind/utilities/tagging/CylinderRefiner.H +++ b/amr-wind/utilities/tagging/CylinderRefiner.H @@ -20,12 +20,12 @@ class CylinderRefiner : public GeometryType::Register public: static std::string identifier() { return "cylinder"; } - CylinderRefiner(const CFDSim&, const std::string& key); + CylinderRefiner(const CFDSim& /*unused*/, const std::string& key); ~CylinderRefiner() override = default; void operator()( - const amrex::Box&, + const amrex::Box& /*bx*/, const amrex::Geometry& geom, const amrex::Array4& tags) const override; diff --git a/amr-wind/utilities/tagging/GeometryRefinement.H b/amr-wind/utilities/tagging/GeometryRefinement.H index 69261be41e..487d754043 100644 --- a/amr-wind/utilities/tagging/GeometryRefinement.H +++ b/amr-wind/utilities/tagging/GeometryRefinement.H @@ -36,7 +36,7 @@ class GeometryRefinement public: static std::string identifier() { return "GeometryRefinement"; } - explicit GeometryRefinement(const CFDSim&); + explicit GeometryRefinement(const CFDSim& /*sim*/); ~GeometryRefinement() override = default; diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.H b/amr-wind/wind_energy/ABLBoundaryPlane.H index 3994d7cd4a..4aae1d6828 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.H +++ b/amr-wind/wind_energy/ABLBoundaryPlane.H @@ -31,12 +31,14 @@ class InletData public: InletData() = default; - void resize(const int); + void resize(const int /*size*/); - void define_plane(const amrex::Orientation); + void define_plane(const amrex::Orientation /*ori*/); void define_level_data( - const amrex::Orientation, const amrex::Box&, const size_t); + const amrex::Orientation /*ori*/, + const amrex::Box& /*bx*/, + const size_t /*nc*/); #ifdef AMR_WIND_USE_NETCDF void read_data( @@ -53,12 +55,12 @@ public: amrex::BndryRegister& bndry_n, amrex::BndryRegister& bndry_np1, const int lev, - const Field*, + const Field* /*fld*/, const amrex::Real time, - const amrex::Vector&); + const amrex::Vector& /*times*/); - void interpolate(const amrex::Real); - bool is_populated(amrex::Orientation) const; + void interpolate(const amrex::Real /*time*/); + bool is_populated(amrex::Orientation /*ori*/) const; const amrex::FArrayBox& interpolate_data(const amrex::Orientation ori, const int lev) const { @@ -109,7 +111,7 @@ class ABLBoundaryPlane static_assert(AMREX_SPACEDIM == 3, "ABL requires 3 dimensional mesh"); public: - explicit ABLBoundaryPlane(CFDSim&); + explicit ABLBoundaryPlane(CFDSim& /*sim*/); //! Execute initialization actions after mesh has been fully generated void post_init_actions(); @@ -128,8 +130,11 @@ public: void read_file(); - void - populate_data(const int, const amrex::Real, Field&, amrex::MultiFab&) const; + void populate_data( + const int /*lev*/, + const amrex::Real /*time*/, + Field& /*fld*/, + amrex::MultiFab& /*mfab*/) const; #ifdef AMR_WIND_USE_NETCDF void impl_buffer_field( @@ -145,7 +150,9 @@ public: bool is_initialized() const { return m_is_initialized; } bool box_intersects_boundary( - const amrex::Box&, const int, const amrex::Orientation) const; + const amrex::Box& /*bx*/, + const int /*lev*/, + const amrex::Orientation /*ori*/) const; private: const amr_wind::SimTime& m_time; diff --git a/amr-wind/wind_energy/ABLStats.H b/amr-wind/wind_energy/ABLStats.H index 1cfd3ef826..7b0447ad38 100644 --- a/amr-wind/wind_energy/ABLStats.H +++ b/amr-wind/wind_energy/ABLStats.H @@ -32,7 +32,10 @@ class ABLStats : public ABLStatsBase::Register public: static std::string identifier() { return "precursor"; } - ABLStats(CFDSim&, const ABLWallFunction&, const int dir); + ABLStats( + CFDSim& /*sim*/, + const ABLWallFunction& /*abl_wall_func*/, + const int dir); ~ABLStats() override; diff --git a/amr-wind/wind_energy/actuator/Actuator.H b/amr-wind/wind_energy/actuator/Actuator.H index 978b2f2f0a..9213a8c60b 100644 --- a/amr-wind/wind_energy/actuator/Actuator.H +++ b/amr-wind/wind_energy/actuator/Actuator.H @@ -31,11 +31,13 @@ class Actuator : public Physics::Register public: static std::string identifier() { return "Actuator"; } - explicit Actuator(CFDSim&); + explicit Actuator(CFDSim& /*sim*/); ~Actuator() override; - void initialize_fields(int, const amrex::Geometry&) override {} + void + initialize_fields(int /*level*/, const amrex::Geometry& /*geom*/) override + {} void pre_init_actions() override; diff --git a/amr-wind/wind_energy/actuator/actuator_ops.H b/amr-wind/wind_energy/actuator/actuator_ops.H index 309b5dcaa6..e3fc6d8f38 100644 --- a/amr-wind/wind_energy/actuator/actuator_ops.H +++ b/amr-wind/wind_energy/actuator/actuator_ops.H @@ -80,7 +80,7 @@ struct ProcessOutputsOp; * mapped. */ template -void determine_influenced_procs(typename T::DataType&); +void determine_influenced_procs(typename T::DataType& /*data*/); /** During initialization determine the influenced processes and elect a root * process to manage I/O and external solver interfaces for this turbine. @@ -91,7 +91,8 @@ void determine_influenced_procs(typename T::DataType&); * \param act_proc_count A map of the number of turbines managed by each proc */ template -void determine_root_proc(typename T::DataType&, amrex::Vector&); +void determine_root_proc( + typename T::DataType& /*data*/, amrex::Vector& /*act_proc_count*/); } // namespace ops } // namespace actuator diff --git a/amr-wind/wind_energy/actuator/actuator_utils.H b/amr-wind/wind_energy/actuator/actuator_utils.H index 1f1de292c1..05070bde00 100644 --- a/amr-wind/wind_energy/actuator/actuator_utils.H +++ b/amr-wind/wind_energy/actuator/actuator_utils.H @@ -29,7 +29,8 @@ namespace utils { std::set determine_influenced_procs( const amrex::AmrCore& mesh, const amrex::RealBox& rbx); -void determine_root_proc(ActInfo&, amrex::Vector&); +void determine_root_proc( + ActInfo& /*info*/, amrex::Vector& /*act_proc_count*/); /** Return the Gaussian smearing factor in 3D * diff --git a/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H b/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H index 4d8227ef5d..40ce77dab6 100644 --- a/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H +++ b/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H @@ -11,14 +11,17 @@ namespace actuator { namespace disk { // refactor these when we add more disk types later void prepare_netcdf_file( - const std::string&, const UniformCtData&, const ActInfo&, const ActGrid&); + const std::string& /*ncfile*/, + const UniformCtData& /*meta*/, + const ActInfo& /*info*/, + const ActGrid& /*grid*/); void write_netcdf( - const std::string&, - const UniformCtData&, - const ActInfo&, - const ActGrid&, - const amrex::Real); + const std::string& /*ncfile*/, + const UniformCtData& /*meta*/, + const ActInfo& /*info*/, + const ActGrid& /*unused*/, + const amrex::Real /*time*/); } // namespace disk namespace ops { @@ -162,7 +165,7 @@ struct ComputeForceOp template <> struct UpdatePosOp { - void operator()(UniformCt::DataType&) {} + void operator()(UniformCt::DataType& /*unused*/) {} }; template <> @@ -184,7 +187,7 @@ public: explicit ProcessOutputsOp(UniformCt::DataType& data) : m_data(data) {} - void operator()(UniformCt::DataType&) {} + void operator()(UniformCt::DataType& /*unused*/) {} void read_io_options(const utils::ActParser& pp) { pp.query("output_frequency", m_out_freq); diff --git a/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H b/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H index 744b7ef21f..b019c37163 100644 --- a/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H +++ b/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H @@ -26,7 +26,8 @@ public: ~FastIface() override; - void parse_inputs(const amr_wind::CFDSim&, const std::string&); + void parse_inputs( + const amr_wind::CFDSim& /*sim*/, const std::string& /*inp_name*/); int register_turbine(FastTurbine& data); @@ -43,18 +44,20 @@ public: protected: void allocate_fast_turbines(); - void fast_init_turbine(FastTurbine&); + void fast_init_turbine(FastTurbine& /*fi*/); - void fast_restart_turbine(FastTurbine&); + void fast_restart_turbine(FastTurbine& /*unused*/); - void fast_replay_turbine(FastTurbine&); + void fast_replay_turbine(FastTurbine& /*fi*/); - void prepare_netcdf_file(FastTurbine&); + void prepare_netcdf_file(FastTurbine& /*unused*/); - void write_velocity_data(const FastTurbine&); + void write_velocity_data(const FastTurbine& /*unused*/); - void - read_velocity_data(FastTurbine&, const ncutils::NCFile&, const size_t tid); + void read_velocity_data( + FastTurbine& /*unused*/, + const ncutils::NCFile& /*unused*/, + const size_t tid); //! Global to local index lookup map std::map m_turbine_map; diff --git a/amr-wind/wind_energy/actuator/turbine/fast/fast_wrapper.H b/amr-wind/wind_energy/actuator/turbine/fast/fast_wrapper.H index 1196ff8df9..659a47ed36 100644 --- a/amr-wind/wind_energy/actuator/turbine/fast/fast_wrapper.H +++ b/amr-wind/wind_energy/actuator/turbine/fast/fast_wrapper.H @@ -38,12 +38,17 @@ struct SC_OutputType inline constexpr int fast_strlen() { return 1025; } -inline void exw_fast_output_redirect(char*) {} +inline void exw_fast_output_redirect(char* /*unused*/) {} -inline void FAST_AllocateTurbines(int*, int*, char*) {} -inline void FAST_DeallocateTurbines(int*, char*) {} -inline void FAST_OpFM_Solution0(int*, int*, char*) {} -inline void FAST_OpFM_Step(int*, int*, char*) {} +inline void +FAST_AllocateTurbines(int* /*unused*/, int* /*unused*/, char* /*unused*/) +{} +inline void FAST_DeallocateTurbines(int* /*unused*/, char* /*unused*/) {} +inline void +FAST_OpFM_Solution0(int* /*unused*/, int* /*unused*/, char* /*unused*/) +{} +inline void FAST_OpFM_Step(int* /*unused*/, int* /*unused*/, char* /*unused*/) +{} // clang-format off #ifdef AMR_WIND_FAST_USE_SCDX @@ -59,14 +64,14 @@ inline void FAST_OpFM_Restart( SC_DX_InputType*, SC_DX_OutputType*, int*, char*) {} #else inline void FAST_OpFM_Init( - int*, double*, const char*, int*, int*, int*, int*, int*, float*, - int*, double*, int*, int*, OpFM_InputType*, OpFM_OutputType*, - SC_InputType*, SC_OutputType*, int*, char*) {} + int* /*unused*/, double* /*unused*/, const char* /*unused*/, int* /*unused*/, int* /*unused*/, int* /*unused*/, int* /*unused*/, int* /*unused*/, float* /*unused*/, + int* /*unused*/, double* /*unused*/, int* /*unused*/, int* /*unused*/, OpFM_InputType* /*unused*/, OpFM_OutputType* /*unused*/, + SC_InputType* /*unused*/, SC_OutputType* /*unused*/, int* /*unused*/, char* /*unused*/) {} inline void FAST_OpFM_Restart( - int*, char*, int*, double*, int*, int*, int*, - OpFM_InputType*, OpFM_OutputType*, - SC_InputType*, SC_OutputType*, int*, char*) {} + int* /*unused*/, char* /*unused*/, int* /*unused*/, double* /*unused*/, int* /*unused*/, int* /*unused*/, int* /*unused*/, + OpFM_InputType* /*unused*/, OpFM_OutputType* /*unused*/, + SC_InputType* /*unused*/, SC_OutputType* /*unused*/, int* /*unused*/, char* /*unused*/) {} #endif // clang-format on #endif diff --git a/amr-wind/wind_energy/actuator/turbine/turbine_utils.H b/amr-wind/wind_energy/actuator/turbine/turbine_utils.H index 6e140681b2..6e65199fb1 100644 --- a/amr-wind/wind_energy/actuator/turbine/turbine_utils.H +++ b/amr-wind/wind_energy/actuator/turbine/turbine_utils.H @@ -11,17 +11,17 @@ void read_inputs( TurbineBaseData& tdata, TurbineInfo& info, const utils::ActParser& pp); void prepare_netcdf_file( - const std::string&, - const TurbineBaseData&, - const TurbineInfo&, - const ActGrid&); + const std::string& /*ncfile*/, + const TurbineBaseData& /*meta*/, + const TurbineInfo& /*info*/, + const ActGrid& /*grid*/); void write_netcdf( - const std::string&, - const TurbineBaseData&, - const TurbineInfo&, - const ActGrid&, - const amrex::Real); + const std::string& /*ncfile*/, + const TurbineBaseData& /*meta*/, + const TurbineInfo& /*info*/, + const ActGrid& /*grid*/, + const amrex::Real /*time*/); } // namespace utils } // namespace actuator diff --git a/amr-wind/wind_energy/actuator/wing/wing_ops.H b/amr-wind/wind_energy/actuator/wing/wing_ops.H index bca693f26d..7fbe4c7d34 100644 --- a/amr-wind/wind_energy/actuator/wing/wing_ops.H +++ b/amr-wind/wind_energy/actuator/wing/wing_ops.H @@ -13,21 +13,25 @@ namespace wing { /** Parse common data for modeling fixed wings as actuators */ -void read_inputs(WingBaseData&, ActInfo&, const utils::ActParser&); +void read_inputs( + WingBaseData& /*wdata*/, ActInfo& /*info*/, const utils::ActParser& /*pp*/); /** Initialize core data structures when modeling fixed wings */ -void init_data_structures(WingBaseData&, ActGrid&); +void init_data_structures(WingBaseData& /*wdata*/, ActGrid& /*grid*/); void prepare_netcdf_file( - const std::string&, const WingBaseData&, const ActInfo&, const ActGrid&); + const std::string& /*ncfile*/, + const WingBaseData& /*meta*/, + const ActInfo& /*info*/, + const ActGrid& /*grid*/); void write_netcdf( - const std::string&, - const WingBaseData&, - const ActInfo&, - const ActGrid&, - const amrex::Real); + const std::string& /*ncfile*/, + const WingBaseData& /*meta*/, + const ActInfo& /*info*/, + const ActGrid& /*grid*/, + const amrex::Real /*time*/); } // namespace wing @@ -54,7 +58,7 @@ struct UpdatePosOp< std::is_base_of::value && UseDefaultOp::update_pos>::type> { - void operator()(typename ActTrait::DataType&) {} + void operator()(typename ActTrait::DataType& /*unused*/) {} }; template @@ -65,7 +69,7 @@ struct UpdateVelOp< std::is_base_of::value && UseDefaultOp::update_vel>::type> { - void operator()(typename ActTrait::DataType&) {} + void operator()(typename ActTrait::DataType& /*unused*/) {} }; template diff --git a/unit_tests/core/physics_test_utils.H b/unit_tests/core/physics_test_utils.H index d68edaae3f..4cf6be4ae7 100644 --- a/unit_tests/core/physics_test_utils.H +++ b/unit_tests/core/physics_test_utils.H @@ -12,13 +12,14 @@ class PhysicsEx : public amr_wind::Physics::Register public: static std::string identifier() { return "PhysicsEx"; } - explicit PhysicsEx(amr_wind::CFDSim&); + explicit PhysicsEx(amr_wind::CFDSim& /*unused*/); ~PhysicsEx() override = default; void post_init_actions() override; void post_regrid_actions() override; - void initialize_fields(int, const amrex::Geometry&) override; + void + initialize_fields(int /*level*/, const amrex::Geometry& /*geom*/) override; void pre_advance_work() override; void post_advance_work() override; };