mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
Simply return thpres_ vector as restart vector
This commit is contained in:
parent
2b4e09bc51
commit
4bb50eb1d8
@ -226,30 +226,7 @@ getRestartVector() const
|
||||
if (!enableThresholdPressure_)
|
||||
return {};
|
||||
|
||||
std::vector<Scalar> result(numEquilRegions_ * numEquilRegions_, 0.0);
|
||||
|
||||
if (this->restart_) {
|
||||
result = this->thpres_;
|
||||
return result;
|
||||
}
|
||||
|
||||
const auto& simConfig = eclState_.getSimulationConfig();
|
||||
const auto& thpres = simConfig.getThresholdPressure();
|
||||
|
||||
std::size_t idx = 0;
|
||||
for (unsigned j = 1; j <= numEquilRegions_; ++j) {
|
||||
for (unsigned i = 1; i <= numEquilRegions_; ++i, ++idx) {
|
||||
if (thpres.hasRegionBarrier(i, j)) {
|
||||
if (thpres.hasThresholdPressure(i, j)) {
|
||||
result[idx] = thpres.getThresholdPressure(i, j);
|
||||
} else {
|
||||
result[idx] = this->thpresDefault_[idx];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return this->thpres_;
|
||||
}
|
||||
|
||||
template<class Grid, class GridView, class ElementMapper, class Scalar>
|
||||
|
Loading…
Reference in New Issue
Block a user