13#ifndef DUMUX_IO_GRID_CPGRIDMANAGER_HH
14#define DUMUX_IO_GRID_CPGRIDMANAGER_HH
19#include <dune/common/version.hh>
20#include <dune/common/parallel/mpihelper.hh>
22#include <opm/grid/CpGrid.hpp>
24#if DUNE_VERSION_GTE(OPM_GRID, 2022, 10)
25#include <opm/input/eclipse/Parser/Parser.hpp>
26#include <opm/input/eclipse/Parser/ParseContext.hpp>
27#include <opm/input/eclipse/Deck/Deck.hpp>
28#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
30#include <opm/parser/eclipse/Parser/Parser.hpp>
31#include <opm/parser/eclipse/Parser/ParseContext.hpp>
32#include <opm/parser/eclipse/Deck/Deck.hpp>
33#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
60 void init(
const std::string& paramGroup =
"")
63 deck_ = std::make_shared<Opm::Deck>(Opm::Parser().parseFile(fileName));
64 Opm::EclipseGrid eclGrid(*deck_);
65 Opm::EclipseState eclState(*deck_);
66 grid_ = std::make_shared<Grid>();
67 grid_->processEclipseFormat(&eclGrid, &eclState,
false,
false,
false);
94 if (Dune::MPIHelper::getCommunication().size() > 1)
99 std::shared_ptr<Deck> deck_;
100 std::shared_ptr<Grid> grid_;
106#warning "Eclipse input support in opm-common is required to use the cornerpoint grid manager"
A grid creator that reads Petrel files and generates a CpGrid.
Definition cpgridmanager.hh:52
Dune::CpGrid Grid
Definition cpgridmanager.hh:54
Opm::Deck Deck
Definition cpgridmanager.hh:55
Grid & grid()
Returns a reference to the grid.
Definition cpgridmanager.hh:74
std::shared_ptr< Deck > getDeck() const
Returns a reference to the input deck.
Definition cpgridmanager.hh:84
void loadBalance()
Distributes the grid over all processes for a parallel computation.
Definition cpgridmanager.hh:92
void init(const std::string ¶mGroup="")
Create the Grid.
Definition cpgridmanager.hh:60
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.