mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#401) Simplified code of topological rotation
This commit is contained in:
parent
255f2e496b
commit
7ee1d2eb95
@ -86,6 +86,9 @@ const int * RigCaseToCaseCellMapper::masterCaseCellIndices(int dependentCaseRese
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
class RigNeighborCornerFinder
|
class RigNeighborCornerFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -370,32 +373,28 @@ bool isEclFemCellsMatching(const cvf::Vec3d gomConvertedEclCell[8], bool isEclFa
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
int faceNodeCount;
|
eclDeepestQuad[0] = gomConvertedEclCell[4];
|
||||||
const int* localElmNodeIndicesForTopZFace = RigFemTypes::localElmNodeIndicesForFace(HEX8, 4, &faceNodeCount);
|
eclDeepestQuad[1] = gomConvertedEclCell[5];
|
||||||
const int* localElmNodeIndicesForBotZFace = RigFemTypes::localElmNodeIndicesForFace(HEX8, 5, &faceNodeCount);
|
eclDeepestQuad[2] = gomConvertedEclCell[6];
|
||||||
|
eclDeepestQuad[3] = gomConvertedEclCell[7];
|
||||||
|
|
||||||
eclDeepestQuad[0] = gomConvertedEclCell[localElmNodeIndicesForTopZFace[0]];
|
eclShallowQuad[0] = gomConvertedEclCell[0];
|
||||||
eclDeepestQuad[1] = gomConvertedEclCell[localElmNodeIndicesForTopZFace[1]];
|
eclShallowQuad[1] = gomConvertedEclCell[1];
|
||||||
eclDeepestQuad[2] = gomConvertedEclCell[localElmNodeIndicesForTopZFace[2]];
|
eclShallowQuad[2] = gomConvertedEclCell[2];
|
||||||
eclDeepestQuad[3] = gomConvertedEclCell[localElmNodeIndicesForTopZFace[3]];
|
eclShallowQuad[3] = gomConvertedEclCell[3];
|
||||||
|
|
||||||
eclShallowQuad[0] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[0]];
|
|
||||||
eclShallowQuad[1] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[1]];
|
|
||||||
eclShallowQuad[2] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[2]];
|
|
||||||
eclShallowQuad[3] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[3]];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isEclFaceNormalsOutwards)
|
|
||||||
{
|
|
||||||
flipQuadWinding(femShallowQuad);
|
|
||||||
flipQuadWinding(femDeepestQuad);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now the top/bottom have opposite winding. To make the comparisons and index rotations simpler
|
// Now the top/bottom have opposite winding. To make the comparisons and index rotations simpler
|
||||||
// flip the winding of the bottom face:
|
// flip the winding of the top or bottom face depending on whether the eclipse grid is inside-out
|
||||||
|
|
||||||
flipQuadWinding(eclShallowQuad);
|
if (isEclFaceNormalsOutwards)
|
||||||
flipQuadWinding(femShallowQuad);
|
{
|
||||||
|
flipQuadWinding(femShallowQuad);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flipQuadWinding(femDeepestQuad);
|
||||||
|
}
|
||||||
|
|
||||||
// We now need to rotate the fem quads to be alligned with the ecl quads
|
// We now need to rotate the fem quads to be alligned with the ecl quads
|
||||||
// Since the start point of the quad always is aligned with the opposite face-quad start
|
// Since the start point of the quad always is aligned with the opposite face-quad start
|
||||||
|
Loading…
Reference in New Issue
Block a user