mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5417 from blattms/feature-correct-comment-parallel
Update wrong comment about storage of transmissibilities
This commit is contained in:
commit
58edb5b9aa
@ -846,18 +846,26 @@ createTransmissibilityArrays_(const std::array<bool,3>& is_tran)
|
|||||||
continue; // intersection is on the domain boundary
|
continue; // intersection is on the domain boundary
|
||||||
|
|
||||||
// In the EclState TRANX[c1] is transmissibility in X+
|
// In the EclState TRANX[c1] is transmissibility in X+
|
||||||
// direction. Ordering of compressed (c1,c2) and cartesian index
|
// direction. we only store transmissibilities in the +
|
||||||
// (gc1, gc2) is coherent (c1 < c2 <=> gc1 < gc2). This also
|
// direction. Same for Y and Z. Ordering of compressed (c1,c2) and cartesian index
|
||||||
// holds for the global grid. While distributing changes the
|
// (gc1, gc2) is coherent (c1 < c2 <=> gc1 < gc2) only in a serial run.
|
||||||
// order of the local indices, the transmissibilities are still
|
// In a parallel run this only holds in the interior as elements in the
|
||||||
// stored at the cell with the lower global cartesian index as
|
// ghost overlap region might be ordered after the others. Hence we need
|
||||||
// the fieldprops are communicated by the grid.
|
// to use the cartesian index to select the compressed index where to store
|
||||||
|
// the transmissibility value.
|
||||||
|
// c1 < c2 <=> gc1 < gc2 is no longer true (even in serial) when the grid is a
|
||||||
|
// CpGrid with LGRs. When cells c1 and c2 have the same parent
|
||||||
|
// cell on level zero, then gc1 == gc2.
|
||||||
unsigned c1 = elemMapper.index(intersection.inside());
|
unsigned c1 = elemMapper.index(intersection.inside());
|
||||||
unsigned c2 = elemMapper.index(intersection.outside());
|
unsigned c2 = elemMapper.index(intersection.outside());
|
||||||
int gc1 = cartMapper_.cartesianIndex(c1);
|
int gc1 = cartMapper_.cartesianIndex(c1);
|
||||||
int gc2 = cartMapper_.cartesianIndex(c2);
|
int gc2 = cartMapper_.cartesianIndex(c2);
|
||||||
if (std::tie(gc1, c1) > std::tie(gc2, c2))
|
if (std::tie(gc1, c1) > std::tie(gc2, c2))
|
||||||
continue; // we only need to handle each connection once, thank you.
|
// we only need to handle each connection once, thank you.
|
||||||
|
// We do this when gc1 is smaller than the other to find the
|
||||||
|
// correct place to store in parallel when ghost/overlap elements
|
||||||
|
// are ordered last
|
||||||
|
continue;
|
||||||
|
|
||||||
auto isID = details::isId(c1, c2);
|
auto isID = details::isId(c1, c2);
|
||||||
|
|
||||||
@ -906,21 +914,26 @@ resetTransmissibilityFromArrays_(const std::array<bool,3>& is_tran,
|
|||||||
continue; // intersection is on the domain boundary
|
continue; // intersection is on the domain boundary
|
||||||
|
|
||||||
// In the EclState TRANX[c1] is transmissibility in X+
|
// In the EclState TRANX[c1] is transmissibility in X+
|
||||||
// direction. Ordering of compressed (c1,c2) and cartesian index
|
// direction. we only store transmissibilities in the +
|
||||||
// (gc1, gc2) is coherent (c1 < c2 <=> gc1 < gc2). This also
|
// direction. Same for Y and Z. Ordering of compressed (c1,c2) and cartesian index
|
||||||
// holds for the global grid. While distributing changes the
|
// (gc1, gc2) is coherent (c1 < c2 <=> gc1 < gc2) only in a serial run.
|
||||||
// order of the local indices, the transmissibilities are still
|
// In a parallel run this only holds in the interior as elements in the
|
||||||
// stored at the cell with the lower global cartesian index as
|
// ghost overlap region might be ordered after the others. Hence we need
|
||||||
// the fieldprops are communicated by the grid.
|
// to use the cartesian index to select the compressed index where to store
|
||||||
/** c1 < c2 <=> gc1 < gc2 is no longer true when the grid is a
|
// the transmissibility value.
|
||||||
CpGrid with LGRs. When cells c1 and c2 have the same parent
|
// c1 < c2 <=> gc1 < gc2 is no longer true (even in serial) when the grid is a
|
||||||
cell on level zero, then gc1 == gc2. */
|
// CpGrid with LGRs. When cells c1 and c2 have the same parent
|
||||||
|
// cell on level zero, then gc1 == gc2.
|
||||||
unsigned c1 = elemMapper.index(intersection.inside());
|
unsigned c1 = elemMapper.index(intersection.inside());
|
||||||
unsigned c2 = elemMapper.index(intersection.outside());
|
unsigned c2 = elemMapper.index(intersection.outside());
|
||||||
int gc1 = cartMapper_.cartesianIndex(c1);
|
int gc1 = cartMapper_.cartesianIndex(c1);
|
||||||
int gc2 = cartMapper_.cartesianIndex(c2);
|
int gc2 = cartMapper_.cartesianIndex(c2);
|
||||||
if (std::tie(gc1, c1) > std::tie(gc2, c2))
|
if (std::tie(gc1, c1) > std::tie(gc2, c2))
|
||||||
continue; // we only need to handle each connection once, thank you.
|
// we only need to handle each connection once, thank you.
|
||||||
|
// We do this when gc1 is smaller than the other to find the
|
||||||
|
// correct place to read in parallel when ghost/overlap elements
|
||||||
|
// are ordered last
|
||||||
|
continue;
|
||||||
|
|
||||||
auto isID = details::isId(c1, c2);
|
auto isID = details::isId(c1, c2);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user