mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-30 13:03:49 -06:00
threshold pressures: take advantage of the fact that opm-parser handles them symmetrically
i.e., thpres->hasRegionBarrier(i, j) == thpres->hasRegionBarrier(j, i) this allows to simplify the code a bit.
This commit is contained in:
parent
97eda5bb55
commit
e21f0b964e
@ -259,18 +259,12 @@ private:
|
||||
|
||||
unsigned equilRegionInside = elemEquilRegion_[insideElemIdx];
|
||||
unsigned equilRegionOutside = elemEquilRegion_[outsideElemIdx];
|
||||
if (thpres->hasRegionBarrier(equilRegionInside + 1, equilRegionOutside + 1) ||
|
||||
thpres->hasRegionBarrier(equilRegionOutside + 1, equilRegionInside + 1))
|
||||
{
|
||||
if (thpres->hasRegionBarrier(equilRegionInside + 1, equilRegionOutside + 1)) {
|
||||
Scalar pth = 0.0;
|
||||
if (thpres->hasThresholdPressure(equilRegionInside + 1, equilRegionOutside + 1)) {
|
||||
// threshold pressure explicitly specified
|
||||
pth = thpres->getThresholdPressure(equilRegionInside + 1, equilRegionOutside + 1);
|
||||
}
|
||||
else if (thpres->hasThresholdPressure(equilRegionOutside + 1, equilRegionInside + 1)) {
|
||||
// threshold pressure explicitly specified
|
||||
pth = thpres->getThresholdPressure(equilRegionOutside + 1, equilRegionInside + 1);
|
||||
}
|
||||
else {
|
||||
// take the threshold pressure from the initial condition
|
||||
unsigned offset = equilRegionInside*numEquilRegions_ + equilRegionOutside;
|
||||
|
Loading…
Reference in New Issue
Block a user