Fix to the flores indices

This commit is contained in:
David Landa Marban 2023-02-07 00:41:41 +01:00
parent 530f18d26c
commit b3a5a659f4

View File

@ -120,6 +120,7 @@ class EclOutputBlackOilModule : public EclGenericOutputBlackoilModule<GetPropTyp
using BaseType = EclGenericOutputBlackoilModule<FluidSystem, Scalar>; using BaseType = EclGenericOutputBlackoilModule<FluidSystem, Scalar>;
using Indices = GetPropType<TypeTag, Properties::Indices>; using Indices = GetPropType<TypeTag, Properties::Indices>;
enum { conti0EqIdx = Indices::conti0EqIdx };
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx }; enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
@ -697,60 +698,60 @@ public:
if (flowsInfo.faceId == 1) { if (flowsInfo.faceId == 1) {
if (!this->flowsi_[gasCompIdx].empty()) { if (!this->flowsi_[gasCompIdx].empty()) {
this->flowsi_[gasCompIdx][globalDofIdx] this->flowsi_[gasCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(gasCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
} }
if (!this->flowsi_[oilCompIdx].empty()) { if (!this->flowsi_[oilCompIdx].empty()) {
this->flowsi_[oilCompIdx][globalDofIdx] this->flowsi_[oilCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(oilCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
} }
if (!this->flowsi_[waterCompIdx].empty()) { if (!this->flowsi_[waterCompIdx].empty()) {
this->flowsi_[waterCompIdx][globalDofIdx] this->flowsi_[waterCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(waterCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
} }
} }
if (flowsInfo.faceId == 3) { if (flowsInfo.faceId == 3) {
if (!this->flowsj_[gasCompIdx].empty()) { if (!this->flowsj_[gasCompIdx].empty()) {
this->flowsj_[gasCompIdx][globalDofIdx] this->flowsj_[gasCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(gasCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
} }
if (!this->flowsj_[oilCompIdx].empty()) { if (!this->flowsj_[oilCompIdx].empty()) {
this->flowsj_[oilCompIdx][globalDofIdx] this->flowsj_[oilCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(oilCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
} }
if (!this->flowsj_[waterCompIdx].empty()) { if (!this->flowsj_[waterCompIdx].empty()) {
this->flowsj_[waterCompIdx][globalDofIdx] this->flowsj_[waterCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(waterCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
} }
} }
if (flowsInfo.faceId == 5) { if (flowsInfo.faceId == 5) {
if (!this->flowsk_[gasCompIdx].empty()) { if (!this->flowsk_[gasCompIdx].empty()) {
this->flowsk_[gasCompIdx][globalDofIdx] this->flowsk_[gasCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(gasCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
} }
if (!this->flowsk_[oilCompIdx].empty()) { if (!this->flowsk_[oilCompIdx].empty()) {
this->flowsk_[oilCompIdx][globalDofIdx] this->flowsk_[oilCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(oilCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
} }
if (!this->flowsk_[waterCompIdx].empty()) { if (!this->flowsk_[waterCompIdx].empty()) {
this->flowsk_[waterCompIdx][globalDofIdx] this->flowsk_[waterCompIdx][globalDofIdx]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(waterCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
} }
} }
if (flowsInfo.faceId == -2) { if (flowsInfo.faceId == -2) {
if (!this->flowsn_[gasCompIdx].second.first.empty()) { if (!this->flowsn_[gasCompIdx].second.first.empty()) {
this->flowsn_[gasCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId; this->flowsn_[gasCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId;
this->flowsn_[gasCompIdx].second.second[flowsInfo.nncId] this->flowsn_[gasCompIdx].second.second[flowsInfo.nncId]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(gasCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
} }
if (!this->flowsn_[oilCompIdx].second.first.empty()) { if (!this->flowsn_[oilCompIdx].second.first.empty()) {
this->flowsn_[oilCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId; this->flowsn_[oilCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId;
this->flowsn_[oilCompIdx].second.second[flowsInfo.nncId] this->flowsn_[oilCompIdx].second.second[flowsInfo.nncId]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(oilCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
} }
if (!this->flowsn_[waterCompIdx].second.first.empty()) { if (!this->flowsn_[waterCompIdx].second.first.empty()) {
this->flowsn_[waterCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId; this->flowsn_[waterCompIdx].second.first[flowsInfo.nncId] = flowsInfo.nncId;
this->flowsn_[waterCompIdx].second.second[flowsInfo.nncId] this->flowsn_[waterCompIdx].second.second[flowsInfo.nncId]
= flowsInfo.flow[Indices::canonicalToActiveComponentIndex(waterCompIdx)]; = flowsInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
} }
} }
} }
@ -762,41 +763,62 @@ public:
auto floresInfos =floresInf[globalDofIdx]; auto floresInfos =floresInf[globalDofIdx];
for (auto& floresInfo : floresInfos) { for (auto& floresInfo : floresInfos) {
if (floresInfo.faceId == 1) { if (floresInfo.faceId == 1) {
if (!this->floresi_[gasCompIdx].empty()) if (!this->floresi_[gasCompIdx].empty()) {
this->floresi_[gasCompIdx][globalDofIdx] = floresInfo.flow[gasPhaseIdx]; this->floresi_[gasCompIdx][globalDofIdx]
if (!this->floresi_[oilCompIdx].empty()) = floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
this->floresi_[oilCompIdx][globalDofIdx] = floresInfo.flow[oilPhaseIdx]; }
if (!this->floresi_[waterCompIdx].empty()) if (!this->floresi_[oilCompIdx].empty()) {
this->floresi_[waterCompIdx][globalDofIdx] = floresInfo.flow[waterPhaseIdx]; this->floresi_[oilCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
}
if (!this->floresi_[waterCompIdx].empty()) {
this->floresi_[waterCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
}
} }
if (floresInfo.faceId == 3) { if (floresInfo.faceId == 3) {
if (!this->floresj_[gasCompIdx].empty()) if (!this->floresj_[gasCompIdx].empty()) {
this->floresj_[gasCompIdx][globalDofIdx] = floresInfo.flow[gasPhaseIdx]; this->floresj_[gasCompIdx][globalDofIdx]
if (!this->floresj_[oilCompIdx].empty()) = floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
this->floresj_[oilCompIdx][globalDofIdx] = floresInfo.flow[oilPhaseIdx]; }
if (!this->floresj_[waterCompIdx].empty()) if (!this->floresj_[oilCompIdx].empty()) {
this->floresj_[waterCompIdx][globalDofIdx] = floresInfo.flow[waterPhaseIdx]; this->floresj_[oilCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
}
if (!this->floresj_[waterCompIdx].empty()) {
this->floresj_[waterCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
}
} }
if (floresInfo.faceId == 5) { if (floresInfo.faceId == 5) {
if (!this->floresk_[gasCompIdx].empty()) if (!this->floresk_[gasCompIdx].empty()) {
this->floresk_[gasCompIdx][globalDofIdx] = floresInfo.flow[gasPhaseIdx]; this->floresk_[gasCompIdx][globalDofIdx]
if (!this->floresk_[oilCompIdx].empty()) = floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
this->floresk_[oilCompIdx][globalDofIdx] = floresInfo.flow[oilPhaseIdx]; }
if (!this->floresk_[waterCompIdx].empty()) if (!this->floresk_[oilCompIdx].empty()) {
this->floresk_[waterCompIdx][globalDofIdx] = floresInfo.flow[waterPhaseIdx]; this->floresk_[oilCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
}
if (!this->floresk_[waterCompIdx].empty()) {
this->floresk_[waterCompIdx][globalDofIdx]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
}
} }
if (floresInfo.faceId == -2) { if (floresInfo.faceId == -2) {
if (!this->floresn_[gasCompIdx].second.first.empty()) { if (!this->floresn_[gasCompIdx].second.first.empty()) {
this->floresn_[gasCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId; this->floresn_[gasCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId;
this->floresn_[gasCompIdx].second.second[floresInfo.nncId] = floresInfo.flow[gasPhaseIdx]; this->floresn_[gasCompIdx].second.second[floresInfo.nncId]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(gasCompIdx)];
} }
if (!this->floresn_[oilCompIdx].second.first.empty()) { if (!this->floresn_[oilCompIdx].second.first.empty()) {
this->floresn_[oilCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId; this->floresn_[oilCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId;
this->floresn_[oilCompIdx].second.second[floresInfo.nncId] = floresInfo.flow[oilPhaseIdx]; this->floresn_[oilCompIdx].second.second[floresInfo.nncId]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(oilCompIdx)];
} }
if (!this->floresn_[waterCompIdx].second.first.empty()) { if (!this->floresn_[waterCompIdx].second.first.empty()) {
this->floresn_[waterCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId; this->floresn_[waterCompIdx].second.first[floresInfo.nncId] = floresInfo.nncId;
this->floresn_[waterCompIdx].second.second[floresInfo.nncId] = floresInfo.flow[waterPhaseIdx]; this->floresn_[waterCompIdx].second.second[floresInfo.nncId]
= floresInfo.flow[conti0EqIdx + Indices::canonicalToActiveComponentIndex(waterCompIdx)];
} }
} }
} }