mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3549 Temporary LGR : Use activeCellInfo when computing depth properties
This commit is contained in:
parent
29c89eb135
commit
e0202f87af
@ -1587,39 +1587,74 @@ void RigCaseCellResultsData::computeDepthRelatedResults()
|
|||||||
const RigCell& cell = m_ownerMainGrid->globalCellArray()[cellIdx];
|
const RigCell& cell = m_ownerMainGrid->globalCellArray()[cellIdx];
|
||||||
|
|
||||||
bool isTemporaryGrid = cell.hostGrid()->isTempGrid();
|
bool isTemporaryGrid = cell.hostGrid()->isTempGrid();
|
||||||
|
if (isTemporaryGrid)
|
||||||
|
{
|
||||||
|
size_t resultIndex = activeCellInfo()->cellResultIndex(cellIdx);
|
||||||
|
if (resultIndex == cvf::UNDEFINED_SIZE_T) continue;
|
||||||
|
|
||||||
if (computeDepth || isTemporaryGrid)
|
{
|
||||||
|
depth[0][resultIndex] = cvf::Math::abs(cell.center().z());
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
cvf::Vec3d cellWidth =
|
||||||
|
cell.faceCenter(cvf::StructGridInterface::NEG_I) - cell.faceCenter(cvf::StructGridInterface::POS_I);
|
||||||
|
dx[0][resultIndex] = cellWidth.length();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
cvf::Vec3d cellWidth =
|
||||||
|
cell.faceCenter(cvf::StructGridInterface::NEG_J) - cell.faceCenter(cvf::StructGridInterface::POS_J);
|
||||||
|
dy[0][resultIndex] = cellWidth.length();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
cvf::Vec3d cellWidth =
|
||||||
|
cell.faceCenter(cvf::StructGridInterface::NEG_K) - cell.faceCenter(cvf::StructGridInterface::POS_K);
|
||||||
|
dz[0][resultIndex] = cellWidth.length();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
tops[0][resultIndex] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::NEG_K).z());
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
bottom[0][resultIndex] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::POS_K).z());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (computeDepth)
|
||||||
{
|
{
|
||||||
depth[0][cellIdx] = cvf::Math::abs(cell.center().z());
|
depth[0][cellIdx] = cvf::Math::abs(cell.center().z());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeDx || isTemporaryGrid)
|
if (computeDx)
|
||||||
{
|
{
|
||||||
cvf::Vec3d cellWidth =
|
cvf::Vec3d cellWidth =
|
||||||
cell.faceCenter(cvf::StructGridInterface::NEG_I) - cell.faceCenter(cvf::StructGridInterface::POS_I);
|
cell.faceCenter(cvf::StructGridInterface::NEG_I) - cell.faceCenter(cvf::StructGridInterface::POS_I);
|
||||||
dx[0][cellIdx] = cellWidth.length();
|
dx[0][cellIdx] = cellWidth.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeDy || isTemporaryGrid)
|
if (computeDy)
|
||||||
{
|
{
|
||||||
cvf::Vec3d cellWidth =
|
cvf::Vec3d cellWidth =
|
||||||
cell.faceCenter(cvf::StructGridInterface::NEG_J) - cell.faceCenter(cvf::StructGridInterface::POS_J);
|
cell.faceCenter(cvf::StructGridInterface::NEG_J) - cell.faceCenter(cvf::StructGridInterface::POS_J);
|
||||||
dy[0][cellIdx] = cellWidth.length();
|
dy[0][cellIdx] = cellWidth.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeDz || isTemporaryGrid)
|
if (computeDz)
|
||||||
{
|
{
|
||||||
cvf::Vec3d cellWidth =
|
cvf::Vec3d cellWidth =
|
||||||
cell.faceCenter(cvf::StructGridInterface::NEG_K) - cell.faceCenter(cvf::StructGridInterface::POS_K);
|
cell.faceCenter(cvf::StructGridInterface::NEG_K) - cell.faceCenter(cvf::StructGridInterface::POS_K);
|
||||||
dz[0][cellIdx] = cellWidth.length();
|
dz[0][cellIdx] = cellWidth.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeTops || isTemporaryGrid)
|
if (computeTops)
|
||||||
{
|
{
|
||||||
tops[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::NEG_K).z());
|
tops[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::NEG_K).z());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (computeBottom || isTemporaryGrid)
|
if (computeBottom)
|
||||||
{
|
{
|
||||||
bottom[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::POS_K).z());
|
bottom[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::POS_K).z());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user