mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3185 Remove FixedArray
This commit is contained in:
@@ -1590,8 +1590,8 @@ void calculateConnectionGeometry(const RigCell& c1, const RigCell& c2, const std
|
||||
|
||||
std::vector<size_t> polygon;
|
||||
std::vector<cvf::Vec3d> intersections;
|
||||
caf::SizeTArray4 face1;
|
||||
caf::SizeTArray4 face2;
|
||||
std::array<size_t, 4> face1;
|
||||
std::array<size_t, 4> face2;
|
||||
c1.faceIndices(faceId, &face1);
|
||||
c2.faceIndices(cvf::StructGridInterface::oppositeFace(faceId), &face2);
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ int RigCell::firstIntersectionPoint(const cvf::Ray& ray, cvf::Vec3d* intersectio
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCell::faceIndices(cvf::StructGridInterface::FaceType face, caf::SizeTArray4* indices) const
|
||||
void RigCell::faceIndices(cvf::StructGridInterface::FaceType face, std::array<size_t, 4>* indices) const
|
||||
{
|
||||
cvf::ubyte faceVertexIndices[4];
|
||||
cvf::StructGridInterface::cellFaceVertexIndices(face, faceVertexIndices);
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
std::array<size_t, 8>& cornerIndices() { return m_cornerIndices;}
|
||||
const std::array<size_t, 8>& cornerIndices() const { return m_cornerIndices;}
|
||||
|
||||
void faceIndices(cvf::StructGridInterface::FaceType face, caf::SizeTArray4 * faceIndices) const ;
|
||||
void faceIndices(cvf::StructGridInterface::FaceType face, std::array<size_t, 4>* faceIndices) const ;
|
||||
|
||||
bool isInvalid() const { return m_isInvalid; }
|
||||
void setInvalid( bool val ) { m_isInvalid = val; }
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "RigResultAccessor.h"
|
||||
|
||||
#include "cafFixedArray.h"
|
||||
#include <array>
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
@@ -41,5 +41,5 @@ public:
|
||||
virtual double cellFaceScalarGlobIdx(size_t globCellIndex, cvf::StructGridInterface::FaceType faceId) const;
|
||||
|
||||
private:
|
||||
caf::FixedArray<cvf::ref<RigResultAccessor>, 6> m_resultAccessObjects;
|
||||
std::array<cvf::ref<RigResultAccessor>, 6> m_resultAccessObjects;
|
||||
};
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#include "cvfBoundingBox.h"
|
||||
#include "cvfStructGrid.h"
|
||||
#include "cvfCellRange.h"
|
||||
#include "cafFixedArray.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <vector>
|
||||
#include <array>
|
||||
|
||||
class RigMainGrid;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -44,10 +44,8 @@ public:
|
||||
public:
|
||||
explicit RigFaultsPrCellAccumulator(size_t reservoirCellCount)
|
||||
{
|
||||
const int initVals[6] = { NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT};
|
||||
caf::IntArray6 initVal;
|
||||
initVal = initVals;
|
||||
m_faultIdxForCellFace.resize(reservoirCellCount, initVal);
|
||||
std::array<int, 6> initVals = { NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT};
|
||||
m_faultIdxForCellFace.resize(reservoirCellCount, initVals);
|
||||
}
|
||||
|
||||
inline int faultIdx(size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face) const
|
||||
@@ -61,7 +59,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector< caf::IntArray6 > m_faultIdxForCellFace;
|
||||
std::vector<std::array<int, 6>> m_faultIdxForCellFace;
|
||||
};
|
||||
|
||||
|
||||
@@ -106,7 +104,7 @@ public:
|
||||
private:
|
||||
QString m_name;
|
||||
|
||||
caf::FixedArray<std::vector<cvf::CellRange>, 6> m_cellRangesForFaces;
|
||||
std::array<std::vector<cvf::CellRange>, 6> m_cellRangesForFaces;
|
||||
|
||||
std::vector<FaultFace> m_faultFaces;
|
||||
std::vector<size_t> m_connectionIndices;
|
||||
|
||||
@@ -379,7 +379,7 @@ size_t RigGridBase::reservoirCellIndex(size_t gridLocalCellIndex) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigGridBase::addCoarseningBox(size_t i1, size_t i2, size_t j1, size_t j2, size_t k1, size_t k2)
|
||||
{
|
||||
caf::SizeTArray6 box;
|
||||
std::array<size_t, 6> box;
|
||||
box[0] = i1;
|
||||
box[1] = i2;
|
||||
box[2] = j1;
|
||||
@@ -419,7 +419,7 @@ void RigGridBase::coarseningBox(size_t coarseningBoxIndex, size_t* i1, size_t* i
|
||||
|
||||
CVF_ASSERT(i1 && i2 && j1 && j2 && k1 && k2);
|
||||
|
||||
caf::SizeTArray6 box = m_coarseningBoxInfo[coarseningBoxIndex];
|
||||
const std::array<size_t, 6>& box = m_coarseningBoxInfo[coarseningBoxIndex];
|
||||
*i1 = box[0];
|
||||
*i2 = box[1];
|
||||
*j1 = box[2];
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifReaderInterface.h"
|
||||
#include "RigFault.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
|
||||
#include "cvfVector3.h"
|
||||
@@ -27,14 +30,9 @@
|
||||
#include "cvfStructGrid.h"
|
||||
#include "cvfStructGridGeometryGenerator.h"
|
||||
|
||||
#include "cafFixedArray.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "RifReaderInterface.h"
|
||||
#include "RigFault.h"
|
||||
|
||||
|
||||
class RigMainGrid;
|
||||
class RigCell;
|
||||
@@ -117,7 +115,7 @@ private:
|
||||
RigMainGrid* m_mainGrid;
|
||||
cvf::BoundingBox m_boundingBox;
|
||||
|
||||
std::vector<caf::SizeTArray6> m_coarseningBoxInfo;
|
||||
std::vector<std::array<size_t, 6>> m_coarseningBoxInfo;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -393,9 +393,9 @@ void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo)
|
||||
|
||||
double tolerance = 1e-6;
|
||||
|
||||
caf::SizeTArray4 faceIdxs;
|
||||
std::array<size_t, 4> faceIdxs;
|
||||
m_cells[gcIdx].faceIndices(face, &faceIdxs);
|
||||
caf::SizeTArray4 nbFaceIdxs;
|
||||
std::array<size_t, 4> nbFaceIdxs;
|
||||
m_cells[neighborReservoirCellIdx].faceIndices(StructGridInterface::oppositeFace(face), &nbFaceIdxs);
|
||||
|
||||
|
||||
|
||||
@@ -161,8 +161,8 @@ cvf::StructGridInterface::FaceType RigNNCData::calculateCellFaceOverlap(const Ri
|
||||
|
||||
std::vector<size_t> polygon;
|
||||
std::vector<cvf::Vec3d> intersections;
|
||||
caf::SizeTArray4 face1;
|
||||
caf::SizeTArray4 face2;
|
||||
std::array<size_t, 4> face1;
|
||||
std::array<size_t, 4> face2;
|
||||
c1.faceIndices((cvf::StructGridInterface::FaceType)(fIdx), &face1);
|
||||
c2.faceIndices(cvf::StructGridInterface::oppositeFace((cvf::StructGridInterface::FaceType)(fIdx)), &face2);
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
#include "cafFixedArray.h"
|
||||
|
||||
#include <cmath> // Needed for HUGE_VAL on Linux
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
Reference in New Issue
Block a user