diff --git a/.clang-tidy b/.clang-tidy index d5afff2abc..3cad7ee0e7 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,-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,-modernize-make-unique' WarningsAsErrors: '' HeaderFilterRegex: '.*' AnalyzeTemporaryDtors: false diff --git a/amr-wind/boundary_conditions/BCInterface.H b/amr-wind/boundary_conditions/BCInterface.H index cafda6f818..2f64f7f998 100644 --- a/amr-wind/boundary_conditions/BCInterface.H +++ b/amr-wind/boundary_conditions/BCInterface.H @@ -43,7 +43,7 @@ public: virtual ~BCIface() = default; //! Operator that performs init actions and syncs the BC data to device - virtual void operator()(const amrex::Real value = 0.0); + virtual void operator()(amrex::Real value = 0.0); //! User-defined functions for Dirichlet-type boundaries std::pair get_dirichlet_udfs(); @@ -62,7 +62,7 @@ protected: virtual void set_bcfuncs(); //! Set default BC values for the field - inline void set_default_value(const amrex::Real value); + inline void set_default_value(amrex::Real value); //! Set AMReX mathematical boundary types for the lower boundaries inline void diff --git a/amr-wind/boundary_conditions/FixedGradientBC.H b/amr-wind/boundary_conditions/FixedGradientBC.H index b4f6bb7faa..769cd5d4c8 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 /*rho_state*/) override; + void operator()(Field& field, FieldState /*rho_state*/) override; private: Field& m_field; diff --git a/amr-wind/core/Field.H b/amr-wind/core/Field.H index 20bfe1445f..9337577750 100644 --- a/amr-wind/core/Field.H +++ b/amr-wind/core/Field.H @@ -31,11 +31,7 @@ struct FieldInfo static constexpr int max_field_states = 5; FieldInfo( - std::string basename, - const int ncomp, - const int ngrow, - const int nstates, - const FieldLoc floc); + std::string basename, int ncomp, int ngrow, int nstates, FieldLoc floc); ~FieldInfo(); @@ -222,7 +218,7 @@ public: */ void set_default_fillpatch_bc( const SimTime& time, - const amrex::BCType::mathematicalBndryTypes bctype = + amrex::BCType::mathematicalBndryTypes bctype = amrex::BCType::hoextrap) noexcept; /** Map field to the uniform mesh @@ -244,8 +240,8 @@ public: void to_stretched_space() noexcept; //! Return field at a different time state - Field& state(const FieldState fstate); - const Field& state(const FieldState fstate) const; + Field& state(FieldState fstate); + const Field& state(FieldState fstate) const; //! Return MultiFab instance for a given level amrex::MultiFab& operator()(int lev) noexcept; @@ -264,7 +260,7 @@ public: void copy_state(FieldState to_state, FieldState from_state) noexcept; //! Create a new time state after the field has been created - Field& create_state(const FieldState fstate) noexcept; + Field& create_state(FieldState fstate) noexcept; // NOTE: We break naming rules for methods here to provide 1-1 mapping with // the underlying MultiFab method names. @@ -322,7 +318,7 @@ public: void fillphysbc(amrex::Real time) noexcept; void fillphysbc(amrex::Real time, amrex::IntVect ng) noexcept; - void apply_bc_funcs(const FieldState rho_state) noexcept; + void apply_bc_funcs(FieldState rho_state) noexcept; void fillpatch( int lev, @@ -383,7 +379,7 @@ protected: FieldRepo& repo, std::string name, std::shared_ptr finfo, - const unsigned fid, + unsigned fid, FieldState state); //! Reference to the FieldRepository instance diff --git a/amr-wind/core/FieldBCOps.H b/amr-wind/core/FieldBCOps.H index 95384f1c7a..7f3e97a10c 100644 --- a/amr-wind/core/FieldBCOps.H +++ b/amr-wind/core/FieldBCOps.H @@ -33,7 +33,7 @@ class FieldBCIface public: virtual ~FieldBCIface() = default; - virtual void operator()(Field& field, const FieldState rho_state) = 0; + virtual void operator()(Field& field, FieldState rho_state) = 0; }; /** A no-op BC diff --git a/amr-wind/core/FieldFillPatchOps.H b/amr-wind/core/FieldFillPatchOps.H index 5beba2cd6b..21c34902b0 100644 --- a/amr-wind/core/FieldFillPatchOps.H +++ b/amr-wind/core/FieldFillPatchOps.H @@ -48,7 +48,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) = 0; + FieldState fstate = FieldState::New) = 0; //! Implementation that handles filling patches from a coarse to fine level virtual void fillpatch_from_coarse( @@ -56,7 +56,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) = 0; + FieldState fstate = FieldState::New) = 0; //! Implementation that handles filling physical boundary conditions virtual void fillphysbc( @@ -64,14 +64,14 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) = 0; + FieldState fstate = FieldState::New) = 0; virtual void set_inflow( int lev, amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) = 0; + FieldState fstate = FieldState::New) = 0; }; /** Implementation that just fills a constant value on newly created grids diff --git a/amr-wind/core/FieldRepo.H b/amr-wind/core/FieldRepo.H index 3d1cbc9216..b5b7d5c013 100644 --- a/amr-wind/core/FieldRepo.H +++ b/amr-wind/core/FieldRepo.H @@ -137,10 +137,10 @@ public: */ Field& declare_field( const std::string& name, - const int ncomp = 1, - const int ngrow = 0, - const int nstates = 1, - const FieldLoc floc = FieldLoc::CELL); + int ncomp = 1, + int ngrow = 0, + int nstates = 1, + FieldLoc floc = FieldLoc::CELL); /** Declare a cell-centered field * @@ -238,8 +238,7 @@ public: /** Return a previously created field identified by name and time state */ Field& get_field( - const std::string& name, - const FieldState fstate = FieldState::New) const; + const std::string& name, FieldState fstate = FieldState::New) const; /** Return a previously created field using a unique identifier */ @@ -259,8 +258,7 @@ public: //! Query if field uniquely identified by name and time state exists in //! repository bool field_exists( - const std::string& name, - const FieldState fstate = FieldState::New) const; + const std::string& name, FieldState fstate = FieldState::New) const; /** Declare an integer field * @@ -270,15 +268,14 @@ public: */ IntField& declare_int_field( const std::string& name, - const int ncomp = 1, - const int ngrow = 0, - const int nstates = 1, - const FieldLoc floc = FieldLoc::CELL); + int ncomp = 1, + int ngrow = 0, + int nstates = 1, + FieldLoc floc = FieldLoc::CELL); //! Return a reference to an integer field IntField& get_int_field( - const std::string& name, - const FieldState fstate = FieldState::New) const; + const std::string& name, FieldState fstate = FieldState::New) const; /** Return a reference to a previously created integer field using unique * identifier @@ -290,8 +287,7 @@ public: //! Query if an integer field exists bool int_field_exists( - const std::string& name, - const FieldState fstate = FieldState::New) const; + const std::string& name, FieldState fstate = FieldState::New) const; /** Create a scratch field * @@ -305,9 +301,9 @@ public: */ std::unique_ptr create_scratch_field( const std::string& name, - const int ncomp = 1, - const int nghost = 0, - const FieldLoc floc = FieldLoc::CELL) const; + int ncomp = 1, + int nghost = 0, + FieldLoc floc = FieldLoc::CELL) const; /** Create a scratch field * @@ -320,9 +316,7 @@ public: * the ScratchField object across timesteps. */ std::unique_ptr create_scratch_field( - const int ncomp = 1, - const int nghost = 0, - const FieldLoc floc = FieldLoc::CELL) const; + int ncomp = 1, int nghost = 0, FieldLoc floc = FieldLoc::CELL) const; //! Advance all fields with more than one timestate to the new timestep void advance_states() noexcept; @@ -375,7 +369,7 @@ protected: } //! Create a new state for a field - Field& create_state(Field& field, const FieldState fstate); + Field& create_state(Field& field, FieldState fstate); //! Allocate field data for a single level outside of regrid void allocate_field_data( diff --git a/amr-wind/core/IntField.H b/amr-wind/core/IntField.H index f60b5c1347..2e6f7a4f9d 100644 --- a/amr-wind/core/IntField.H +++ b/amr-wind/core/IntField.H @@ -61,10 +61,10 @@ protected: IntField( FieldRepo& repo, std::string name, - const unsigned fid, - const int ncomp = 1, - const int ngrow = 1, - const FieldLoc floc = FieldLoc::CELL); + unsigned fid, + int ncomp = 1, + int ngrow = 1, + FieldLoc floc = FieldLoc::CELL); FieldRepo& m_repo; diff --git a/amr-wind/core/SimTime.H b/amr-wind/core/SimTime.H index 44cbb8694e..fa7473ac2c 100644 --- a/amr-wind/core/SimTime.H +++ b/amr-wind/core/SimTime.H @@ -53,9 +53,7 @@ public: * */ void set_current_cfl( - const amrex::Real conv_cfl, - const amrex::Real diff_cfl, - const amrex::Real src_cfl); + amrex::Real conv_cfl, amrex::Real diff_cfl, amrex::Real src_cfl); /** Set start time and index based on checkpoint/restart file * diff --git a/amr-wind/core/Slice.H b/amr-wind/core/Slice.H index d810c219b5..2fe246c703 100644 --- a/amr-wind/core/Slice.H +++ b/amr-wind/core/Slice.H @@ -63,8 +63,7 @@ struct Slice }; template -inline Slice -slice(std::vector& vec, const size_t start, const size_t count) +inline Slice slice(std::vector& vec, size_t start, size_t count) { AMREX_ASSERT((start + count) <= vec.size()); return Slice{&vec[start], count}; diff --git a/amr-wind/core/ViewField.H b/amr-wind/core/ViewField.H index a81c2e550b..d262c93772 100644 --- a/amr-wind/core/ViewField.H +++ b/amr-wind/core/ViewField.H @@ -62,7 +62,7 @@ public: const T& source_field() const { return m_src; } private: - ViewField(T& src, const int scomp = 0, const int ncomp = 1); + ViewField(T& src, int scomp = 0, int ncomp = 1); //! The base field T& m_src; diff --git a/amr-wind/core/vs/tensor.H b/amr-wind/core/vs/tensor.H index 646a9b9e81..cc815e9eef 100644 --- a/amr-wind/core/vs/tensor.H +++ b/amr-wind/core/vs/tensor.H @@ -44,7 +44,7 @@ struct TensorT const VectorT& x, const VectorT& y, const VectorT& z, - const bool transpose = false); + bool transpose = false); ~TensorT() = default; TensorT(const TensorT&) = default; diff --git a/amr-wind/core/vs/vector.H b/amr-wind/core/vs/vector.H index a5cc667056..31cc025f5e 100644 --- a/amr-wind/core/vs/vector.H +++ b/amr-wind/core/vs/vector.H @@ -110,9 +110,9 @@ struct VectorT AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT operator-() const; - AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT operator*=(const T val); + AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT operator*=(T val); - AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT operator/=(const T val); + AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE VectorT operator/=(T val); AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T& operator[](size_type pos) & { diff --git a/amr-wind/diffusion/diffusion.H b/amr-wind/diffusion/diffusion.H index 6b78f84400..1d753430ed 100644 --- a/amr-wind/diffusion/diffusion.H +++ b/amr-wind/diffusion/diffusion.H @@ -9,20 +9,20 @@ namespace diffusion { void wall_model_bc_moeng( amr_wind::Field& velocity, - const amrex::Real utau, - const amr_wind::FieldState fstate, + amrex::Real utau, + amr_wind::FieldState fstate, const amrex::FArrayBox& instplanar); void wall_model_bc( amr_wind::Field& velocity, - const amrex::Real utau, - const amrex::Real umag, - const amr_wind::FieldState fstate); + amrex::Real utau, + amrex::Real umag, + amr_wind::FieldState fstate); void temp_wall_model_bc( amr_wind::Field& temperature, const amrex::FArrayBox& instplanar, - const amr_wind::FieldState fstate); + amr_wind::FieldState fstate); amrex::Vector> get_diffuse_tensor_bc( diff --git a/amr-wind/equation_systems/DiffusionOps.H b/amr-wind/equation_systems/DiffusionOps.H index 0d123baa0b..e5ed01356a 100644 --- a/amr-wind/equation_systems/DiffusionOps.H +++ b/amr-wind/equation_systems/DiffusionOps.H @@ -32,8 +32,8 @@ class DiffSolverIface public: DiffSolverIface( PDEFields& fields, - const bool has_overset, - const bool mesh_mapping, + bool has_overset, + bool mesh_mapping, const std::string& prefix = "diffusion"); virtual ~DiffSolverIface() = default; @@ -42,11 +42,11 @@ public: * * \param dt timestep size */ - virtual void linsys_solve(const amrex::Real dt); + virtual void linsys_solve(amrex::Real dt); virtual void linsys_solve_impl(); - virtual void set_acoeffs(LinOp& linop, const FieldState fstate); + virtual void set_acoeffs(LinOp& linop, FieldState fstate); template void set_bcoeffs( @@ -93,10 +93,7 @@ public: protected: //! Sets up the linear operator (e.g., setup BCs, etc.) virtual void setup_operator( - LinOp& linop, - const amrex::Real alpha, - const amrex::Real beta, - const FieldState fstate); + LinOp& linop, amrex::Real alpha, amrex::Real beta, FieldState fstate); virtual void setup_solver(amrex::MLMG& mlmg); diff --git a/amr-wind/equation_systems/PDEBase.H b/amr-wind/equation_systems/PDEBase.H index 71666cd4f4..f26d9fa7b0 100644 --- a/amr-wind/equation_systems/PDEBase.H +++ b/amr-wind/equation_systems/PDEBase.H @@ -63,19 +63,19 @@ public: virtual void post_regrid_actions() = 0; //! Compute the source (forcing) terms for this PDE - virtual void compute_source_term(const FieldState fstate) = 0; + virtual void compute_source_term(FieldState fstate) = 0; //! Compute the effective dynamic viscosity for this PDE - virtual void compute_mueff(const FieldState fstate) = 0; + virtual void compute_mueff(FieldState fstate) = 0; //! Compute the diffusion term used in the RHS of the PDE system - virtual void compute_diffusion_term(const FieldState fstate) = 0; + virtual void compute_diffusion_term(FieldState fstate) = 0; //! Perform necessary steps to prepare for advection calculations - virtual void pre_advection_actions(const FieldState fstate) = 0; + virtual void pre_advection_actions(FieldState fstate) = 0; //! Compute the time derivative and advective term for the PDE system - virtual void compute_advection_term(const FieldState fstate) = 0; + virtual void compute_advection_term(FieldState fstate) = 0; /** Combine the source, diffusion, and advection term to obtain RHS * @@ -83,7 +83,7 @@ public: * term is treated implicitly, with Crank-Nicolson scheme, or explicitly. * The predictor step only uses the "old" states for RHS computation. */ - virtual void compute_predictor_rhs(const DiffusionType difftype) = 0; + virtual void compute_predictor_rhs(DiffusionType difftype) = 0; /** Combine the source, diffusion, and advection term to obtain RHS * @@ -92,10 +92,10 @@ public: * The corrector step uses both "old" state as well as the updated "new" * state from predictor step to compute the RHS term. */ - virtual void compute_corrector_rhs(const DiffusionType difftype) = 0; + virtual void compute_corrector_rhs(DiffusionType difftype) = 0; //! Solve the diffusion linear system and update the field - virtual void solve(const amrex::Real dt) = 0; + virtual void solve(amrex::Real dt) = 0; //! Perform post-processing actions after a system solve virtual void post_solve_actions() = 0; @@ -134,7 +134,7 @@ public: //! Call fillpatch operator on state variables for all registered PDEs void fillpatch_state_fields( - const amrex::Real time, const FieldState fstate = FieldState::New); + amrex::Real time, FieldState fstate = FieldState::New); /** Return the vector containing all registered PDE instances * diff --git a/amr-wind/equation_systems/SourceTerm.H b/amr-wind/equation_systems/SourceTerm.H index a1b2cef328..9512f40245 100644 --- a/amr-wind/equation_systems/SourceTerm.H +++ b/amr-wind/equation_systems/SourceTerm.H @@ -23,10 +23,10 @@ public: ~SourceTerm() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/density/DensitySource.H b/amr-wind/equation_systems/density/DensitySource.H index 9bb497a077..7860415a0b 100644 --- a/amr-wind/equation_systems/density/DensitySource.H +++ b/amr-wind/equation_systems/density/DensitySource.H @@ -21,10 +21,10 @@ public: ~DensitySource() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/icns/MomentumSource.H b/amr-wind/equation_systems/icns/MomentumSource.H index 2510138147..dbdacc47dc 100644 --- a/amr-wind/equation_systems/icns/MomentumSource.H +++ b/amr-wind/equation_systems/icns/MomentumSource.H @@ -26,10 +26,10 @@ public: ~MomentumSource() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/icns/icns_advection.H b/amr-wind/equation_systems/icns/icns_advection.H index 3c9ecc9b40..5478649908 100644 --- a/amr-wind/equation_systems/icns/icns_advection.H +++ b/amr-wind/equation_systems/icns/icns_advection.H @@ -23,7 +23,7 @@ public: bool /*variable_density*/, bool /*mesh_mapping*/); - void operator()(const FieldState fstate, const amrex::Real dt); + void operator()(FieldState fstate, amrex::Real dt); static void mac_proj_to_uniform_space( const amr_wind::FieldRepo& /*repo*/, @@ -36,7 +36,7 @@ public: private: void init_projector(const FaceFabPtrVec& /*beta*/) noexcept; - void init_projector(const amrex::Real /*beta*/) noexcept; + void init_projector(amrex::Real /*beta*/) noexcept; FieldRepo& m_repo; std::unique_ptr m_mac_proj; diff --git a/amr-wind/equation_systems/icns/source_terms/ABLForcing.H b/amr-wind/equation_systems/icns/source_terms/ABLForcing.H index 63420876a0..8d94ef3e64 100644 --- a/amr-wind/equation_systems/icns/source_terms/ABLForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/ABLForcing.H @@ -23,10 +23,10 @@ public: ~ABLForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; inline void set_mean_velocities(amrex::Real ux, amrex::Real uy) diff --git a/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H b/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H index 9b24d9be2e..2d2f706798 100644 --- a/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H +++ b/amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H @@ -26,10 +26,10 @@ public: ~ABLMeanBoussinesq() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; void mean_temperature_init(const FieldPlaneAveraging& /*tavg*/); diff --git a/amr-wind/equation_systems/icns/source_terms/ActuatorForcing.H b/amr-wind/equation_systems/icns/source_terms/ActuatorForcing.H index fadfb5146f..3659ba8bb7 100644 --- a/amr-wind/equation_systems/icns/source_terms/ActuatorForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/ActuatorForcing.H @@ -24,10 +24,10 @@ public: ~ActuatorForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/BodyForce.H b/amr-wind/equation_systems/icns/source_terms/BodyForce.H index 8de17c78b1..000afc9e88 100644 --- a/amr-wind/equation_systems/icns/source_terms/BodyForce.H +++ b/amr-wind/equation_systems/icns/source_terms/BodyForce.H @@ -24,10 +24,10 @@ public: ~BodyForce() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/BoussinesqBuoyancy.H b/amr-wind/equation_systems/icns/source_terms/BoussinesqBuoyancy.H index 4a5867dff1..babe00b7bc 100644 --- a/amr-wind/equation_systems/icns/source_terms/BoussinesqBuoyancy.H +++ b/amr-wind/equation_systems/icns/source_terms/BoussinesqBuoyancy.H @@ -25,10 +25,10 @@ public: ~BoussinesqBuoyancy() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H b/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H index 21da4ae281..a0864a3bb7 100644 --- a/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/CoriolisForcing.H @@ -22,10 +22,10 @@ public: ~CoriolisForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H b/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H index a65cea603d..d640b8de26 100644 --- a/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H +++ b/amr-wind/equation_systems/icns/source_terms/DensityBuoyancy.H @@ -28,10 +28,10 @@ public: ~DensityBuoyancy() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& vel_forces) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H b/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H index 98339de801..ad6627c6e3 100644 --- a/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H @@ -21,10 +21,10 @@ public: ~GeostrophicForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/GravityForcing.H b/amr-wind/equation_systems/icns/source_terms/GravityForcing.H index e423e25285..042ab6f293 100644 --- a/amr-wind/equation_systems/icns/source_terms/GravityForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/GravityForcing.H @@ -21,10 +21,10 @@ public: ~GravityForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& vel_forces) const override; private: diff --git a/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H b/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H index b32e7ed5f3..d9ed58f3ad 100644 --- a/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H +++ b/amr-wind/equation_systems/icns/source_terms/SynthTurbForcing.H @@ -20,10 +20,10 @@ public: ~SynthTurbForcing() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/sdr/SDRSource.H b/amr-wind/equation_systems/sdr/SDRSource.H index bb971cab0f..cc2106bcde 100644 --- a/amr-wind/equation_systems/sdr/SDRSource.H +++ b/amr-wind/equation_systems/sdr/SDRSource.H @@ -26,10 +26,10 @@ public: ~SDRSource() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H b/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H index c03b7629a5..e58beb2cdf 100644 --- a/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H +++ b/amr-wind/equation_systems/sdr/source_terms/SDRSrc.H @@ -22,10 +22,10 @@ public: ~SDRSrc() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/temperature/TemperatureSource.H b/amr-wind/equation_systems/temperature/TemperatureSource.H index 93e5a71102..c1bcfc47e9 100644 --- a/amr-wind/equation_systems/temperature/TemperatureSource.H +++ b/amr-wind/equation_systems/temperature/TemperatureSource.H @@ -26,10 +26,10 @@ public: ~TemperatureSource() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/tke/TKESource.H b/amr-wind/equation_systems/tke/TKESource.H index fd8b6894a2..d8f44c7119 100644 --- a/amr-wind/equation_systems/tke/TKESource.H +++ b/amr-wind/equation_systems/tke/TKESource.H @@ -24,10 +24,10 @@ public: ~TKESource() override = default; virtual void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const = 0; }; diff --git a/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H b/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H index d02bf199fe..a49ad3257f 100644 --- a/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H +++ b/amr-wind/equation_systems/tke/source_terms/KsgsM84Src.H @@ -20,10 +20,10 @@ public: ~KsgsM84Src() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H b/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H index b5a8add092..734c1b3d5c 100644 --- a/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H +++ b/amr-wind/equation_systems/tke/source_terms/KwSSTSrc.H @@ -22,10 +22,10 @@ public: ~KwSSTSrc() override; void operator()( - const int lev, + int lev, const amrex::MFIter& mfi, const amrex::Box& bx, - const FieldState fstate, + FieldState fstate, const amrex::Array4& src_term) const override; private: diff --git a/amr-wind/equation_systems/vof/SplitAdvection.H b/amr-wind/equation_systems/vof/SplitAdvection.H index e2942aa009..3e4877c439 100644 --- a/amr-wind/equation_systems/vof/SplitAdvection.H +++ b/amr-wind/equation_systems/vof/SplitAdvection.H @@ -21,7 +21,7 @@ void split_advection( bool is_lagrangian); void sweep( - const int dir, + int dir, amrex::Box const& bx, amrex::Real dtdx, amrex::Array4 const& vel_mac, @@ -30,8 +30,8 @@ void sweep( amrex::Array4 const& fluxC, amrex::Array4 const& fluxR, amrex::BCRec const* pbc, - const int dimLow, - const int dimHigh, + int dimLow, + int dimHigh, bool is_lagrangian); } // namespace multiphase 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 e436ca25a4..0d8196ab34 100644 --- a/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H +++ b/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H @@ -43,7 +43,7 @@ void write_netcdf( const std::string& /*ncfile*/, const BluffBodyBaseData& /*meta*/, const IBInfo& /*info*/, - const amrex::Real /*time*/); + amrex::Real /*time*/); } // namespace bluff_body diff --git a/amr-wind/overset/TiogaInterface.H b/amr-wind/overset/TiogaInterface.H index 4a8ef4d616..3ff2a7cf1a 100644 --- a/amr-wind/overset/TiogaInterface.H +++ b/amr-wind/overset/TiogaInterface.H @@ -21,7 +21,7 @@ struct AMROversetInfo * \param nglobal Total number of patches * \param nlocal Number of patches on the current MPI rank */ - AMROversetInfo(const int nglobal, const int nlocal); + AMROversetInfo(int nglobal, int nlocal); // Arrays of size ngrids_global AType level; diff --git a/amr-wind/physics/ChannelFlow.H b/amr-wind/physics/ChannelFlow.H index b2183ed9f9..20de64a3f8 100644 --- a/amr-wind/physics/ChannelFlow.H +++ b/amr-wind/physics/ChannelFlow.H @@ -29,7 +29,7 @@ public: int level, const amrex::Geometry& geom, const IndexSelector& idxOp, - const int n_idx); + int n_idx); template amrex::Real compute_error(const IndexSelector& idxOp); diff --git a/amr-wind/physics/ConvectingTaylorVortex.H b/amr-wind/physics/ConvectingTaylorVortex.H index 35c983f578..e5193cc377 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 /*u0*/, - const amrex::Real /*v0*/, - const amrex::Real /*omega*/, - const amrex::Real /*x*/, - const amrex::Real /*y*/, - const amrex::Real /*t*/) const; + amrex::Real /*u0*/, + amrex::Real /*v0*/, + amrex::Real /*omega*/, + amrex::Real /*x*/, + amrex::Real /*y*/, + amrex::Real /*t*/) const; const int m_comp{0}; }; struct VExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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; + amrex::Real /*u0*/, + amrex::Real /*v0*/, + amrex::Real /*omega*/, + amrex::Real /*x*/, + amrex::Real /*y*/, + amrex::Real /*t*/) const; const int m_comp{1}; }; struct WExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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; + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/) const; const int m_comp{2}; }; struct GpxExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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; + amrex::Real /*u0*/, + amrex::Real /*unused*/, + amrex::Real /*omega*/, + amrex::Real /*x*/, + amrex::Real /*unused*/, + amrex::Real /*t*/) const; const int m_comp{0}; }; struct GpyExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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; + amrex::Real /*unused*/, + amrex::Real /*v0*/, + amrex::Real /*omega*/, + amrex::Real /*unused*/, + amrex::Real /*y*/, + amrex::Real /*t*/) const; const int m_comp{1}; }; struct GpzExact { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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; + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/) const; const int m_comp{2}; }; diff --git a/amr-wind/physics/VortexRing.H b/amr-wind/physics/VortexRing.H index bc1e7d11c7..05f1382ae6 100644 --- a/amr-wind/physics/VortexRing.H +++ b/amr-wind/physics/VortexRing.H @@ -56,15 +56,15 @@ private: struct FatCore { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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*/, + amrex::Real /*r*/, + amrex::Real /*unused*/, + amrex::Real /*z*/, + amrex::Real /*R*/, + amrex::Real /*Gamma*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + amrex::Real /*unused*/, + int /*unused*/, const int* /*unused*/, const amrex::Real* /*unused*/, const amrex::Real* /*unused*/) const; @@ -73,15 +73,15 @@ struct FatCore struct CollidingRings { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real operator()( - 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*/, + amrex::Real /*r*/, + amrex::Real /*theta*/, + amrex::Real /*z*/, + amrex::Real /*R*/, + amrex::Real /*Gamma*/, + amrex::Real /*delta*/, + amrex::Real /*dz*/, + amrex::Real /*perturbation_amplitude*/, + int /*num_modes*/, const int* /*perturbation_modes*/, const amrex::Real* /*perturbation_phases_1*/, const amrex::Real* /*perturbation_phases_2*/) const; diff --git a/amr-wind/turbulence/LES/OneEqKsgs.H b/amr-wind/turbulence/LES/OneEqKsgs.H index 9e6708bcce..198bb1c0ac 100644 --- a/amr-wind/turbulence/LES/OneEqKsgs.H +++ b/amr-wind/turbulence/LES/OneEqKsgs.H @@ -56,7 +56,7 @@ public: std::string model_name() const override { return "OneEqKsgsM84"; } //! Update the turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! Do any post advance work void post_advance_work() override; @@ -110,7 +110,7 @@ public: std::string model_name() const override { return "OneEqKsgsS94"; } //! Update the turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! No post advance work for this model void post_advance_work() override {} diff --git a/amr-wind/turbulence/LES/Smagorinsky.H b/amr-wind/turbulence/LES/Smagorinsky.H index 3bb87e645f..afb3d8509e 100644 --- a/amr-wind/turbulence/LES/Smagorinsky.H +++ b/amr-wind/turbulence/LES/Smagorinsky.H @@ -26,7 +26,7 @@ public: std::string model_name() const override { return "Smagorinsky"; } //! Update the turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! No post advance work for this model void post_advance_work() override {} diff --git a/amr-wind/turbulence/LaminarModel.H b/amr-wind/turbulence/LaminarModel.H index bdbd6f8aaa..aaad55ea4d 100644 --- a/amr-wind/turbulence/LaminarModel.H +++ b/amr-wind/turbulence/LaminarModel.H @@ -28,7 +28,7 @@ public: std::string model_name() const override { return "laminar"; } //! Update the effective/turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! No post advance work for this model void post_advance_work() override {} diff --git a/amr-wind/turbulence/RANS/KOmegaSST.H b/amr-wind/turbulence/RANS/KOmegaSST.H index 12de7a8a60..8874b5be47 100644 --- a/amr-wind/turbulence/RANS/KOmegaSST.H +++ b/amr-wind/turbulence/RANS/KOmegaSST.H @@ -46,7 +46,7 @@ public: std::string model_name() const override { return "KOmegaSST"; } //! Update the turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! No post advance work for this model void post_advance_work() override {} diff --git a/amr-wind/turbulence/RANS/KOmegaSSTIDDES.H b/amr-wind/turbulence/RANS/KOmegaSSTIDDES.H index b862647c35..f0f2a1beed 100644 --- a/amr-wind/turbulence/RANS/KOmegaSSTIDDES.H +++ b/amr-wind/turbulence/RANS/KOmegaSSTIDDES.H @@ -37,7 +37,7 @@ public: std::string model_name() const override { return "KOmegaSSTIDDES"; } //! Update the turbulent viscosity field - void update_turbulent_viscosity(const FieldState fstate) override; + void update_turbulent_viscosity(FieldState fstate) override; //! No post advance work for this model void post_advance_work() override {} diff --git a/amr-wind/turbulence/TurbulenceModel.H b/amr-wind/turbulence/TurbulenceModel.H index 26c149c037..969116aa2c 100644 --- a/amr-wind/turbulence/TurbulenceModel.H +++ b/amr-wind/turbulence/TurbulenceModel.H @@ -47,7 +47,7 @@ public: * \param fstate State used for updates to differentiate logic in predictor * and corrector steps. */ - virtual void update_turbulent_viscosity(const FieldState fstate) = 0; + virtual void update_turbulent_viscosity(FieldState fstate) = 0; //! Do any post advance actions for the turbulence model virtual void post_advance_work() = 0; diff --git a/amr-wind/utilities/DerivedQtyDefs.H b/amr-wind/utilities/DerivedQtyDefs.H index c8db00ded7..d8440c83ad 100644 --- a/amr-wind/utilities/DerivedQtyDefs.H +++ b/amr-wind/utilities/DerivedQtyDefs.H @@ -16,7 +16,7 @@ struct VorticityMag : public DerivedQty::Register int num_comp() const override { return ncomp; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field& m_vel; @@ -33,7 +33,7 @@ struct QCriterion : public DerivedQty::Register int num_comp() const override { return ncomp; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field& m_vel; @@ -51,7 +51,7 @@ struct QCriterionNondim : public DerivedQty::Register int num_comp() const override { return ncomp; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field& m_vel; @@ -68,7 +68,7 @@ struct StrainRateMag : public DerivedQty::Register int num_comp() const override { return ncomp; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field& m_vel; @@ -84,7 +84,7 @@ struct Gradient : public DerivedQty::Register int num_comp() const override { return AMREX_SPACEDIM * m_phi->num_comp(); } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field* m_phi; @@ -100,7 +100,7 @@ struct Divergence : public DerivedQty::Register int num_comp() const override { return 1; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field* m_phi; @@ -117,7 +117,7 @@ struct Laplacian : public DerivedQty::Register int num_comp() const override { return ncomp; } - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field* m_phi; @@ -136,7 +136,7 @@ struct FieldComponents : public DerivedQty::Register void var_names(amrex::Vector& plt_var_names) override; - void operator()(ScratchField& fld, const int scomp = 0) override; + void operator()(ScratchField& fld, int scomp = 0) override; private: const Field* m_fld; diff --git a/amr-wind/utilities/DerivedQuantity.H b/amr-wind/utilities/DerivedQuantity.H index 0ca50264a0..a7ec322c97 100644 --- a/amr-wind/utilities/DerivedQuantity.H +++ b/amr-wind/utilities/DerivedQuantity.H @@ -23,7 +23,7 @@ public: virtual int num_comp() const = 0; - virtual void operator()(ScratchField& fld, const int scomp = 0) = 0; + virtual void operator()(ScratchField& fld, int scomp = 0) = 0; virtual void var_names(amrex::Vector& /*plt_var_names*/); }; @@ -37,7 +37,7 @@ public: explicit DerivedQtyMgr(const FieldRepo& repo); ~DerivedQtyMgr() = default; - void operator()(ScratchField& fld, const int scomp = 0); + void operator()(ScratchField& fld, int scomp = 0); void create(const amrex::Vector& keys); diff --git a/amr-wind/utilities/FieldPlaneAveraging.H b/amr-wind/utilities/FieldPlaneAveraging.H index d8c923c9a5..90275db487 100644 --- a/amr-wind/utilities/FieldPlaneAveraging.H +++ b/amr-wind/utilities/FieldPlaneAveraging.H @@ -153,8 +153,8 @@ public: // public for GPU template void compute_hvelmag_averages( const IndexSelector& idx_op, - const int h1_idx, - const int h2_idx, + int h1_idx, + int h2_idx, const amrex::MultiFab& mfab); /** return vector containing horizontal velocity magnitude average */ diff --git a/amr-wind/utilities/IOManager.H b/amr-wind/utilities/IOManager.H index 7919b43378..ad60891fe2 100644 --- a/amr-wind/utilities/IOManager.H +++ b/amr-wind/utilities/IOManager.H @@ -45,7 +45,7 @@ public: void write_plot_file(); //! Write all necessary fields for restart - void write_checkpoint_file(const int start_level = 0); + void write_checkpoint_file(int start_level = 0); //! Read all necessary fields for a restart void read_checkpoint_fields( @@ -86,7 +86,7 @@ public: const amrex::Vector& plot_fields() const { return m_plt_fields; } private: - void write_header(const std::string& /*chkname*/, const int start_level); + void write_header(const std::string& /*chkname*/, int start_level); void write_info_file(const std::string& /*path*/); diff --git a/amr-wind/utilities/averaging/ReAveraging.H b/amr-wind/utilities/averaging/ReAveraging.H index bbf4bc9a01..b483d011eb 100644 --- a/amr-wind/utilities/averaging/ReAveraging.H +++ b/amr-wind/utilities/averaging/ReAveraging.H @@ -24,8 +24,8 @@ public: */ void operator()( const SimTime& /*unused*/, - const amrex::Real /*unused*/, - const amrex::Real /*unused*/) override; + amrex::Real /*unused*/, + 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 e5ea6f9daa..e1fed80836 100644 --- a/amr-wind/utilities/averaging/ReynoldsStress.H +++ b/amr-wind/utilities/averaging/ReynoldsStress.H @@ -28,8 +28,8 @@ public: */ void operator()( const SimTime& /*time*/, - const amrex::Real /*filter_width*/, - const amrex::Real /*elapsed_time*/) override; + amrex::Real /*filter_width*/, + 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 c7f0ccf338..9aea42ec47 100644 --- a/amr-wind/utilities/averaging/TimeAveraging.H +++ b/amr-wind/utilities/averaging/TimeAveraging.H @@ -38,8 +38,7 @@ public: * * \param elapsed_time Time elapsed since averaging was initiated */ - virtual void - operator()(const SimTime&, const amrex::Real, const amrex::Real) = 0; + virtual void operator()(const SimTime&, amrex::Real, amrex::Real) = 0; virtual const std::string& average_field_name() = 0; }; diff --git a/amr-wind/utilities/sampling/DTUSpinnerSampler.H b/amr-wind/utilities/sampling/DTUSpinnerSampler.H index a3b4028c2f..a805b0b8f5 100644 --- a/amr-wind/utilities/sampling/DTUSpinnerSampler.H +++ b/amr-wind/utilities/sampling/DTUSpinnerSampler.H @@ -51,8 +51,7 @@ public: void populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; void output_netcdf_data( - const ncutils::NCGroup& /*unused*/, - const size_t /*unused*/) const override; + const ncutils::NCGroup& /*unused*/, size_t /*unused*/) const override; private: int m_ns{1}; diff --git a/amr-wind/utilities/sampling/FieldNorms.H b/amr-wind/utilities/sampling/FieldNorms.H index 70a5e3f4f5..e0e18832da 100644 --- a/amr-wind/utilities/sampling/FieldNorms.H +++ b/amr-wind/utilities/sampling/FieldNorms.H @@ -38,7 +38,7 @@ public: void impl_write_native(); //! calculate the L2 norm of a given field and component - static amrex::Real L2_norm(amr_wind::Field& field, const int comp); + static amrex::Real L2_norm(amr_wind::Field& field, int comp); const amrex::Vector& var_names() const { return m_var_names; } diff --git a/amr-wind/utilities/sampling/LidarSampler.H b/amr-wind/utilities/sampling/LidarSampler.H index f0b7280041..44361db0e2 100644 --- a/amr-wind/utilities/sampling/LidarSampler.H +++ b/amr-wind/utilities/sampling/LidarSampler.H @@ -40,8 +40,7 @@ public: void populate_netcdf_metadata(const ncutils::NCGroup& /*unused*/) const override; void output_netcdf_data( - const ncutils::NCGroup& /*unused*/, - const size_t /*unused*/) const override; + const ncutils::NCGroup& /*unused*/, size_t /*unused*/) const override; protected: amrex::Vector m_origin; diff --git a/amr-wind/utilities/sampling/SamplingContainer.H b/amr-wind/utilities/sampling/SamplingContainer.H index d7133ac934..1f62a3e339 100644 --- a/amr-wind/utilities/sampling/SamplingContainer.H +++ b/amr-wind/utilities/sampling/SamplingContainer.H @@ -74,8 +74,7 @@ public: /** Define the container and allocate memory for runtime components */ - void setup_container( - const int num_real_components, const int num_int_components = 0); + void setup_container(int num_real_components, int num_int_components = 0); /** Create particle information for all the sampling locations */ @@ -83,7 +82,7 @@ public: const amrex::Vector>& /*samplers*/); //! Perform field interpolation to sampling locations - void interpolate_fields(const amrex::Vector fields); + void interpolate_fields(amrex::Vector fields); //! Populate the buffer with data for all the particles void populate_buffer(std::vector& buf); diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.H b/amr-wind/wind_energy/ABLBoundaryPlane.H index 4aae1d6828..a1948ce720 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.H +++ b/amr-wind/wind_energy/ABLBoundaryPlane.H @@ -31,14 +31,12 @@ class InletData public: InletData() = default; - void resize(const int /*size*/); + void resize(int /*size*/); - void define_plane(const amrex::Orientation /*ori*/); + void define_plane(amrex::Orientation /*ori*/); void define_level_data( - const amrex::Orientation /*ori*/, - const amrex::Box& /*bx*/, - const size_t /*nc*/); + amrex::Orientation /*ori*/, const amrex::Box& /*bx*/, size_t /*nc*/); #ifdef AMR_WIND_USE_NETCDF void read_data( @@ -51,15 +49,15 @@ public: #endif void read_data_native( - const amrex::OrientationIter oit, + amrex::OrientationIter oit, amrex::BndryRegister& bndry_n, amrex::BndryRegister& bndry_np1, - const int lev, + int lev, const Field* /*fld*/, - const amrex::Real time, + amrex::Real time, const amrex::Vector& /*times*/); - void interpolate(const amrex::Real /*time*/); + void interpolate(amrex::Real /*time*/); bool is_populated(amrex::Orientation /*ori*/) const; const amrex::FArrayBox& interpolate_data(const amrex::Orientation ori, const int lev) const @@ -131,8 +129,8 @@ public: void read_file(); void populate_data( - const int /*lev*/, - const amrex::Real /*time*/, + int /*lev*/, + amrex::Real /*time*/, Field& /*fld*/, amrex::MultiFab& /*mfab*/) const; @@ -151,8 +149,8 @@ public: bool box_intersects_boundary( const amrex::Box& /*bx*/, - const int /*lev*/, - const amrex::Orientation /*ori*/) const; + int /*lev*/, + amrex::Orientation /*ori*/) const; private: const amr_wind::SimTime& m_time; diff --git a/amr-wind/wind_energy/ABLFieldInit.H b/amr-wind/wind_energy/ABLFieldInit.H index 85ac779989..2dc757d851 100644 --- a/amr-wind/wind_energy/ABLFieldInit.H +++ b/amr-wind/wind_energy/ABLFieldInit.H @@ -35,7 +35,7 @@ public: * pushes the field to device. */ void perturb_temperature( - const int lev, const amrex::Geometry& geom, Field& temperature) const; + int lev, const amrex::Geometry& geom, Field& temperature) const; //! Flag indicating whether temperature field needs perturbations bool add_temperature_perturbations() const { return m_perturb_theta; } diff --git a/amr-wind/wind_energy/ABLFillInflow.H b/amr-wind/wind_energy/ABLFillInflow.H index 8a06e009d8..b2d35a3d85 100644 --- a/amr-wind/wind_energy/ABLFillInflow.H +++ b/amr-wind/wind_energy/ABLFillInflow.H @@ -31,7 +31,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) override; + FieldState fstate = FieldState::New) override; //! Implementation that handles filling patches from a coarse to fine level void fillpatch_from_coarse( @@ -39,7 +39,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) override; + FieldState fstate = FieldState::New) override; //! Implementation that handles filling physical boundary conditions void fillphysbc( @@ -47,7 +47,7 @@ public: amrex::Real time, amrex::MultiFab& mfab, const amrex::IntVect& nghost, - const FieldState fstate = FieldState::New) override; + FieldState fstate = FieldState::New) override; protected: const ABLBoundaryPlane& m_bndry_plane; diff --git a/amr-wind/wind_energy/ABLStats.H b/amr-wind/wind_energy/ABLStats.H index 7b0447ad38..7a0418ae13 100644 --- a/amr-wind/wind_energy/ABLStats.H +++ b/amr-wind/wind_energy/ABLStats.H @@ -33,9 +33,7 @@ public: static std::string identifier() { return "precursor"; } ABLStats( - CFDSim& /*sim*/, - const ABLWallFunction& /*abl_wall_func*/, - const int dir); + CFDSim& /*sim*/, const ABLWallFunction& /*abl_wall_func*/, int dir); ~ABLStats() override; diff --git a/amr-wind/wind_energy/ABLWallFunction.H b/amr-wind/wind_energy/ABLWallFunction.H index a57fab155b..8efe96b824 100644 --- a/amr-wind/wind_energy/ABLWallFunction.H +++ b/amr-wind/wind_energy/ABLWallFunction.H @@ -70,11 +70,11 @@ class ABLVelWallFunc : public FieldBCIface public: ABLVelWallFunc(Field& velocity, const ABLWallFunction& wall_func); - void operator()(Field& velocity, const FieldState rho_state) override; + void operator()(Field& velocity, FieldState rho_state) override; template - void wall_model( - Field& velocity, const FieldState rho_state, const ShearStress& tau); + void + wall_model(Field& velocity, FieldState rho_state, const ShearStress& tau); private: const ABLWallFunction& m_wall_func; @@ -86,11 +86,11 @@ class ABLTempWallFunc : public FieldBCIface public: ABLTempWallFunc(Field& temperature, const ABLWallFunction& wall_fuc); - void operator()(Field& temperature, const FieldState rho_state) override; + void operator()(Field& temperature, FieldState rho_state) override; template - void wall_model( - Field& temperature, const FieldState rho_state, const HeatFlux& tau); + void + wall_model(Field& temperature, FieldState rho_state, const HeatFlux& tau); private: const ABLWallFunction& m_wall_func; diff --git a/amr-wind/wind_energy/actuator/ActSrcLineOp.H b/amr-wind/wind_energy/actuator/ActSrcLineOp.H index 140f91bc08..19406cb4a2 100644 --- a/amr-wind/wind_energy/actuator/ActSrcLineOp.H +++ b/amr-wind/wind_energy/actuator/ActSrcLineOp.H @@ -34,8 +34,8 @@ public: void setup_op() { copy_to_device(); } - void operator()( - const int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); + void + operator()(int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); }; template diff --git a/amr-wind/wind_energy/actuator/ActuatorContainer.H b/amr-wind/wind_energy/actuator/ActuatorContainer.H index 489e9c3b9f..ca69e77f1a 100644 --- a/amr-wind/wind_energy/actuator/ActuatorContainer.H +++ b/amr-wind/wind_energy/actuator/ActuatorContainer.H @@ -37,7 +37,7 @@ struct ActuatorCloud //! Total number of turbines located on this MPI rank int num_objects; - explicit ActuatorCloud(const int nobjects); + explicit ActuatorCloud(int nobjects); }; //! Number or real entries in Array of Structs (AOS) @@ -63,7 +63,7 @@ class ActuatorContainer public: friend class Actuator; - explicit ActuatorContainer(amrex::AmrCore& mesh, const int num_objects); + explicit ActuatorContainer(amrex::AmrCore& mesh, int num_objects); void post_regrid_actions(); @@ -83,7 +83,7 @@ public: void populate_vel_buffer(); - void initialize_particles(const int total_pts); + void initialize_particles(int total_pts); protected: void compute_local_coordinates(); diff --git a/amr-wind/wind_energy/actuator/ActuatorModel.H b/amr-wind/wind_energy/actuator/ActuatorModel.H index 0435cb58c6..fb3cfe0235 100644 --- a/amr-wind/wind_energy/actuator/ActuatorModel.H +++ b/amr-wind/wind_energy/actuator/ActuatorModel.H @@ -56,9 +56,7 @@ public: virtual void compute_forces() = 0; virtual void compute_source_term( - const int lev, - const amrex::MFIter& mfi, - const amrex::Geometry& geom) = 0; + int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom) = 0; virtual void prepare_outputs(const std::string&) = 0; diff --git a/amr-wind/wind_energy/actuator/aero/AirfoilTable.H b/amr-wind/wind_energy/actuator/aero/AirfoilTable.H index a29c7adc31..4a56b8093a 100644 --- a/amr-wind/wind_energy/actuator/aero/AirfoilTable.H +++ b/amr-wind/wind_energy/actuator/aero/AirfoilTable.H @@ -17,11 +17,10 @@ public: ~AirfoilTable(); - void - operator()(const amrex::Real aoa, amrex::Real& cl, amrex::Real& cd) const; + void operator()(amrex::Real aoa, amrex::Real& cl, amrex::Real& cd) const; void operator()( - const amrex::Real aoa, + amrex::Real aoa, amrex::Real& cl, amrex::Real& cd, amrex::Real& cm) const; @@ -33,7 +32,7 @@ public: const VecList& polars() const { return m_polar; } protected: - explicit AirfoilTable(const int num_entries); + explicit AirfoilTable(int num_entries); void convert_aoa_to_radians(); @@ -47,8 +46,7 @@ protected: class ThinAirfoil { public: - void - operator()(const amrex::Real aoa, amrex::Real& cl, amrex::Real& cd) const; + void operator()(amrex::Real aoa, amrex::Real& cl, amrex::Real& cd) const; amrex::Real& cd_factor() { return m_cd_factor; } diff --git a/amr-wind/wind_energy/actuator/disk/ActSrcDiskOp.H b/amr-wind/wind_energy/actuator/disk/ActSrcDiskOp.H index b5d8efceb9..47088c16a7 100644 --- a/amr-wind/wind_energy/actuator/disk/ActSrcDiskOp.H +++ b/amr-wind/wind_energy/actuator/disk/ActSrcDiskOp.H @@ -47,8 +47,8 @@ public: void setup_op() { copy_to_device(); } - void operator()( - const int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); + void + operator()(int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); }; template 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 40ce77dab6..7113a831db 100644 --- a/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H +++ b/amr-wind/wind_energy/actuator/disk/uniform_ct_ops.H @@ -21,7 +21,7 @@ void write_netcdf( const UniformCtData& /*meta*/, const ActInfo& /*info*/, const ActGrid& /*unused*/, - const amrex::Real /*time*/); + amrex::Real /*time*/); } // namespace disk namespace ops { @@ -55,8 +55,8 @@ void compute_disk_points( UniformCt::MetaType& meta, VecList& points, const vs::Vector& cylAxis, - const int offset, - const double dOffset); + int offset, + double dOffset); template <> struct ReadInputsOp diff --git a/amr-wind/wind_energy/actuator/turbine/ActSrcDiskOp_Turbine.H b/amr-wind/wind_energy/actuator/turbine/ActSrcDiskOp_Turbine.H index 8eeda82941..9171f8586f 100644 --- a/amr-wind/wind_energy/actuator/turbine/ActSrcDiskOp_Turbine.H +++ b/amr-wind/wind_energy/actuator/turbine/ActSrcDiskOp_Turbine.H @@ -37,8 +37,8 @@ public: void setup_op() { copy_to_device(); } - void operator()( - const int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); + void + operator()(int lev, const amrex::MFIter& mfi, const amrex::Geometry& geom); }; template diff --git a/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H b/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H index b019c37163..8b340e1605 100644 --- a/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H +++ b/amr-wind/wind_energy/actuator/turbine/fast/FastIface.H @@ -31,13 +31,13 @@ public: int register_turbine(FastTurbine& data); - void init_turbine(const int local_id); + void init_turbine(int local_id); - void init_solution(const int local_id); + void init_solution(int local_id); - void advance_turbine(const int local_id); + void advance_turbine(int local_id); - void save_restart(const int local_id); + void save_restart(int local_id); int num_local_turbines() const { return m_turbine_data.size(); } @@ -55,9 +55,7 @@ protected: void write_velocity_data(const FastTurbine& /*unused*/); void read_velocity_data( - FastTurbine& /*unused*/, - const ncutils::NCFile& /*unused*/, - const size_t tid); + FastTurbine& /*unused*/, const ncutils::NCFile& /*unused*/, size_t tid); //! Global to local index lookup map std::map m_turbine_map; diff --git a/amr-wind/wind_energy/actuator/turbine/turbine_utils.H b/amr-wind/wind_energy/actuator/turbine/turbine_utils.H index 6e65199fb1..b7eed8d9ed 100644 --- a/amr-wind/wind_energy/actuator/turbine/turbine_utils.H +++ b/amr-wind/wind_energy/actuator/turbine/turbine_utils.H @@ -21,7 +21,7 @@ void write_netcdf( const TurbineBaseData& /*meta*/, const TurbineInfo& /*info*/, const ActGrid& /*grid*/, - const amrex::Real /*time*/); + 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 7fbe4c7d34..6a83ffe8fc 100644 --- a/amr-wind/wind_energy/actuator/wing/wing_ops.H +++ b/amr-wind/wind_energy/actuator/wing/wing_ops.H @@ -31,7 +31,7 @@ void write_netcdf( const WingBaseData& /*meta*/, const ActInfo& /*info*/, const ActGrid& /*grid*/, - const amrex::Real /*time*/); + amrex::Real /*time*/); } // namespace wing