EclipseWriter: stop making UnstructuredGrid think it is special
instead, the same interface as for Dune::CpGrid is now used. (i.e. pass all relevant information as separate arguments.)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "OutputWriter.hpp"
|
||||
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/io/eclipse/EclipseWriter.hpp>
|
||||
#include <opm/core/utility/parameters/Parameter.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
@@ -48,7 +49,11 @@ template <typename Format> unique_ptr <OutputWriter>
|
||||
create (const ParameterGroup& params,
|
||||
std::shared_ptr <const Deck> parser,
|
||||
std::shared_ptr <const UnstructuredGrid> grid) {
|
||||
return unique_ptr <OutputWriter> (new Format (params, parser, grid));
|
||||
return unique_ptr <OutputWriter> (new Format (params,
|
||||
parser,
|
||||
grid->number_of_cells,
|
||||
grid->global_cell,
|
||||
grid->cartdims));
|
||||
}
|
||||
|
||||
/// Map between keyword in configuration and the corresponding
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/grid/cpgpreprocess/preprocess.h>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
#include <opm/core/simulator/SimulatorState.hpp>
|
||||
#include <opm/core/simulator/SimulatorTimer.hpp>
|
||||
@@ -1159,30 +1161,15 @@ void EclipseWriter::writeTimeStep(
|
||||
EclipseWriter::EclipseWriter (
|
||||
const ParameterGroup& params,
|
||||
Opm::DeckConstPtr deck,
|
||||
int number_of_cells, const int* global_cell, const int* cart_dims,
|
||||
int dimensions)
|
||||
int number_of_cells, const int* global_cell, const int* cart_dims)
|
||||
: deck_ (deck)
|
||||
, number_of_cells_(number_of_cells)
|
||||
, dimensions_(dimensions)
|
||||
, cart_dims_(cart_dims)
|
||||
, global_cell_(global_cell)
|
||||
, uses_ (phaseUsageFromDeck (deck_)) {
|
||||
init(params);
|
||||
}
|
||||
|
||||
EclipseWriter::EclipseWriter (
|
||||
const ParameterGroup& params,
|
||||
Opm::DeckConstPtr deck,
|
||||
std::shared_ptr<const UnstructuredGrid> grid)
|
||||
: deck_ (deck)
|
||||
, grid_(grid)
|
||||
, number_of_cells_(grid->number_of_cells)
|
||||
, dimensions_(grid->dimensions)
|
||||
, cart_dims_(grid->cartdims)
|
||||
, global_cell_(grid->global_cell)
|
||||
, uses_ (phaseUsageFromDeck (deck_)) {
|
||||
init(params);
|
||||
}
|
||||
void EclipseWriter::init(const ParameterGroup& params)
|
||||
{
|
||||
// get the base name from the name of the deck
|
||||
|
||||
@@ -60,8 +60,7 @@ public:
|
||||
*/
|
||||
EclipseWriter(const parameter::ParameterGroup& params,
|
||||
Opm::DeckConstPtr deck,
|
||||
int number_of_cells, const int* global_cell, const int* cart_dims,
|
||||
int dimension);
|
||||
int number_of_cells, const int* global_cell, const int* cart_dims);
|
||||
|
||||
/**
|
||||
* We need a destructor in the compilation unit to avoid the
|
||||
@@ -95,7 +94,6 @@ public:
|
||||
private:
|
||||
Opm::DeckConstPtr deck_;
|
||||
int number_of_cells_;
|
||||
int dimensions_;
|
||||
const int* cart_dims_;
|
||||
const int* global_cell_;
|
||||
bool enableOutput_;
|
||||
|
||||
Reference in New Issue
Block a user