mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-10 08:15:31 -06:00
Refactor: Change RigGridBase::cellCornerVertices to return std::array
Refactored RigGridBase::cellCornerVertices to return std::array<cvf::Vec3d, 8> by value instead of taking a reference to std::array as an output parameter. This change improves code readability and leverages modern C++ return value optimizations. Updated all call sites across the codebase to reflect the new function signature.
This commit is contained in:
1 parent
da69eef72b
commit
10182e99a7
41 files changed
+148
-214
No files matched your search
@@ -1139,7 +1139,6 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||
|
||||
std::vector<size_t> closeCells = findCloseCells( bb );
|
||||
|
||||
cvf::Vec3d hexCorners[8];
|
||||
for ( size_t ccIdx = 0; ccIdx < closeCells.size(); ++ccIdx )
|
||||
{
|
||||
RigElementType elmType = femPart->elementType( closeCells[ccIdx] );
|
||||
@@ -1147,6 +1146,8 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||
|
||||
const int* cornerIndices = femPart->connectivities( closeCells[ccIdx] );
|
||||
|
||||
std::array<cvf::Vec3d, 8> hexCorners;
|
||||
|
||||
hexCorners[0] = cvf::Vec3d( nodeCoords[cornerIndices[0]] );
|
||||
hexCorners[1] = cvf::Vec3d( nodeCoords[cornerIndices[1]] );
|
||||
hexCorners[2] = cvf::Vec3d( nodeCoords[cornerIndices[2]] );
|
||||
|
||||
Reference in new issue
Block a user