mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
FIPContainer: add accessor for phase vectors
This commit is contained in:
@@ -79,11 +79,20 @@ allocate(const std::size_t bufferSize,
|
||||
|
||||
template<class FluidSystem>
|
||||
void
|
||||
FIPContainer<FluidSystem>::add(const Inplace::Phase phase)
|
||||
FIPContainer<FluidSystem>::
|
||||
add(const Inplace::Phase phase)
|
||||
{
|
||||
this->fip_[phase].resize(bufferSize_, 0.0);
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
const std::vector<typename FIPContainer<FluidSystem>::Scalar>&
|
||||
FIPContainer<FluidSystem>::
|
||||
get(const Inplace::Phase phase) const
|
||||
{
|
||||
return this->fip_.at(phase);
|
||||
}
|
||||
|
||||
template<class FluidSystem>
|
||||
bool
|
||||
FIPContainer<FluidSystem>::
|
||||
|
||||
@@ -77,6 +77,8 @@ public:
|
||||
Scalar strandedGas;
|
||||
};
|
||||
|
||||
const std::vector<Scalar>& get(const Inplace::Phase phase) const;
|
||||
|
||||
bool has(const Inplace::Phase phase) const;
|
||||
|
||||
bool hasCo2InGas() const;
|
||||
|
||||
@@ -1518,10 +1518,7 @@ makeRegionSum(Inplace& inplace,
|
||||
this->dynamicPoreVolume_);
|
||||
|
||||
for (const auto& phase : Inplace::phases()) {
|
||||
auto fipPos = this->fip_.find(phase);
|
||||
if (fipPos != this->fip_.end()) {
|
||||
update_inplace(phase, fipPos->second);
|
||||
}
|
||||
update_inplace(phase, this->fipC_.get(phase));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1438,7 +1438,7 @@ private:
|
||||
!this->pressureTimesPoreVolume_.empty())
|
||||
{
|
||||
assert(this->hydrocarbonPoreVolume_.size() == this->pressureTimesHydrocarbonVolume_.size());
|
||||
assert(this->fip_[Inplace::Phase::PoreVolume].size() == this->pressureTimesPoreVolume_.size());
|
||||
assert(this->fipC_.get(Inplace::Phase::PoreVolume).size() == this->pressureTimesPoreVolume_.size());
|
||||
|
||||
if (FluidSystem::phaseIsActive(oilPhaseIdx)) {
|
||||
this->pressureTimesPoreVolume_[globalDofIdx] =
|
||||
|
||||
Reference in New Issue
Block a user