mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #466 from atgeirr/handle-nnc
Use NNC support from CpGrid.
This commit is contained in:
commit
c02ca868d6
@ -253,7 +253,8 @@ protected:
|
|||||||
/*isPeriodic=*/false,
|
/*isPeriodic=*/false,
|
||||||
/*flipNormals=*/false,
|
/*flipNormals=*/false,
|
||||||
/*clipZ=*/false,
|
/*clipZ=*/false,
|
||||||
porv);
|
porv,
|
||||||
|
this->eclState().getInputNNC());
|
||||||
|
|
||||||
// we use separate grid objects: one for the calculation of the initial condition
|
// 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
|
// via EQUIL and one for the actual simulation. The reason is that the EQUIL code
|
||||||
|
@ -272,8 +272,16 @@ public:
|
|||||||
|
|
||||||
// local indices of the faces of the inside and
|
// local indices of the faces of the inside and
|
||||||
// outside elements which contain the intersection
|
// outside elements which contain the intersection
|
||||||
unsigned insideFaceIdx = intersection.indexInInside();
|
int insideFaceIdx = intersection.indexInInside();
|
||||||
unsigned outsideFaceIdx = intersection.indexInOutside();
|
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 faceCenterInside;
|
||||||
DimVector faceCenterOutside;
|
DimVector faceCenterOutside;
|
||||||
@ -790,10 +798,11 @@ private:
|
|||||||
|
|
||||||
void computeHalfTrans_(Scalar& halfTrans,
|
void computeHalfTrans_(Scalar& halfTrans,
|
||||||
const DimVector& areaNormal,
|
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 DimVector& distance,
|
||||||
const DimMatrix& perm) const
|
const DimMatrix& perm) const
|
||||||
{
|
{
|
||||||
|
assert(faceIdx >= 0);
|
||||||
unsigned dimIdx = faceIdx/2;
|
unsigned dimIdx = faceIdx/2;
|
||||||
assert(dimIdx < dimWorld);
|
assert(dimIdx < dimWorld);
|
||||||
halfTrans = perm[dimIdx][dimIdx];
|
halfTrans = perm[dimIdx][dimIdx];
|
||||||
@ -807,10 +816,11 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DimVector distanceVector_(const DimVector& center,
|
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,
|
unsigned elemIdx,
|
||||||
const std::array<std::vector<DimVector>, dimWorld>& axisCentroids) const
|
const std::array<std::vector<DimVector>, dimWorld>& axisCentroids) const
|
||||||
{
|
{
|
||||||
|
assert(faceIdx >= 0);
|
||||||
unsigned dimIdx = faceIdx/2;
|
unsigned dimIdx = faceIdx/2;
|
||||||
assert(dimIdx < dimWorld);
|
assert(dimIdx < dimWorld);
|
||||||
DimVector x = center;
|
DimVector x = center;
|
||||||
|
Loading…
Reference in New Issue
Block a user