mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: fix build
once again it was broken by a change in opm-parser for which the original authors not care to fix the mess they caused in ewoms. this time the culprit was OPM/opm-parser#677.
This commit is contained in:
parent
4a54e93554
commit
7f878bcadf
@ -158,7 +158,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void createGrids_()
|
void createGrids_()
|
||||||
{
|
{
|
||||||
std::vector<double> porv = this->eclState()->getDoubleGridProperty("PORV")->getData();
|
const std::vector<double>& porv = this->eclState()->getDoubleGridProperty("PORV")->getData();
|
||||||
|
|
||||||
// we use separate grid objects: one for the calculation of the initial condition
|
// we use separate grid objects: one for the calculation of the initial condition
|
||||||
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code
|
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code
|
||||||
|
@ -157,7 +157,7 @@ public:
|
|||||||
* \brief Return a pointer to the internalized schedule of the ECL deck
|
* \brief Return a pointer to the internalized schedule of the ECL deck
|
||||||
*/
|
*/
|
||||||
Opm::ScheduleConstPtr schedule() const
|
Opm::ScheduleConstPtr schedule() const
|
||||||
{ return eclState_->getSchedule(); }
|
{ return eclState()->getSchedule(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return a pointer to the EclipseGrid object
|
* \brief Return a pointer to the EclipseGrid object
|
||||||
@ -167,7 +167,7 @@ public:
|
|||||||
* to write EGRID files (which tends to be difficult with a plain Dune::CpGrid)
|
* to write EGRID files (which tends to be difficult with a plain Dune::CpGrid)
|
||||||
*/
|
*/
|
||||||
Opm::EclipseGridConstPtr eclGrid() const
|
Opm::EclipseGridConstPtr eclGrid() const
|
||||||
{ return eclState_->getEclipseGrid(); }
|
{ return eclState()->getEclipseGrid(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the name of the case.
|
* \brief Returns the name of the case.
|
||||||
|
@ -163,7 +163,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void createGrids_()
|
void createGrids_()
|
||||||
{
|
{
|
||||||
std::vector<double> porv = this->eclState()->getDoubleGridProperty("PORV")->getData();
|
const std::vector<double> &porv = this->eclState()->getDoubleGridProperty("PORV")->getData();
|
||||||
|
|
||||||
grid_ = new Dune::CpGrid();
|
grid_ = new Dune::CpGrid();
|
||||||
grid_->processEclipseFormat(this->eclState()->getEclipseGrid(),
|
grid_->processEclipseFormat(this->eclState()->getEclipseGrid(),
|
||||||
|
@ -219,7 +219,7 @@ public:
|
|||||||
return; // this module only consideres ecl writers...
|
return; // this module only consideres ecl writers...
|
||||||
|
|
||||||
typedef EclDeckUnits<TypeTag> DeckUnits;
|
typedef EclDeckUnits<TypeTag> DeckUnits;
|
||||||
const auto& deckUnits = this->simulator_.problem().deckUnits();
|
const DeckUnits& deckUnits = this->simulator_.problem().deckUnits();
|
||||||
|
|
||||||
typename ParentType::BufferType bufferType = ParentType::ElementBuffer;
|
typename ParentType::BufferType bufferType = ParentType::ElementBuffer;
|
||||||
if (pressuresOutput_()) {
|
if (pressuresOutput_()) {
|
||||||
|
@ -137,7 +137,7 @@ SET_BOOL_PROP(EclBaseProblem, EnableWriteAllSolutions, false);
|
|||||||
//
|
//
|
||||||
// By default, stop it after the universe will probably have stopped
|
// By default, stop it after the universe will probably have stopped
|
||||||
// to exist. (the ECL problem will finish the simulation explicitly
|
// to exist. (the ECL problem will finish the simulation explicitly
|
||||||
// after it simulated the last episode specified in the deck.)
|
// after it simulated the last episode specified in the deck->)
|
||||||
SET_SCALAR_PROP(EclBaseProblem, EndTime, 1e100);
|
SET_SCALAR_PROP(EclBaseProblem, EndTime, 1e100);
|
||||||
|
|
||||||
// The default for the initial time step size of the simulation [s].
|
// The default for the initial time step size of the simulation [s].
|
||||||
@ -281,7 +281,7 @@ public:
|
|||||||
this->gravity_ = 0.0;
|
this->gravity_ = 0.0;
|
||||||
|
|
||||||
// the "NOGRAV" keyword from Frontsim disables gravity...
|
// the "NOGRAV" keyword from Frontsim disables gravity...
|
||||||
const auto& deck = simulator.gridManager().deck();
|
Opm::DeckConstPtr deck = simulator.gridManager().deck();
|
||||||
if (!deck->hasKeyword("NOGRAV") && EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
|
if (!deck->hasKeyword("NOGRAV") && EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
|
||||||
this->gravity_[dim - 1] = 9.80665;
|
this->gravity_[dim - 1] = 9.80665;
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ public:
|
|||||||
void endEpisode()
|
void endEpisode()
|
||||||
{
|
{
|
||||||
auto& simulator = this->simulator();
|
auto& simulator = this->simulator();
|
||||||
const auto& eclState = simulator.gridManager().eclState();
|
Opm::EclipseStateConstPtr eclState = simulator.gridManager().eclState();
|
||||||
int episodeIdx = simulator.episodeIndex();
|
int episodeIdx = simulator.episodeIndex();
|
||||||
|
|
||||||
Opm::TimeMapConstPtr timeMap = eclState->getSchedule()->getTimeMap();
|
Opm::TimeMapConstPtr timeMap = eclState->getSchedule()->getTimeMap();
|
||||||
@ -613,7 +613,7 @@ public:
|
|||||||
const auto& gridManager = this->simulator().gridManager();
|
const auto& gridManager = this->simulator().gridManager();
|
||||||
|
|
||||||
unsigned cartesianDofIdx = gridManager.cartesianIndex(elemIdx);
|
unsigned cartesianDofIdx = gridManager.cartesianIndex(elemIdx);
|
||||||
return deck->getKeyword("PVTNUM")->getIntData()[cartesianDofIdx] - 1;
|
return deck->getKeyword("PVTNUM").getIntData()[cartesianDofIdx] - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -717,8 +717,8 @@ private:
|
|||||||
|
|
||||||
void readRockParameters_()
|
void readRockParameters_()
|
||||||
{
|
{
|
||||||
auto deck = this->simulator().gridManager().deck();
|
Opm::DeckConstPtr deck = this->simulator().gridManager().deck();
|
||||||
auto eclState = this->simulator().gridManager().eclState();
|
Opm::EclipseStateConstPtr eclState = this->simulator().gridManager().eclState();
|
||||||
const auto& gridManager = this->simulator().gridManager();
|
const auto& gridManager = this->simulator().gridManager();
|
||||||
|
|
||||||
// the ROCK keyword has not been specified, so we don't need
|
// the ROCK keyword has not been specified, so we don't need
|
||||||
@ -726,14 +726,14 @@ private:
|
|||||||
if (!deck->hasKeyword("ROCK"))
|
if (!deck->hasKeyword("ROCK"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto rockKeyword = deck->getKeyword("ROCK");
|
const auto& rockKeyword = deck->getKeyword("ROCK");
|
||||||
rockParams_.resize(rockKeyword->size());
|
rockParams_.resize(rockKeyword.size());
|
||||||
for (size_t rockRecordIdx = 0; rockRecordIdx < rockKeyword->size(); ++ rockRecordIdx) {
|
for (size_t rockRecordIdx = 0; rockRecordIdx < rockKeyword.size(); ++ rockRecordIdx) {
|
||||||
const auto rockRecord = rockKeyword->getRecord(rockRecordIdx);
|
const auto& rockRecord = rockKeyword.getRecord(rockRecordIdx);
|
||||||
rockParams_[rockRecordIdx].referencePressure =
|
rockParams_[rockRecordIdx].referencePressure =
|
||||||
rockRecord->getItem("PREF")->getSIDouble(0);
|
rockRecord.getItem("PREF").getSIDouble(0);
|
||||||
rockParams_[rockRecordIdx].compressibility =
|
rockParams_[rockRecordIdx].compressibility =
|
||||||
rockRecord->getItem("COMPRESSIBILITY")->getSIDouble(0);
|
rockRecord.getItem("COMPRESSIBILITY").getSIDouble(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PVTNUM has not been specified, so everything is in the first region and we
|
// PVTNUM has not been specified, so everything is in the first region and we
|
||||||
@ -756,8 +756,8 @@ private:
|
|||||||
void readMaterialParameters_()
|
void readMaterialParameters_()
|
||||||
{
|
{
|
||||||
const auto& gridManager = this->simulator().gridManager();
|
const auto& gridManager = this->simulator().gridManager();
|
||||||
auto deck = gridManager.deck();
|
Opm::DeckConstPtr deck = gridManager.deck();
|
||||||
auto eclState = gridManager.eclState();
|
Opm::EclipseStateConstPtr eclState = gridManager.eclState();
|
||||||
|
|
||||||
size_t numDof = this->model().numGridDof();
|
size_t numDof = this->model().numGridDof();
|
||||||
|
|
||||||
@ -767,7 +767,7 @@ private:
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// permeability
|
// permeability
|
||||||
|
|
||||||
// read the intrinsic permeabilities from the eclState. Note that all arrays
|
// read the intrinsic permeabilities from the eclState-> Note that all arrays
|
||||||
// provided by eclState are one-per-cell of "uncompressed" grid, whereas the
|
// provided by eclState are one-per-cell of "uncompressed" grid, whereas the
|
||||||
// dune-cornerpoint grid object might remove a few elements...
|
// dune-cornerpoint grid object might remove a few elements...
|
||||||
if (eclState->hasDoubleGridProperty("PERMX")) {
|
if (eclState->hasDoubleGridProperty("PERMX")) {
|
||||||
@ -864,8 +864,8 @@ private:
|
|||||||
|
|
||||||
void initFluidSystem_()
|
void initFluidSystem_()
|
||||||
{
|
{
|
||||||
const auto deck = this->simulator().gridManager().deck();
|
Opm::DeckConstPtr deck = this->simulator().gridManager().deck();
|
||||||
const auto eclState = this->simulator().gridManager().eclState();
|
Opm::EclipseStateConstPtr eclState = this->simulator().gridManager().eclState();
|
||||||
|
|
||||||
FluidSystem::initFromDeck(deck, eclState);
|
FluidSystem::initFromDeck(deck, eclState);
|
||||||
}
|
}
|
||||||
@ -873,7 +873,7 @@ private:
|
|||||||
void readInitialCondition_()
|
void readInitialCondition_()
|
||||||
{
|
{
|
||||||
const auto& gridManager = this->simulator().gridManager();
|
const auto& gridManager = this->simulator().gridManager();
|
||||||
const auto deck = gridManager.deck();
|
Opm::DeckConstPtr deck = gridManager.deck();
|
||||||
|
|
||||||
if (!deck->hasKeyword("EQUIL"))
|
if (!deck->hasKeyword("EQUIL"))
|
||||||
readExplicitInitialCondition_();
|
readExplicitInitialCondition_();
|
||||||
@ -907,8 +907,8 @@ private:
|
|||||||
void readExplicitInitialCondition_()
|
void readExplicitInitialCondition_()
|
||||||
{
|
{
|
||||||
const auto& gridManager = this->simulator().gridManager();
|
const auto& gridManager = this->simulator().gridManager();
|
||||||
const auto deck = gridManager.deck();
|
Opm::DeckConstPtr deck = gridManager.deck();
|
||||||
const auto eclState = gridManager.eclState();
|
Opm::EclipseStateConstPtr eclState = gridManager.eclState();
|
||||||
|
|
||||||
// since the values specified in the deck do not need to be consistent, we use an
|
// since the values specified in the deck do not need to be consistent, we use an
|
||||||
// initial condition that conserves the total mass specified by these values.
|
// initial condition that conserves the total mass specified by these values.
|
||||||
@ -941,17 +941,17 @@ private:
|
|||||||
initialFluidStates_.resize(numDof);
|
initialFluidStates_.resize(numDof);
|
||||||
|
|
||||||
const std::vector<double> &waterSaturationData =
|
const std::vector<double> &waterSaturationData =
|
||||||
deck->getKeyword("SWAT")->getSIDoubleData();
|
deck->getKeyword("SWAT").getSIDoubleData();
|
||||||
const std::vector<double> &gasSaturationData =
|
const std::vector<double> &gasSaturationData =
|
||||||
deck->getKeyword("SGAS")->getSIDoubleData();
|
deck->getKeyword("SGAS").getSIDoubleData();
|
||||||
const std::vector<double> &pressureData =
|
const std::vector<double> &pressureData =
|
||||||
deck->getKeyword("PRESSURE")->getSIDoubleData();
|
deck->getKeyword("PRESSURE").getSIDoubleData();
|
||||||
const std::vector<double> *rsData = 0;
|
const std::vector<double> *rsData = 0;
|
||||||
if (enableDisgas)
|
if (enableDisgas)
|
||||||
rsData = &deck->getKeyword("RS")->getSIDoubleData();
|
rsData = &deck->getKeyword("RS").getSIDoubleData();
|
||||||
const std::vector<double> *rvData = 0;
|
const std::vector<double> *rvData = 0;
|
||||||
if (enableVapoil)
|
if (enableVapoil)
|
||||||
rvData = &deck->getKeyword("RV")->getSIDoubleData();
|
rvData = &deck->getKeyword("RV").getSIDoubleData();
|
||||||
// initial reservoir temperature
|
// initial reservoir temperature
|
||||||
const std::vector<double> &tempiData =
|
const std::vector<double> &tempiData =
|
||||||
eclState->getDoubleGridProperty("TEMPI")->getData();
|
eclState->getDoubleGridProperty("TEMPI")->getData();
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void init(Opm::EclipseStateConstPtr eclState)
|
void init(Opm::EclipseStateConstPtr eclState)
|
||||||
{
|
{
|
||||||
const auto &deckSchedule = eclState->getSchedule();
|
Opm::ScheduleConstPtr deckSchedule = eclState->getSchedule();
|
||||||
|
|
||||||
// create the wells which intersect with the current process' grid
|
// create the wells which intersect with the current process' grid
|
||||||
for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule->numWells(); ++deckWellIdx)
|
for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule->numWells(); ++deckWellIdx)
|
||||||
@ -121,7 +121,7 @@ public:
|
|||||||
{
|
{
|
||||||
unsigned episodeIdx = simulator_.episodeIndex();
|
unsigned episodeIdx = simulator_.episodeIndex();
|
||||||
|
|
||||||
const auto &deckSchedule = eclState->getSchedule();
|
Opm::ScheduleConstPtr deckSchedule = eclState->getSchedule();
|
||||||
WellCompletionsMap wellCompMap;
|
WellCompletionsMap wellCompMap;
|
||||||
computeWellCompletionsMap_(episodeIdx, wellCompMap);
|
computeWellCompletionsMap_(episodeIdx, wellCompMap);
|
||||||
|
|
||||||
@ -537,7 +537,7 @@ public:
|
|||||||
template <class Restarter>
|
template <class Restarter>
|
||||||
void serialize(Restarter &res)
|
void serialize(Restarter &res)
|
||||||
{
|
{
|
||||||
/* do nothing: Everything which we need here is provided by the deck... */
|
/* do nothing: Everything which we need here is provided by the deck->.. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -822,7 +822,7 @@ protected:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
// overwrite the automatically computed effective
|
// overwrite the automatically computed effective
|
||||||
// permeability by the one specified in the deck. Note: this
|
// permeability by the one specified in the deck-> Note: this
|
||||||
// is not implemented by opm-parser yet...
|
// is not implemented by opm-parser yet...
|
||||||
/*
|
/*
|
||||||
Scalar Kh = completion->getEffectivePermeability();
|
Scalar Kh = completion->getEffectivePermeability();
|
||||||
@ -831,7 +831,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// overwrite the automatically computed connection
|
// overwrite the automatically computed connection
|
||||||
// transmissibilty factor by the one specified in the deck.
|
// transmissibilty factor by the one specified in the deck->
|
||||||
const auto& ctf = completion->getConnectionTransmissibilityFactorAsValueObject();
|
const auto& ctf = completion->getConnectionTransmissibilityFactorAsValueObject();
|
||||||
if (ctf.hasValue() && ctf.getValue() > 0.0)
|
if (ctf.hasValue() && ctf.getValue() > 0.0)
|
||||||
eclWell->setConnectionTransmissibilityFactor(elemCtx, dofIdx, ctf.getValue());
|
eclWell->setConnectionTransmissibilityFactor(elemCtx, dofIdx, ctf.getValue());
|
||||||
|
Loading…
Reference in New Issue
Block a user