EclipseWriter: Store the Cartesian sizes internally

because it this array can be deleted after calling the
constructor. TODO (?): Do the same for the compressed-to-Cartesian
cell index map.
This commit is contained in:
Andreas Lauser 2014-07-14 16:11:00 +02:00
parent 1a1920e5a4
commit 89cbfac621
2 changed files with 6 additions and 3 deletions

View File

@ -1003,10 +1003,12 @@ EclipseWriter::EclipseWriter(const parameter::ParameterGroup& params,
const int* cartesianSize)
: deck_ (deck)
, numCells_(numCells)
, cartesianSize_(cartesianSize)
, compressedToCartesianCellIdx_(compressedToCartesianCellIdx)
, phaseUsage_(phaseUsageFromDeck(deck_))
{
for (int i = 0; i < 3; ++i)
cartesianSize_[i] = cartesianSize[i];
init(params);
}

View File

@ -28,7 +28,8 @@
#include <string>
#include <vector>
#include <memory> // std::unique_ptr
#include <array>
#include <memory>
struct UnstructuredGrid;
@ -99,7 +100,7 @@ public:
private:
Opm::DeckConstPtr deck_;
int numCells_;
const int* cartesianSize_;
std::array<int, 3> cartesianSize_;
const int* compressedToCartesianCellIdx_;
bool enableOutput_;
int outputInterval_;