Use new parser for all deck information

This commit switches to using the convenience method

    GridManager::createGrdecl()

to construct a "struct grdecl" that can be passed directly into
CpGrid::processEclipseFormat().  The practical benefit is that we
get to leverage the opm-parser that's in active development rather
than the calcifying "EclipseGridParser" that will only become less
relevant in the future.  We also don't parse the data twice.

Note: This is mostly compile tested.  In the few actual tests I ran,
I got into trouble with internal assertions in processEclipseFormat.
That problem is not yet analysed.
This commit is contained in:
Bård Skaflestad 2014-04-10 01:01:55 +02:00
parent 897a33c788
commit fdca5404b7

View File

@ -34,9 +34,13 @@
#include <opm/core/pressure/FlowBCManager.hpp>
#include <opm/core/grid.h>
//#include <opm/core/grid/GridManager.hpp>
#include <opm/core/grid/cornerpoint_grid.h>
#include <opm/core/grid/GridManager.hpp>
#include <dune/grid/CpGrid.hpp>
#include <dune/grid/common/GridAdapter.hpp>
#include <opm/core/wells.h>
#include <opm/core/wells/WellsManager.hpp>
#include <opm/core/utility/ErrorMacros.hpp>
@ -118,13 +122,15 @@ try
Opm::ParserPtr newParser(new Opm::Parser() );
Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename );
std::shared_ptr<EclipseGridParser> deck;
deck.reset(new EclipseGridParser(deck_filename));
std::shared_ptr<const EclipseGridParser> cdeck(deck);
// Grid init
grid.reset(new Dune::CpGrid());
grid->processEclipseFormat(*deck, 2e-12, false);
{
grdecl g = {};
GridManager::createGrdecl(newParserDeck, g);
grid->processEclipseFormat(g, 2e-12, false);
}
Opm::EclipseWriter outputWriter(param, newParserDeck,