mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#401) Sync Visible Cells: Preparing to rewrite the main loop
This commit is contained in:
parent
35c6316d9c
commit
66172ea852
@ -328,11 +328,12 @@ enum RigHexIntersectResult
|
|||||||
|
|
||||||
|
|
||||||
//RigHexIntersectResult isEclFemCellsMatching(cvf::Vec3d eclCorners[8], cvf::Vec3d elmCorners[8])
|
//RigHexIntersectResult isEclFemCellsMatching(cvf::Vec3d eclCorners[8], cvf::Vec3d elmCorners[8])
|
||||||
bool isEclFemCellsMatching(RigMainGrid* eclGrid, size_t reservoirCellIndex, RigFemPart* femPart, int elmIdx,
|
//bool isEclFemCellsMatching(RigMainGrid* eclGrid, size_t reservoirCellIndex, RigFemPart* femPart, int elmIdx,
|
||||||
double xyTolerance, double zTolerance)
|
// double xyTolerance, double zTolerance)
|
||||||
|
bool isEclFemCellsMatching(const cvf::Vec3d gomConvertedEclCell[8], bool isEclFaceNormalsOutwards,
|
||||||
|
RigFemPart* femPart, int elmIdx,
|
||||||
|
double xyTolerance, double zTolerance)
|
||||||
{
|
{
|
||||||
cvf::Vec3d gomConvertedEclCell[8];
|
|
||||||
estimatedFemCellFromEclCell(eclGrid, reservoirCellIndex, gomConvertedEclCell);
|
|
||||||
|
|
||||||
// Find the element top and bottom
|
// Find the element top and bottom
|
||||||
int femDeepZFaceIdx = 4;
|
int femDeepZFaceIdx = 4;
|
||||||
@ -384,7 +385,7 @@ bool isEclFemCellsMatching(RigMainGrid* eclGrid, size_t reservoirCellIndex, Rig
|
|||||||
eclShallowQuad[3] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[3]];
|
eclShallowQuad[3] = gomConvertedEclCell[localElmNodeIndicesForBotZFace[3]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eclGrid->isFaceNormalsOutwards())
|
if (!isEclFaceNormalsOutwards)
|
||||||
{
|
{
|
||||||
flipQuadWinding(femShallowQuad);
|
flipQuadWinding(femShallowQuad);
|
||||||
flipQuadWinding(femDeepestQuad);
|
flipQuadWinding(femDeepestQuad);
|
||||||
@ -499,6 +500,7 @@ RigCaseToCaseCellMapper::RigCaseToCaseCellMapper(RigMainGrid* masterEclGrid, Rig
|
|||||||
|
|
||||||
int elementCount = dependentFemPart->elementCount();
|
int elementCount = dependentFemPart->elementCount();
|
||||||
cvf::Vec3d elmCorners[8];
|
cvf::Vec3d elmCorners[8];
|
||||||
|
|
||||||
for (int elmIdx = 0; elmIdx < elementCount; ++elmIdx)
|
for (int elmIdx = 0; elmIdx < elementCount; ++elmIdx)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
@ -525,7 +527,12 @@ RigCaseToCaseCellMapper::RigCaseToCaseCellMapper(RigMainGrid* masterEclGrid, Rig
|
|||||||
size_t localCellIdx = masterEclGrid->cells()[closeCells[ccIdx]].gridLocalCellIndex();
|
size_t localCellIdx = masterEclGrid->cells()[closeCells[ccIdx]].gridLocalCellIndex();
|
||||||
masterEclGrid->cellCornerVertices(localCellIdx, cellCorners);
|
masterEclGrid->cellCornerVertices(localCellIdx, cellCorners);
|
||||||
|
|
||||||
bool isMatching = isEclFemCellsMatching(masterEclGrid, closeCells[ccIdx], dependentFemPart, elmIdx, xyTolerance, zTolerance);
|
cvf::Vec3d gomConvertedEclCell[8];
|
||||||
|
estimatedFemCellFromEclCell(masterEclGrid, closeCells[ccIdx], gomConvertedEclCell);
|
||||||
|
|
||||||
|
bool isMatching = isEclFemCellsMatching(gomConvertedEclCell, masterEclGrid->isFaceNormalsOutwards(),
|
||||||
|
dependentFemPart, elmIdx,
|
||||||
|
xyTolerance, zTolerance);
|
||||||
|
|
||||||
if (isMatching)
|
if (isMatching)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user