Merge pull request #523 from andlaus/EclipseWriter_add_new_parser

EclipseWriter: add new parser
This commit is contained in:
Atgeirr Flø Rasmussen
2014-03-20 09:03:06 +01:00
2 changed files with 680 additions and 172 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,10 @@
#include <opm/core/io/OutputWriter.hpp>
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <string>
#include <vector>
#include <memory> // std::unique_ptr
struct UnstructuredGrid;
@@ -60,6 +63,14 @@ public:
std::shared_ptr <const EclipseGridParser> parser,
std::shared_ptr <const UnstructuredGrid> grid);
/*!
* \brief Sets the common attributes required to write eclipse
* binary files using ERT.
*/
EclipseWriter(const parameter::ParameterGroup& params,
Opm::DeckConstPtr newParserDeck,
std::shared_ptr <const UnstructuredGrid> grid);
/**
* We need a destructor in the compilation unit to avoid the
* EclipseSummary being a complete type here.
@@ -87,6 +98,7 @@ public:
private:
std::shared_ptr <const EclipseGridParser> parser_;
Opm::DeckConstPtr newParserDeck_;
std::shared_ptr <const UnstructuredGrid> grid_;
bool enableOutput_;
int outputInterval_;
@@ -96,6 +108,10 @@ private:
PhaseUsage uses_; // active phases in the input deck
std::shared_ptr <EclipseSummary> summary_;
void activeToGlobalCellData_(std::vector<double> &globalCellsBuf,
const std::vector<double> &activeCellsBuf,
const std::vector<double> &inactiveCellsBuf) const;
/// Write solution field variables (pressure and saturation)
void writeSolution_(const SimulatorTimer& timer,
const SimulatorState& reservoirState);