diff --git a/Applications/Utils/FileConverter/NetCdfConverter.cpp b/Applications/Utils/FileConverter/NetCdfConverter.cpp index a1b305e78e123301cd91c1420d103fcb1fe04709..6eeeadf2cbc01e68518a8afd58f43b345bade8a4 100644 --- a/Applications/Utils/FileConverter/NetCdfConverter.cpp +++ b/Applications/Utils/FileConverter/NetCdfConverter.cpp @@ -435,7 +435,7 @@ static std::vector<double> getData(NcFile const& dataset, NcVar const& var, std::replace_if( data_vec.begin(), data_vec.end(), - [](double& x) { return x == no_data_input; }, no_data_output); + [](double const& x) { return x == no_data_input; }, no_data_output); return data_vec; } diff --git a/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.cpp b/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.cpp index 3bdfc32ccd4f60b8967b2d5279d0a633deb4fb98..dae97d52e35ef8198ea53e3ab2fb27fcaf3b4859 100644 --- a/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.cpp +++ b/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.cpp @@ -25,7 +25,7 @@ PhaseComponent::PhaseComponent(std::string&& name_, } EquilibriumReactants::EquilibriumReactants( - std::vector<PhaseComponent>& phase_components) + std::vector<PhaseComponent> const& phase_components) { for (auto& phase_component : phase_components) { diff --git a/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.h b/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.h index e9116510cea6f053410e815ddbf13d612f10bd0c..abaffd2ddfe7932844d390c8190bab2bc07540ea 100644 --- a/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.h +++ b/ChemistryLib/PhreeqcKernelData/EquilibriumReactants.h @@ -38,7 +38,7 @@ class EquilibriumReactants final : private cxxPPassemblage { public: explicit EquilibriumReactants( - std::vector<PhaseComponent>& phase_components); + std::vector<PhaseComponent> const& phase_components); void setChemicalSystemID(std::size_t const chemical_system_id) { diff --git a/MaterialLib/SolidModels/Lubby2.cpp b/MaterialLib/SolidModels/Lubby2.cpp index 6b20e0c1c4992318ba1d72e8d32495ba4540a5e7..437bb8ce611bd50ab471e01a61192078e3fe4512 100644 --- a/MaterialLib/SolidModels/Lubby2.cpp +++ b/MaterialLib/SolidModels/Lubby2.cpp @@ -208,9 +208,9 @@ void Lubby2<DisplacementDim>::calculateResidualBurgers( const KelvinVector& strain_t, const KelvinVector& stress_curr, const KelvinVector& stress_t, - KelvinVector& strain_Kel_curr, + const KelvinVector& strain_Kel_curr, const KelvinVector& strain_Kel_t, - KelvinVector& strain_Max_curr, + const KelvinVector& strain_Max_curr, const KelvinVector& strain_Max_t, ResidualVector& res, detail::LocalLubby2Properties<DisplacementDim> const& properties) const diff --git a/MaterialLib/SolidModels/Lubby2.h b/MaterialLib/SolidModels/Lubby2.h index 369939a6774ec4be04951e3707888324a62b4a1d..ecdb11296c1e8817de62a7b686df7cf33dfe41d9 100644 --- a/MaterialLib/SolidModels/Lubby2.h +++ b/MaterialLib/SolidModels/Lubby2.h @@ -250,9 +250,9 @@ private: const KelvinVector& strain_t, const KelvinVector& stress_curr, const KelvinVector& stress_t, - KelvinVector& strain_Kel_curr, + const KelvinVector& strain_Kel_curr, const KelvinVector& strain_Kel_t, - KelvinVector& strain_Max_curr, + const KelvinVector& strain_Max_curr, const KelvinVector& strain_Max_t, ResidualVector& res, detail::LocalLubby2Properties<DisplacementDim> const& properties) const; diff --git a/MathLib/LinAlg/Eigen/EigenTools.h b/MathLib/LinAlg/Eigen/EigenTools.h index c947efb4ae307583d6cb8901a14c08fa292a09e5..7bc520c589fc446eaaa64d3d3184dda087266583 100644 --- a/MathLib/LinAlg/Eigen/EigenTools.h +++ b/MathLib/LinAlg/Eigen/EigenTools.h @@ -34,7 +34,7 @@ void applyKnownSolution(EigenMatrix &A, EigenVector &b, EigenVector &/*x*/, const std::vector<double> &_vec_knownX_x, double penalty_scaling = 1e+10); inline -void applyKnownSolution(Eigen::MatrixXd &A, Eigen::VectorXd &b, Eigen::VectorXd &/*x*/, +void applyKnownSolution(Eigen::MatrixXd const &A, Eigen::VectorXd &b, Eigen::VectorXd &/*x*/, const std::vector<Eigen::MatrixXd::Index> &_vec_knownX_id, const std::vector<double> &_vec_knownX_x, double penalty_scaling = 1e+10) { diff --git a/ParameterLib/TimeDependentHeterogeneousParameter.cpp b/ParameterLib/TimeDependentHeterogeneousParameter.cpp index 6e26214796443e649b4ec98c431e544a813e4bfd..7c3e3be59d915012771c9876a0320e29adef74f9 100644 --- a/ParameterLib/TimeDependentHeterogeneousParameter.cpp +++ b/ParameterLib/TimeDependentHeterogeneousParameter.cpp @@ -66,12 +66,12 @@ std::vector<double> TimeDependentHeterogeneousParameter::operator()( auto r0 = _time_parameter_mapping[k - 1].second->operator()(t, pos); std::transform(r0.begin(), r0.end(), r0.begin(), - [alpha](auto& v) { return (1 - alpha) * v; }); + [alpha](auto const& v) { return (1 - alpha) * v; }); auto r1 = _time_parameter_mapping[k].second->operator()(t, pos); std::transform(r1.begin(), r1.end(), r1.begin(), - [alpha](auto& v) { return alpha * v; }); + [alpha](auto const& v) { return alpha * v; }); std::transform(r0.begin(), r0.end(), r1.begin(), r0.begin(), - [](auto& v0, auto const& v1) { return v0 + v1; }); + [](auto const& v0, auto const& v1) { return v0 + v1; }); return r0; } diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp index 98ef4430bddb669c1f85f67bdee3ee89d6f51413..1314db363c772a965127303670b6e84a538e5e84 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp +++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.cpp @@ -229,7 +229,7 @@ bool TwoPhaseFlowWithPrhoMaterialProperties::computeConstitutiveRelation( } void TwoPhaseFlowWithPrhoMaterialProperties::calculateResidual( const int material_id, double const pl, double const X, double const T, - double Sw, double rho_h2_wet, ResidualVector& res) + double const Sw, double const rho_h2_wet, ResidualVector& res) { const double pg = pl + _capillary_pressure_models[material_id]->getCapillaryPressure(Sw); @@ -243,8 +243,8 @@ void TwoPhaseFlowWithPrhoMaterialProperties::calculateResidual( void TwoPhaseFlowWithPrhoMaterialProperties::calculateJacobian( const int material_id, double const /*t*/, ParameterLib::SpatialPosition const& /*x*/, double const pl, - double const /*X*/, double const T, JacobianMatrix& Jac, double Sw, - double rho_h2_wet) + double const /*X*/, double const T, JacobianMatrix& Jac, double const Sw, + double const rho_h2_wet) { const double pg = pl + _capillary_pressure_models[material_id]->getCapillaryPressure(Sw);