diff --git a/opm/simulators/flow/ExtboContainer.cpp b/opm/simulators/flow/ExtboContainer.cpp index 6f9ee638d..894596322 100644 --- a/opm/simulators/flow/ExtboContainer.cpp +++ b/opm/simulators/flow/ExtboContainer.cpp @@ -58,6 +58,14 @@ assignVolumes(const unsigned globalDofIdx, Y_volume_[globalDofIdx] = yVolume; } +template +void ExtboContainer:: +assignZFraction(const unsigned globalDofIdx, + const Scalar zFraction) +{ + Z_fraction_[globalDofIdx] = zFraction; +} + template void ExtboContainer:: outputRestart(data::Solution& sol) diff --git a/opm/simulators/flow/ExtboContainer.hpp b/opm/simulators/flow/ExtboContainer.hpp index 802e84334..73044b74c 100644 --- a/opm/simulators/flow/ExtboContainer.hpp +++ b/opm/simulators/flow/ExtboContainer.hpp @@ -44,6 +44,9 @@ public: const Scalar xVolume, const Scalar yVolume); + void assignZFraction(const unsigned globalDofIdx, + const Scalar zFraction); + void outputRestart(data::Solution& sol); bool allocated() const diff --git a/opm/simulators/flow/OutputBlackoilModule.hpp b/opm/simulators/flow/OutputBlackoilModule.hpp index 89f2b726e..39f72aeb2 100644 --- a/opm/simulators/flow/OutputBlackoilModule.hpp +++ b/opm/simulators/flow/OutputBlackoilModule.hpp @@ -447,10 +447,8 @@ public: this->extboC_.assignVolumes(globalDofIdx, intQuants.xVolume().value(), intQuants.yVolume().value()); - } - - if (!this->extboC_.Z_fraction_.empty()) { - this->extboC_.Z_fraction_[globalDofIdx] = intQuants.zFraction().value(); + this->extboC_.assignZFraction(globalDofIdx, + intQuants.zFraction().value()); } if (!this->extboC_.mFracCo2_.empty()) {