mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-12 08:54:53 -05:00
only do cartesian cell index lookup once
This commit is contained in:
1 parent
6aef3ee2f1
commit
5c142d1c4d
1 file changed
+5
-4
@@ -286,6 +286,10 @@ update(bool global, const TransUpdateQuantities update_quantities,
|
||||
DimVector faceAreaNormal;
|
||||
|
||||
inside.elemIdx = elemMapper.index(elem);
|
||||
// Get the Cartesian index of the origin cells (parent or equivalent cell on level zero),
|
||||
// for CpGrid with LGRs. For general grids and no LGRs, get the usual Cartesian Index.
|
||||
inside.cartElemIdx = this->lookUpCartesianData_.
|
||||
template getFieldPropCartesianIdx<Grid>(inside.elemIdx);
|
||||
|
||||
auto computeHalf = [this, &faceAreaNormal, &inside, &outside]
|
||||
(const auto& halfComputer,
|
||||
@@ -334,7 +338,6 @@ update(bool global, const TransUpdateQuantities update_quantities,
|
||||
// normally there would be two half-transmissibilities that would be
|
||||
// averaged. on the grid boundary there only is the half
|
||||
// transmissibility of the interior element.
|
||||
inside.cartElemIdx = cartMapper_.cartesianIndex(inside.elemIdx);
|
||||
applyMultipliers_(transBoundaryIs, intersection.indexInInside(), inside.cartElemIdx, transMult);
|
||||
transBoundary_.insert_or_assign(std::make_pair(inside.elemIdx, boundaryIsIdx), transBoundaryIs);
|
||||
|
||||
@@ -363,10 +366,8 @@ update(bool global, const TransUpdateQuantities update_quantities,
|
||||
const auto& outsideElem = intersection.outside();
|
||||
outside.elemIdx = elemMapper.index(outsideElem);
|
||||
|
||||
// Get the Cartesian indices of the origin cells (parent or equivalent cell on level zero),
|
||||
// Get the Cartesian index of the origin cells (parent or equivalent cell on level zero),
|
||||
// for CpGrid with LGRs. For general grids and no LGRs, get the usual Cartesian Index.
|
||||
inside.cartElemIdx = this->lookUpCartesianData_.
|
||||
template getFieldPropCartesianIdx<Grid>(inside.elemIdx);
|
||||
outside.cartElemIdx = this->lookUpCartesianData_.
|
||||
template getFieldPropCartesianIdx<Grid>(outside.elemIdx);
|
||||
|
||||
|
||||
Reference in new issue
Block a user