mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Removed wrong lookup in coarse grid
This commit is contained in:
parent
1f4583f674
commit
0f0eb55d59
@ -352,11 +352,8 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
|
|||||||
axisCentroids),
|
axisCentroids),
|
||||||
permeability_[outsideElemIdx]);
|
permeability_[outsideElemIdx]);
|
||||||
|
|
||||||
auto coarseElemIdx = lookUpData_.template getFieldPropIdx<Grid>(elemIdx);;
|
applyNtg_(halfTrans1, insideFaceIdx, elemIdx, ntg);
|
||||||
auto coarseOutsideElemIdx = lookUpData_.template getFieldPropIdx<Grid>(outsideElemIdx);
|
applyNtg_(halfTrans2, outsideFaceIdx, outsideElemIdx, ntg);
|
||||||
|
|
||||||
applyNtg_(halfTrans1, insideFaceIdx, coarseElemIdx, ntg);
|
|
||||||
applyNtg_(halfTrans2, outsideFaceIdx, coarseOutsideElemIdx, ntg);
|
|
||||||
|
|
||||||
// convert half transmissibilities to full face
|
// convert half transmissibilities to full face
|
||||||
// transmissibilities using the harmonic mean
|
// transmissibilities using the harmonic mean
|
||||||
@ -474,8 +471,8 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
|
|||||||
axisCentroids),
|
axisCentroids),
|
||||||
porosity_[outsideElemIdx]);
|
porosity_[outsideElemIdx]);
|
||||||
|
|
||||||
applyNtg_(halfDiffusivity1, insideFaceIdx, coarseElemIdx, ntg);
|
applyNtg_(halfDiffusivity1, insideFaceIdx, elemIdx, ntg);
|
||||||
applyNtg_(halfDiffusivity2, outsideFaceIdx, coarseOutsideElemIdx, ntg);
|
applyNtg_(halfDiffusivity2, outsideFaceIdx, outsideElemIdx, ntg);
|
||||||
|
|
||||||
//TODO Add support for multipliers
|
//TODO Add support for multipliers
|
||||||
Scalar diffusivity;
|
Scalar diffusivity;
|
||||||
@ -500,7 +497,7 @@ update(bool global, const std::function<unsigned int(unsigned int)>& map, const
|
|||||||
// Loop over all elements (global grid) and store Cartesian index
|
// Loop over all elements (global grid) and store Cartesian index
|
||||||
for (const auto& elem : elements(grid_.leafGridView())) {
|
for (const auto& elem : elements(grid_.leafGridView())) {
|
||||||
int elemIdx = elemMapper.index(elem);
|
int elemIdx = elemMapper.index(elem);
|
||||||
int cartElemIdx = this->lookUpCartesianData_.template getFieldPropCartesianIdx<Grid>(elemIdx);
|
int cartElemIdx = cartMapper_.cartesianIndex(elemIdx);
|
||||||
globalToLocal[cartElemIdx] = elemIdx;
|
globalToLocal[cartElemIdx] = elemIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1043,7 +1040,7 @@ applyNncMultreg_(const std::unordered_map<std::size_t,int>& cartesianToCompresse
|
|||||||
const auto& inputNNC = this->eclState_.getInputNNC();
|
const auto& inputNNC = this->eclState_.getInputNNC();
|
||||||
const auto& transMult = this->eclState_.getTransMult();
|
const auto& transMult = this->eclState_.getTransMult();
|
||||||
|
|
||||||
auto compressedIdx = [&cartesianToCompressed, this](const std::size_t globIdx)
|
auto compressedIdx = [&cartesianToCompressed](const std::size_t globIdx)
|
||||||
{
|
{
|
||||||
auto ixPos = cartesianToCompressed.find(globIdx);
|
auto ixPos = cartesianToCompressed.find(globIdx);
|
||||||
return (ixPos == cartesianToCompressed.end()) ? -1 : ixPos->second;
|
return (ixPos == cartesianToCompressed.end()) ? -1 : ixPos->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user