mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 22:03:26 -06:00
Merge pull request #2036 from blattms/improve-vanguard-layering-violation
Make sure subclass functions are not called before subclass is initia…
This commit is contained in:
commit
2b9e30df33
@ -81,10 +81,11 @@ private:
|
|||||||
static const int dimension = Grid::dimension;
|
static const int dimension = Grid::dimension;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
EclAluGridVanguard(Simulator& simulator)
|
||||||
* \brief Inherit the constructors from the base class.
|
: EclBaseVanguard<TypeTag>(simulator)
|
||||||
*/
|
{
|
||||||
using EclBaseVanguard<TypeTag>::EclBaseVanguard;
|
this->callImplementationInit();
|
||||||
|
}
|
||||||
|
|
||||||
~EclAluGridVanguard()
|
~EclAluGridVanguard()
|
||||||
{
|
{
|
||||||
|
@ -373,16 +373,6 @@ public:
|
|||||||
int outputInterval = EWOMS_GET_PARAM(TypeTag, int, EclOutputInterval);
|
int outputInterval = EWOMS_GET_PARAM(TypeTag, int, EclOutputInterval);
|
||||||
if (outputInterval >= 0)
|
if (outputInterval >= 0)
|
||||||
eclState_->getRestartConfig().overrideRestartWriteInterval(outputInterval);
|
eclState_->getRestartConfig().overrideRestartWriteInterval(outputInterval);
|
||||||
|
|
||||||
asImp_().createGrids_();
|
|
||||||
asImp_().filterConnections_();
|
|
||||||
asImp_().updateOutputDir_();
|
|
||||||
asImp_().finalizeInit_();
|
|
||||||
|
|
||||||
if (enableExperiments) {
|
|
||||||
Opm::RelpermDiagnostics relpermDiagnostics;
|
|
||||||
relpermDiagnostics.diagnosis(*eclState_, *deck_, asImp_().grid());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -538,6 +528,19 @@ public:
|
|||||||
std::unordered_set<std::string> defunctWellNames() const
|
std::unordered_set<std::string> defunctWellNames() const
|
||||||
{ return std::unordered_set<std::string>(); }
|
{ return std::unordered_set<std::string>(); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void callImplementationInit()
|
||||||
|
{
|
||||||
|
asImp_().createGrids_();
|
||||||
|
asImp_().filterConnections_();
|
||||||
|
asImp_().updateOutputDir_();
|
||||||
|
asImp_().finalizeInit_();
|
||||||
|
|
||||||
|
if (enableExperiments) {
|
||||||
|
Opm::RelpermDiagnostics relpermDiagnostics;
|
||||||
|
relpermDiagnostics.diagnosis(*eclState_, *deck_, asImp_().grid());
|
||||||
|
}
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
void updateOutputDir_()
|
void updateOutputDir_()
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,7 @@ class EclCpGridVanguard : public EclBaseVanguard<TypeTag>
|
|||||||
typedef EclBaseVanguard<TypeTag> ParentType;
|
typedef EclBaseVanguard<TypeTag> ParentType;
|
||||||
|
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||||
|
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, ElementMapper) ElementMapper;
|
typedef typename GET_PROP_TYPE(TypeTag, ElementMapper) ElementMapper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -81,10 +82,11 @@ private:
|
|||||||
typedef Dune::CartesianIndexMapper<Grid> CartesianIndexMapper;
|
typedef Dune::CartesianIndexMapper<Grid> CartesianIndexMapper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
EclCpGridVanguard(Simulator& simulator)
|
||||||
* \brief Inherit the constructors from the base class.
|
: EclBaseVanguard<TypeTag>(simulator)
|
||||||
*/
|
{
|
||||||
using EclBaseVanguard<TypeTag>::EclBaseVanguard;
|
this->callImplementationInit();
|
||||||
|
}
|
||||||
|
|
||||||
~EclCpGridVanguard()
|
~EclCpGridVanguard()
|
||||||
{
|
{
|
||||||
|
@ -77,10 +77,11 @@ private:
|
|||||||
typedef CartesianIndexMapper* CartesianIndexMapperPointer;
|
typedef CartesianIndexMapper* CartesianIndexMapperPointer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
EclPolyhedralGridVanguard(Simulator& simulator)
|
||||||
* \brief Inherit the constructors from the base class.
|
: EclBaseVanguard<TypeTag>(simulator)
|
||||||
*/
|
{
|
||||||
using EclBaseVanguard<TypeTag>::EclBaseVanguard;
|
this->callImplementationInit();
|
||||||
|
}
|
||||||
|
|
||||||
~EclPolyhedralGridVanguard()
|
~EclPolyhedralGridVanguard()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user