24#ifndef DUMUX_IO_GRID_CPGRIDMANAGER_HH
25#define DUMUX_IO_GRID_CPGRIDMANAGER_HH
28#include <dune/common/parallel/mpihelper.hh>
30#include <opm/grid/CpGrid.hpp>
31#include <opm/parser/eclipse/Parser/Parser.hpp>
32#include <opm/parser/eclipse/Parser/ParseContext.hpp>
33#include <opm/parser/eclipse/Deck/Deck.hpp>
34#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
47 using Grid = Dune::CpGrid;
48 using Deck = Opm::Deck;
53 void init(
const std::string& paramGroup =
"")
55 const auto fileName = getParamFromGroup<std::string>(paramGroup,
"Grid.File");
56 deck_ = std::make_shared<Opm::Deck>(Opm::Parser().parseFile(fileName));
57 Opm::EclipseGrid eclGrid(*deck_);
58 Opm::EclipseState eclState(*deck_);
59 grid_ = std::make_shared<Grid>();
60 grid_->processEclipseFormat(&eclGrid, &eclState,
false,
false,
false);
77 std::shared_ptr<Deck> getDeck()
const
87 if (Dune::MPIHelper::getCommunication().size() > 1)
92 std::shared_ptr<Deck> deck_;
93 std::shared_ptr<Grid> grid_;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.