Add override to silence warnings.

This commit is contained in:
Atgeirr Flø Rasmussen 2019-12-10 11:29:27 +01:00
parent 201887f283
commit 63c766cd30
3 changed files with 13 additions and 13 deletions

View File

@ -57,7 +57,7 @@ namespace Opm
, aquct_data_(aquct_data) , aquct_data_(aquct_data)
{} {}
void endTimeStep() void endTimeStep() override
{ {
for (const auto& Qai: Base::Qai_) { for (const auto& Qai: Base::Qai_) {
Base::W_flux_ += Qai*Base::ebos_simulator_.timeStepSize(); Base::W_flux_ += Qai*Base::ebos_simulator_.timeStepSize();
@ -72,7 +72,7 @@ namespace Opm
Scalar mu_w_; // water viscosity Scalar mu_w_; // water viscosity
// This function is used to initialize and calculate the alpha_i for each grid connection to the aquifer // This function is used to initialize and calculate the alpha_i for each grid connection to the aquifer
inline void initializeConnections(const Aquancon::AquanconOutput& connection) inline void initializeConnections(const Aquancon::AquanconOutput& connection) override
{ {
const auto& eclState = Base::ebos_simulator_.vanguard().eclState(); const auto& eclState = Base::ebos_simulator_.vanguard().eclState();
const auto& ugrid = Base::ebos_simulator_.vanguard().grid(); const auto& ugrid = Base::ebos_simulator_.vanguard().grid();
@ -184,14 +184,14 @@ namespace Opm
} }
// This function implements Eq 5.7 of the EclipseTechnicalDescription // This function implements Eq 5.7 of the EclipseTechnicalDescription
inline void calculateInflowRate(int idx, const Simulator& simulator) inline void calculateInflowRate(int idx, const Simulator& simulator) override
{ {
Scalar a, b; Scalar a, b;
calculateEqnConstants(a,b,idx,simulator); calculateEqnConstants(a,b,idx,simulator);
Base::Qai_.at(idx) = Base::alphai_.at(idx)*( a - b * ( Base::pressure_current_.at(idx) - Base::pressure_previous_.at(idx) ) ); Base::Qai_.at(idx) = Base::alphai_.at(idx)*( a - b * ( Base::pressure_current_.at(idx) - Base::pressure_previous_.at(idx) ) );
} }
inline void calculateAquiferConstants() inline void calculateAquiferConstants() override
{ {
// We calculate the influx constant // We calculate the influx constant
beta_ = aquct_data_.c2 * aquct_data_.h beta_ = aquct_data_.c2 * aquct_data_.h
@ -205,7 +205,7 @@ namespace Opm
/ ( aquct_data_.k_a * aquct_data_.c1 ); / ( aquct_data_.k_a * aquct_data_.c1 );
} }
inline void calculateAquiferCondition() inline void calculateAquiferCondition() override
{ {
int pvttableIdx = aquct_data_.pvttableID - 1; int pvttableIdx = aquct_data_.pvttableID - 1;
@ -241,7 +241,7 @@ namespace Opm
// This function is for calculating the aquifer properties from equilibrium state with the reservoir // This function is for calculating the aquifer properties from equilibrium state with the reservoir
// TODO: this function can be moved to the Inteface class, since it is the same for both Aquifer models // TODO: this function can be moved to the Inteface class, since it is the same for both Aquifer models
inline Scalar calculateReservoirEquilibrium() inline Scalar calculateReservoirEquilibrium() override
{ {
// Since the global_indices are the reservoir index, we just need to extract the fluidstate at those indices // Since the global_indices are the reservoir index, we just need to extract the fluidstate at those indices
std::vector<Scalar> pw_aquifer; std::vector<Scalar> pw_aquifer;

View File

@ -59,7 +59,7 @@ namespace Opm
, aqufetp_data_(aqufetp_data) , aqufetp_data_(aqufetp_data)
{} {}
void endTimeStep() void endTimeStep() override
{ {
for (const auto& Qai: Base::Qai_) { for (const auto& Qai: Base::Qai_) {
Base::W_flux_ += Qai*Base::ebos_simulator_.timeStepSize(); Base::W_flux_ += Qai*Base::ebos_simulator_.timeStepSize();
@ -73,7 +73,7 @@ namespace Opm
const Aquifetp::AQUFETP_data aqufetp_data_; const Aquifetp::AQUFETP_data aqufetp_data_;
Scalar aquifer_pressure_; // aquifer Scalar aquifer_pressure_; // aquifer
inline void initializeConnections(const Aquancon::AquanconOutput& connection) inline void initializeConnections(const Aquancon::AquanconOutput& connection) override
{ {
const auto& eclState = Base::ebos_simulator_.vanguard().eclState(); const auto& eclState = Base::ebos_simulator_.vanguard().eclState();
const auto& ugrid = Base::ebos_simulator_.vanguard().grid(); const auto& ugrid = Base::ebos_simulator_.vanguard().grid();
@ -179,19 +179,19 @@ namespace Opm
return pa_; return pa_;
} }
inline void calculateAquiferConstants() inline void calculateAquiferConstants() override
{ {
Base::Tc_ = ( aqufetp_data_.C_t * aqufetp_data_.V0 ) / aqufetp_data_.J ; Base::Tc_ = ( aqufetp_data_.C_t * aqufetp_data_.V0 ) / aqufetp_data_.J ;
} }
// This function implements Eq 5.14 of the EclipseTechnicalDescription // This function implements Eq 5.14 of the EclipseTechnicalDescription
inline void calculateInflowRate(int idx, const Simulator& simulator) inline void calculateInflowRate(int idx, const Simulator& simulator) override
{ {
const Scalar td_Tc_ = simulator.timeStepSize() / Base::Tc_ ; const Scalar td_Tc_ = simulator.timeStepSize() / Base::Tc_ ;
const Scalar coef = (1 - exp(-td_Tc_)) / td_Tc_; const Scalar coef = (1 - exp(-td_Tc_)) / td_Tc_;
Base::Qai_.at(idx) = Base::alphai_[idx] * aqufetp_data_.J * dpai(idx) * coef; Base::Qai_.at(idx) = Base::alphai_[idx] * aqufetp_data_.J * dpai(idx) * coef;
} }
inline void calculateAquiferCondition() inline void calculateAquiferCondition() override
{ {
Base::rhow_.resize(Base::cell_idx_.size(),0.); Base::rhow_.resize(Base::cell_idx_.size(),0.);
@ -210,7 +210,7 @@ namespace Opm
aquifer_pressure_ = Base::pa0_ ; aquifer_pressure_ = Base::pa0_ ;
} }
inline Scalar calculateReservoirEquilibrium() inline Scalar calculateReservoirEquilibrium() override
{ {
// Since the global_indices are the reservoir index, we just need to extract the fluidstate at those indices // Since the global_indices are the reservoir index, we just need to extract the fluidstate at those indices
std::vector<Scalar> pw_aquifer; std::vector<Scalar> pw_aquifer;

View File

@ -809,7 +809,7 @@ namespace Opm
return perf_water_velocity_; return perf_water_velocity_;
} }
virtual void shutWell(int well_index) { virtual void shutWell(int well_index) override {
WellState::shutWell(well_index); WellState::shutWell(well_index);
const int np = numPhases(); const int np = numPhases();
for (int p = 0; p < np; ++p) for (int p = 0; p < np; ++p)