rename completion to connection

This commit is contained in:
Tor Harald Sandve
2018-06-28 15:49:45 +02:00
parent edbeb4538e
commit 22d144c3cd
7 changed files with 56 additions and 56 deletions

View File

@@ -607,7 +607,7 @@ protected:
}
void updateWellTopology_(unsigned reportStepIdx OPM_UNUSED,
const WellConnectionsMap& wellCompletions,
const WellConnectionsMap& wellConnections,
std::vector<bool>& gridDofIsPenetrated) const
{
auto& model = simulator_.model();
@@ -643,14 +643,14 @@ protected:
unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
unsigned cartesianDofIdx = vanguard.cartesianIndex(globalDofIdx);
if (wellCompletions.count(cartesianDofIdx) == 0)
if (wellConnections.count(cartesianDofIdx) == 0)
// the current DOF is not contained in any well, so we must skip
// it...
continue;
gridDofIsPenetrated[globalDofIdx] = true;
auto eclWell = wellCompletions.at(cartesianDofIdx).second;
auto eclWell = wellConnections.at(cartesianDofIdx).second;
eclWell->addDof(elemCtx, dofIdx);
wells.insert(eclWell);
@@ -666,7 +666,7 @@ protected:
}
}
void computeWellConnectionsMap_(unsigned reportStepIdx OPM_UNUSED, WellConnectionsMap& cartesianIdxToCompletionMap)
void computeWellConnectionsMap_(unsigned reportStepIdx OPM_UNUSED, WellConnectionsMap& cartesianIdxToConnectionMap)
{
const auto& deckSchedule = simulator_.vanguard().schedule();
@@ -679,7 +679,7 @@ protected:
#endif
// compute the mapping from logically Cartesian indices to the well the
// respective completion.
// respective connection.
const std::vector<const Opm::Well*>& deckWells = deckSchedule.getWells(reportStepIdx);
for (size_t deckWellIdx = 0; deckWellIdx < deckWells.size(); ++deckWellIdx) {
const Opm::Well* deckWell = deckWells[deckWellIdx];
@@ -690,7 +690,7 @@ protected:
#ifndef NDEBUG
if( simulator_.vanguard().grid().comm().size() == 1 )
{
std::cout << "Well '" << wellName << "' suddenly appears in the completions "
std::cout << "Well '" << wellName << "' suddenly appears in the connection "
<< "for the report step, but has not been previously specified. "
<< "Ignoring.\n";
}
@@ -699,21 +699,21 @@ protected:
}
std::array<int, 3> cartesianCoordinate;
// set the well parameters defined by the current set of completions
const auto& completionSet = deckWell->getConnections(reportStepIdx);
for (size_t complIdx = 0; complIdx < completionSet.size(); complIdx ++) {
const auto& completion = completionSet.get(complIdx);
cartesianCoordinate[ 0 ] = completion.getI();
cartesianCoordinate[ 1 ] = completion.getJ();
cartesianCoordinate[ 2 ] = completion.getK();
// set the well parameters defined by the current set of connections
const auto& connectionSet = deckWell->getConnections(reportStepIdx);
for (size_t connIdx = 0; connIdx < connectionSet.size(); connIdx ++) {
const auto& connection = connectionSet.get(connIdx);
cartesianCoordinate[ 0 ] = connection.getI();
cartesianCoordinate[ 1 ] = connection.getJ();
cartesianCoordinate[ 2 ] = connection.getK();
unsigned cartIdx = simulator_.vanguard().cartesianIndex( cartesianCoordinate );
// in this code we only support each cell to be part of at most a single
// well. TODO (?) change this?
assert(cartesianIdxToCompletionMap.count(cartIdx) == 0);
assert(cartesianIdxToConnectionMap.count(cartIdx) == 0);
auto eclWell = wells_[wellIndex(wellName)];
cartesianIdxToCompletionMap[cartIdx] = std::make_pair(&completion, eclWell);
cartesianIdxToConnectionMap[cartIdx] = std::make_pair(&connection, eclWell);
}
}
}
@@ -735,7 +735,7 @@ protected:
}
}
// associate the well completions with grid cells and register them in the
// associate the well connections with grid cells and register them in the
// Peaceman well object
const auto& vanguard = simulator_.vanguard();
const GridView gridView = vanguard.gridView();
@@ -780,7 +780,7 @@ protected:
// permeability by the one specified in the deck-> Note: this
// is not implemented by opm-parser yet...
/*
Scalar Kh = completion->getEffectivePermeability();
Scalar Kh = connection->getEffectivePermeability();
if (std::isfinite(Kh) && Kh > 0.0)
eclWell->setEffectivePermeability(elemCtx, dofIdx, Kh);
*/