mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed error in Fem to Eclipse rangefilter mapping.
The Fem elment was rotated again and again, bsed on previous rotation. Need to use the original rotation each time.
This commit is contained in:
parent
69ced2cdf0
commit
1977578d90
@ -444,6 +444,7 @@ RigCaseToCaseRangeFilterMapper::findBestEclCellFromFemCell(const RigFemPart* dep
|
||||
cvf::Vec3d elmCenter = RigCaseToCaseCellMapperTools::calculateCellCenter(elmCorners);
|
||||
|
||||
bool foundExactMatch = false;
|
||||
cvf::Vec3d rotatedElm[8];
|
||||
|
||||
for (size_t ccIdx = 0; ccIdx < closeCells.size(); ++ccIdx)
|
||||
{
|
||||
@ -458,10 +459,19 @@ RigCaseToCaseRangeFilterMapper::findBestEclCellFromFemCell(const RigFemPart* dep
|
||||
globCellIdxToBestMatch = cellIdx;
|
||||
sqDistToClosestCellCenter = sqDist;
|
||||
}
|
||||
|
||||
rotatedElm[0] = elmCorners[0];
|
||||
rotatedElm[1] = elmCorners[1];
|
||||
rotatedElm[2] = elmCorners[2];
|
||||
rotatedElm[3] = elmCorners[3];
|
||||
rotatedElm[4] = elmCorners[4];
|
||||
rotatedElm[5] = elmCorners[5];
|
||||
rotatedElm[6] = elmCorners[6];
|
||||
rotatedElm[7] = elmCorners[7];
|
||||
|
||||
RigCaseToCaseCellMapperTools::rotateCellTopologicallyToMatchBaseCell(geoMechConvertedEclCell, isEclFaceNormalsOutwards, elmCorners);
|
||||
RigCaseToCaseCellMapperTools::rotateCellTopologicallyToMatchBaseCell(geoMechConvertedEclCell, isEclFaceNormalsOutwards, rotatedElm);
|
||||
|
||||
foundExactMatch = RigCaseToCaseCellMapperTools::isEclFemCellsMatching(geoMechConvertedEclCell, elmCorners,
|
||||
foundExactMatch = RigCaseToCaseCellMapperTools::isEclFemCellsMatching(geoMechConvertedEclCell, rotatedElm,
|
||||
xyTolerance, zTolerance);
|
||||
|
||||
if (foundExactMatch)
|
||||
|
Loading…
Reference in New Issue
Block a user