Merge pull request #466 from atgeirr/handle-nnc

Use NNC support from CpGrid.
This commit is contained in:
Arne Morten Kvarving 2019-02-14 10:22:42 +01:00 committed by GitHub
commit c02ca868d6
2 changed files with 16 additions and 5 deletions

View File

@ -253,7 +253,8 @@ protected:
/*isPeriodic=*/false,
/*flipNormals=*/false,
/*clipZ=*/false,
porv);
porv,
this->eclState().getInputNNC());
// we use separate grid objects: one for the calculation of the initial condition
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code

View File

@ -272,8 +272,16 @@ public:
// local indices of the faces of the inside and
// outside elements which contain the intersection
unsigned insideFaceIdx = intersection.indexInInside();
unsigned outsideFaceIdx = intersection.indexInOutside();
int insideFaceIdx = intersection.indexInInside();
int outsideFaceIdx = intersection.indexInOutside();
if (insideFaceIdx == -1) {
// NNC. Set zero transmissibility, as it will be
// *added to* by applyNncToGridTrans_() later.
assert(outsideFaceIdx == -1);
trans_[isId_(elemIdx, outsideElemIdx)] = 0.0;
continue;
}
DimVector faceCenterInside;
DimVector faceCenterOutside;
@ -790,10 +798,11 @@ private:
void computeHalfTrans_(Scalar& halfTrans,
const DimVector& areaNormal,
unsigned faceIdx, // in the reference element that contains the intersection
int faceIdx, // in the reference element that contains the intersection
const DimVector& distance,
const DimMatrix& perm) const
{
assert(faceIdx >= 0);
unsigned dimIdx = faceIdx/2;
assert(dimIdx < dimWorld);
halfTrans = perm[dimIdx][dimIdx];
@ -807,10 +816,11 @@ private:
}
DimVector distanceVector_(const DimVector& center,
unsigned faceIdx, // in the reference element that contains the intersection
int faceIdx, // in the reference element that contains the intersection
unsigned elemIdx,
const std::array<std::vector<DimVector>, dimWorld>& axisCentroids) const
{
assert(faceIdx >= 0);
unsigned dimIdx = faceIdx/2;
assert(dimIdx < dimWorld);
DimVector x = center;