mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactored to use Cell::faceIndices
This commit is contained in:
parent
e171aa66ac
commit
e175a5c96f
@ -370,27 +370,24 @@ void RigGridBase::computeFaults()
|
|||||||
|
|
||||||
cvf::Vec3d currentCellFaceVertices[4];
|
cvf::Vec3d currentCellFaceVertices[4];
|
||||||
{
|
{
|
||||||
cvf::ubyte faceVertexIndices[4];
|
caf::SizeTArray4 faceVxIndices;
|
||||||
cellFaceVertexIndices(face, faceVertexIndices);
|
currentCell.faceIndices(face, &faceVxIndices);
|
||||||
const caf::SizeTArray8& cornerIndices = currentCell.cornerIndices();
|
|
||||||
|
|
||||||
currentCellFaceVertices[0].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[0]]]);
|
currentCellFaceVertices[0].set(m_mainGrid->nodes()[faceVxIndices[0]]);
|
||||||
currentCellFaceVertices[1].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[1]]]);
|
currentCellFaceVertices[1].set(m_mainGrid->nodes()[faceVxIndices[1]]);
|
||||||
currentCellFaceVertices[2].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[2]]]);
|
currentCellFaceVertices[2].set(m_mainGrid->nodes()[faceVxIndices[2]]);
|
||||||
currentCellFaceVertices[3].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[3]]]);
|
currentCellFaceVertices[3].set(m_mainGrid->nodes()[faceVxIndices[3]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Vec3d neighbourCellFaceVertices[4];
|
cvf::Vec3d neighbourCellFaceVertices[4];
|
||||||
{
|
{
|
||||||
cvf::ubyte faceVertexIndices[4];
|
caf::SizeTArray4 faceVxIndices;
|
||||||
StructGridInterface::FaceType opposite = StructGridInterface::oppositeFace(face);
|
currentCell.faceIndices(StructGridInterface::oppositeFace(face), &faceVxIndices);
|
||||||
cellFaceVertexIndices(opposite, faceVertexIndices);
|
|
||||||
const caf::SizeTArray8& cornerIndices = neighbourCell.cornerIndices();
|
|
||||||
|
|
||||||
neighbourCellFaceVertices[0].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[0]]]);
|
neighbourCellFaceVertices[0].set(m_mainGrid->nodes()[faceVxIndices[0]]);
|
||||||
neighbourCellFaceVertices[1].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[3]]]);
|
neighbourCellFaceVertices[1].set(m_mainGrid->nodes()[faceVxIndices[3]]);
|
||||||
neighbourCellFaceVertices[2].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[2]]]);
|
neighbourCellFaceVertices[2].set(m_mainGrid->nodes()[faceVxIndices[2]]);
|
||||||
neighbourCellFaceVertices[3].set(m_mainGrid->nodes()[cornerIndices[faceVertexIndices[1]]]);
|
neighbourCellFaceVertices[3].set(m_mainGrid->nodes()[faceVxIndices[1]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sharedFaceVertices = true;
|
bool sharedFaceVertices = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user