mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
OutputBlackoilModule: move updateInplaceVolumesSurface to FIPContainer
This commit is contained in:
parent
63042c25ee
commit
3ffd6594f2
@ -184,6 +184,43 @@ assignGasWater(const unsigned globalDofIdx,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
void
|
||||
FIPContainer<FluidSystem>::
|
||||
assignVolumesSurface(const unsigned globalDofIdx,
|
||||
const std::array<Scalar, numPhases>& fip)
|
||||
{
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OIL].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OIL][globalDofIdx] = fip[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OilInLiquidPhase].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OilInLiquidPhase][globalDofIdx] = fip[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GAS].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GAS][globalDofIdx] = fip[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GasInGasPhase].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GasInGasPhase][globalDofIdx] = fip[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::WATER].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::WATER][globalDofIdx] = fip[waterPhaseIdx];
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> using FS = BlackOilFluidSystem<T,BlackOilDefaultIndexTraits>;
|
||||
|
||||
#define INSTANTIATE_TYPE(T) \
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
using FIPMap = std::unordered_map<Inplace::Phase, std::vector<Scalar>>;
|
||||
|
||||
static constexpr auto numPhases = FluidSystem::numPhases;
|
||||
static constexpr auto gasPhaseIdx = FluidSystem::gasPhaseIdx;
|
||||
static constexpr auto oilPhaseIdx = FluidSystem::oilPhaseIdx;
|
||||
static constexpr auto waterPhaseIdx = FluidSystem::waterPhaseIdx;
|
||||
|
||||
@ -77,6 +78,9 @@ public:
|
||||
const Scalar gasInPlaceWater,
|
||||
const Scalar waterInPlaceGas);
|
||||
|
||||
void assignVolumesSurface(const unsigned globalDofIdx,
|
||||
const std::array<Scalar, numPhases>& fip);
|
||||
|
||||
private:
|
||||
FIPMap& fip_;
|
||||
std::size_t bufferSize_ = 0;
|
||||
|
@ -1483,7 +1483,7 @@ private:
|
||||
fip [phaseIdx] = b * fipr[phaseIdx];
|
||||
}
|
||||
|
||||
this->updateInplaceVolumesSurface(globalDofIdx, fip);
|
||||
this->fipC_.assignVolumesSurface(globalDofIdx, fip);
|
||||
this->updateInplaceVolumesReservoir(globalDofIdx, fs, fipr);
|
||||
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
@ -1527,41 +1527,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FIPArray>
|
||||
void updateInplaceVolumesSurface(const unsigned globalDofIdx,
|
||||
const FIPArray& fip)
|
||||
{
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OIL].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OIL][globalDofIdx] = fip[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::OilInLiquidPhase].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::OilInLiquidPhase][globalDofIdx] = fip[oilPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GAS].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GAS][globalDofIdx] = fip[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(gasPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::GasInGasPhase].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::GasInGasPhase][globalDofIdx] = fip[gasPhaseIdx];
|
||||
}
|
||||
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) &&
|
||||
!this->fip_[Inplace::Phase::WATER].empty())
|
||||
{
|
||||
this->fip_[Inplace::Phase::WATER][globalDofIdx] = fip[waterPhaseIdx];
|
||||
}
|
||||
}
|
||||
|
||||
template <typename FluidState, typename FIPArray>
|
||||
void updateInplaceVolumesReservoir(const unsigned globalDofIdx,
|
||||
const FluidState& fs,
|
||||
|
Loading…
Reference in New Issue
Block a user