mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
mark overridden methods as override
quells sca warnings
This commit is contained in:
parent
e383184598
commit
3c468c6112
@ -51,12 +51,12 @@ namespace Opm
|
|||||||
typedef typename Super::GridInterface GI;
|
typedef typename Super::GridInterface GI;
|
||||||
typedef typename Super::Vector Vector;
|
typedef typename Super::Vector Vector;
|
||||||
|
|
||||||
virtual void initSources(const Opm::ParameterGroup& param)
|
void initSources(const Opm::ParameterGroup& param) override
|
||||||
{
|
{
|
||||||
// Zero-initializing first.
|
// Zero-initializing first.
|
||||||
int nc = this->ginterf_.numberOfCells();
|
int nc = this->ginterf_.numberOfCells();
|
||||||
this->injection_rates_ = Opm::SparseVector<double>(nc);
|
this->injection_rates_ = Opm::SparseVector<double>(nc);
|
||||||
this->injection_rates_psolver_.resize(nc, 0.0);
|
this->injection_rates_psolver_.resize(nc, 0.0);
|
||||||
|
|
||||||
// this->injection_rates_.addElement(1.0, 0);
|
// this->injection_rates_.addElement(1.0, 0);
|
||||||
// this->injection_rates_psolver_[0] = 1.0;
|
// this->injection_rates_psolver_[0] = 1.0;
|
||||||
@ -99,10 +99,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void initBoundaryConditions(const Opm::ParameterGroup& param)
|
void initBoundaryConditions(const Opm::ParameterGroup& param) override
|
||||||
{
|
{
|
||||||
setupBoundaryConditions(param, this->ginterf_, this->bcond_);
|
setupBoundaryConditions(param, this->ginterf_, this->bcond_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isInside(const Vector& low, const Vector& high, const Vector& pt)
|
bool isInside(const Vector& low, const Vector& high, const Vector& pt)
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm::Elasticity {
|
||||||
namespace Elasticity {
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -43,6 +42,7 @@ protected:
|
|||||||
{
|
{
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! \brief Empty virtual destructor.
|
//! \brief Empty virtual destructor.
|
||||||
virtual ~Material() {}
|
virtual ~Material() {}
|
||||||
@ -95,12 +95,12 @@ public:
|
|||||||
//! \param[in] ID ID of the material
|
//! \param[in] ID ID of the material
|
||||||
//! \param[in] file The URL to the rocklist
|
//! \param[in] file The URL to the rocklist
|
||||||
static Material* create(int ID, const std::string& file);
|
static Material* create(int ID, const std::string& file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int id; //!< External material number
|
int id; //!< External material number
|
||||||
double rho; //!< Mass density
|
double rho; //!< Mass density
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace Opm::Elasticity
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
#include "material.hh"
|
#include "material.hh"
|
||||||
|
|
||||||
|
namespace Opm::Elasticity {
|
||||||
namespace Opm {
|
|
||||||
namespace Elasticity {
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Isotropic linear elastic material.
|
\brief Isotropic linear elastic material.
|
||||||
@ -38,16 +36,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Empty virtual destructor.
|
//! \brief Empty virtual destructor.
|
||||||
virtual ~Isotropic() {}
|
~Isotropic() override {}
|
||||||
|
|
||||||
//! \brief Returns the number of parameters describing this material.
|
//! \brief Returns the number of parameters describing this material.
|
||||||
virtual int numPar() const
|
int numPar() const override
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Returns the \a ipar'th parameter describing this material.
|
//! \brief Returns the \a ipar'th parameter describing this material.
|
||||||
virtual double getPar(int ipar = 1) const
|
double getPar(int ipar = 1) const override
|
||||||
{
|
{
|
||||||
return ipar == 1 ? E : nu;
|
return ipar == 1 ? E : nu;
|
||||||
}
|
}
|
||||||
@ -68,17 +66,18 @@ public:
|
|||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! \brief Prints the material properties to a stream.
|
//! \brief Prints the material properties to a stream.
|
||||||
virtual std::ostream& write(std::ostream& os) const;
|
std::ostream& write(std::ostream& os) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double E; //!< Young's modulus
|
double E; //!< Young's modulus
|
||||||
@ -101,32 +100,32 @@ public:
|
|||||||
double Gxy, double Gxz = double(-1), double Gyz = double(-1));
|
double Gxy, double Gxz = double(-1), double Gyz = double(-1));
|
||||||
|
|
||||||
//! \brief Empty virtual destructor.
|
//! \brief Empty virtual destructor.
|
||||||
virtual ~OrthotropicD() {}
|
~OrthotropicD() override {}
|
||||||
|
|
||||||
//! \brief Returns the number of parameters describing this material.
|
//! \brief Returns the number of parameters describing this material.
|
||||||
virtual int numPar() const
|
int numPar() const override
|
||||||
{
|
{
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Returns the \a ipar'th parameter describing this material.
|
//! \brief Returns the \a ipar'th parameter describing this material.
|
||||||
virtual double getPar(int ipar = 1) const;
|
double getPar(int ipar = 1) const override;
|
||||||
|
|
||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! \brief Prints the material properties to a stream.
|
//! \brief Prints the material properties to a stream.
|
||||||
virtual std::ostream& write(std::ostream& os) const;
|
std::ostream& write(std::ostream& os) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double E[6]; //!< The diagonal of the constitutive matrix
|
double E[6]; //!< The diagonal of the constitutive matrix
|
||||||
@ -142,37 +141,37 @@ public:
|
|||||||
OrthotropicSym(int ID, const Dune::DynamicVector<double>& Cu);
|
OrthotropicSym(int ID, const Dune::DynamicVector<double>& Cu);
|
||||||
|
|
||||||
//! \brief Empty virtual destructor.
|
//! \brief Empty virtual destructor.
|
||||||
virtual ~OrthotropicSym() {}
|
~OrthotropicSym() override {}
|
||||||
|
|
||||||
//! \brief Returns the number of parameters describing this material.
|
//! \brief Returns the number of parameters describing this material.
|
||||||
virtual int numPar() const
|
int numPar() const override
|
||||||
{
|
{
|
||||||
return 21;
|
return 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Returns the \a ipar'th parameter describing this material.
|
//! \brief Returns the \a ipar'th parameter describing this material.
|
||||||
virtual double getPar(int ipar = 1) const;
|
double getPar(int ipar = 1) const override;
|
||||||
|
|
||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
//! \brief Establishes the full constitutive matrix for this material.
|
//! \brief Establishes the full constitutive matrix for this material.
|
||||||
//! \param[out] C The constitutive matrix
|
//! \param[out] C The constitutive matrix
|
||||||
//! \param[in] invers If \e true, set up the inverse matrix instead
|
//! \param[in] invers If \e true, set up the inverse matrix instead
|
||||||
virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
|
||||||
bool invers = false) const;
|
bool invers = false) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! \brief Prints the material properties to a stream.
|
//! \brief Prints the material properties to a stream.
|
||||||
virtual std::ostream& write(std::ostream& os) const;
|
std::ostream& write(std::ostream& os) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double Cupper[21]; //!< Upper triangle of the symmetric constitutive matrix
|
double Cupper[21]; //!< Upper triangle of the symmetric constitutive matrix
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace Opm::Elasticity
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include <opm/porsol/euler/EulerUpstream.hpp>
|
#include <opm/porsol/euler/EulerUpstream.hpp>
|
||||||
#include <opm/porsol/euler/ImplicitCapillarity.hpp>
|
#include <opm/porsol/euler/ImplicitCapillarity.hpp>
|
||||||
#include <opm/grid/common/GridAdapter.hpp>
|
#include <opm/grid/common/GridAdapter.hpp>
|
||||||
#include <array>
|
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
@ -100,7 +99,7 @@ namespace Opm
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// ------- Typedefs -------
|
// ------- Typedefs -------
|
||||||
typedef typename Traits::template TransportSolver<GridInterface, typename Super::BCs>::Type TransportSolver;
|
typedef typename Traits::template TransportSolver<GridInterface, typename Super::BCs>::Type TransportSolver;
|
||||||
|
|
||||||
// ------- Methods -------
|
// ------- Methods -------
|
||||||
template <class FlowSol>
|
template <class FlowSol>
|
||||||
@ -109,8 +108,7 @@ namespace Opm
|
|||||||
const FlowSol& flow_solution,
|
const FlowSol& flow_solution,
|
||||||
const std::vector<double>& saturations) const;
|
const std::vector<double>& saturations) const;
|
||||||
/// Override from superclass.
|
/// Override from superclass.
|
||||||
virtual void initImpl(const Opm::ParameterGroup& param);
|
void initImpl(const Opm::ParameterGroup& param) override;
|
||||||
|
|
||||||
|
|
||||||
// ------- Data members -------
|
// ------- Data members -------
|
||||||
std::vector<double> last_saturation_state_;
|
std::vector<double> last_saturation_state_;
|
||||||
|
Loading…
Reference in New Issue
Block a user