Removed numCells parameter
This commit is contained in:
@@ -54,7 +54,6 @@ create (const ParameterGroup& params,
|
||||
return unique_ptr <OutputWriter> (new Format (params,
|
||||
eclipseState,
|
||||
phaseUsage,
|
||||
grid->number_of_cells,
|
||||
grid->global_cell));
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ public:
|
||||
EclipseWriter(const parameter::ParameterGroup& params,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
const Opm::PhaseUsage &phaseUsage,
|
||||
int numCells,
|
||||
const int* compressedToCartesianCellIdx);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1417,12 +1417,9 @@ void EclipseWriter::writeTimeStep(const SimulatorTimerInterface& timer,
|
||||
EclipseWriter::EclipseWriter(const parameter::ParameterGroup& params,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
const Opm::PhaseUsage &phaseUsage,
|
||||
int numCells,
|
||||
const int* compressedToCartesianCellIdx)
|
||||
: eclipseState_(eclipseState)
|
||||
, numCells_(numCells)
|
||||
, compressedToCartesianCellIdx_(compressedToCartesianCellIdx)
|
||||
, gridToEclipseIdx_(numCells, int(-1) )
|
||||
, phaseUsage_(phaseUsage)
|
||||
{
|
||||
const auto eclGrid = eclipseState->getInputGrid();
|
||||
@@ -1430,11 +1427,14 @@ EclipseWriter::EclipseWriter(const parameter::ParameterGroup& params,
|
||||
cartesianSize_[1] = eclGrid->getNY();
|
||||
cartesianSize_[2] = eclGrid->getNZ();
|
||||
|
||||
numCells_ = eclGrid->getNumActive();
|
||||
gridToEclipseIdx_ = std::vector<int>(numCells_, int(-1) );
|
||||
|
||||
if( compressedToCartesianCellIdx ) {
|
||||
// if compressedToCartesianCellIdx available then
|
||||
// compute mapping to eclipse order
|
||||
std::map< int , int > indexMap;
|
||||
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
for (int cellIdx = 0; cellIdx < numCells_; ++cellIdx) {
|
||||
int cartesianCellIdx = compressedToCartesianCellIdx[cellIdx];
|
||||
indexMap[ cartesianCellIdx ] = cellIdx;
|
||||
}
|
||||
@@ -1446,7 +1446,7 @@ EclipseWriter::EclipseWriter(const parameter::ParameterGroup& params,
|
||||
}
|
||||
else {
|
||||
// if not compressedToCartesianCellIdx was given use identity
|
||||
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||
for (int cellIdx = 0; cellIdx < numCells_; ++cellIdx) {
|
||||
gridToEclipseIdx_[ cellIdx ] = cellIdx;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ std::shared_ptr<Opm::EclipseWriter> createEclipseWriter(std::shared_ptr<const Op
|
||||
std::shared_ptr<Opm::EclipseWriter> eclipseWriter = std::make_shared<Opm::EclipseWriter>(params,
|
||||
eclipseState,
|
||||
phaseUsage,
|
||||
ourFinerUnstructuredGrid.number_of_cells,
|
||||
compressedToCartesianCellIdx);
|
||||
|
||||
return eclipseWriter;
|
||||
|
||||
@@ -93,7 +93,6 @@ void createEclipseWriter(const char *deckString)
|
||||
eclWriter.reset(new Opm::EclipseWriter(params,
|
||||
eclipseState,
|
||||
phaseUsage,
|
||||
ourFinerUnstructuredGrid.number_of_cells,
|
||||
0));
|
||||
|
||||
// this check is disabled so far, because UnstructuredGrid uses some weird definition
|
||||
|
||||
@@ -208,7 +208,6 @@ Opm::EclipseWriterPtr createEclipseWriter(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseWriterPtr eclWriter(new Opm::EclipseWriter(params,
|
||||
eclipseState,
|
||||
phaseUsage,
|
||||
eclipseState->getInputGrid()->getCartesianSize(),
|
||||
0));
|
||||
return eclWriter;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,6 @@ Opm::EclipseWriterPtr createEclipseWriter(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseWriterPtr eclWriter(new Opm::EclipseWriter(params,
|
||||
eclipseState,
|
||||
phaseUsage,
|
||||
eclipseState->getInputGrid()->getCartesianSize(),
|
||||
0));
|
||||
return eclWriter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user