diff --git a/examples/problems/eclgridmanager.hh b/examples/problems/eclgridmanager.hh deleted file mode 100644 index 4110699e4..000000000 --- a/examples/problems/eclgridmanager.hh +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2012-2013 by Andreas Lauser - - This file is part of the Open Porous Media project (OPM). - - OPM is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - OPM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ -/*! - * \file - * \copydoc Ewoms::EclGridManager - */ -#ifndef EWOMS_ECL_GRID_MANAGER_HH -#define EWOMS_ECL_GRID_MANAGER_HH - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -namespace Ewoms { -template -class EclProblem; - -template -class EclGridManager; -} // namespace Ewoms - -namespace Opm { -namespace Properties { -NEW_TYPE_TAG(EclGridManager); - -// declare the properties required by the for the ecl grid manager -NEW_PROP_TAG(Grid); -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(EclipseDeckFileName); - -SET_STRING_PROP(EclGridManager, EclipseDeckFileName, "data/ecl.DATA"); - -// set the Grid and GridManager properties -SET_TYPE_PROP(EclGridManager, Grid, Dune::CpGrid); -SET_TYPE_PROP(EclGridManager, GridManager, Ewoms::EclGridManager); -}} // namespace Opm, Properties - -namespace Ewoms { -/*! - * \ingroup TestProblems - * - * \brief Helper class for grid instantiation of the ecl problem. - */ -template -class EclGridManager : public BaseGridManager -{ - typedef BaseGridManager ParentType; - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator; - typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; - - typedef std::unique_ptr GridPointer; - -public: - /*! - * \brief Register all run-time parameters for the grid manager. - */ - static void registerParameters() - { - EWOMS_REGISTER_PARAM(TypeTag, std::string, EclipseDeckFileName, - "The name of the file which contains the Eclipse deck to be simulated"); - } - - /*! - * \brief Create the grid for the ecl problem - */ - /*! - * \brief Create the grid for the lens problem - */ - EclGridManager(Simulator &simulator) - : ParentType(simulator) - { - std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclipseDeckFileName); - boost::filesystem::path deckPath(fileName); - caseName_ = boost::to_upper_copy(deckPath.stem().string()); - - Opm::ParserPtr parser(new Opm::Parser()); - deck_ = parser->parseFile(deckPath.string()); - - eclipseState_.reset(new Opm::EclipseState(deck_)); - - grid_ = GridPointer(new Grid()); - grid_->processEclipseFormat(eclipseState_->getEclipseGrid(), - /*isPeriodic=*/false, - /*flipNormals=*/false, - /*clipZ=*/false); - - this->finalizeInit_(); - } - - /*! - * \brief Return a reference to the grid. - */ - Grid& grid() - { return *grid_; } - - /*! - * \brief Return a reference to the grid. - */ - const Grid& grid() const - { return *grid_; } - - /*! - * \brief Return a pointer to the parsed Eclipse deck - */ - Opm::DeckConstPtr deck() const - { return deck_; } - - /*! - * \brief Return a pointer to the internalized Eclipse deck - */ - Opm::EclipseStateConstPtr eclipseState() const - { return eclipseState_; } - - /*! - * \brief Return a pointer to the internalized schedule of the - * Eclipse deck - */ - Opm::ScheduleConstPtr schedule() const - { return eclipseState_->getSchedule(); } - - /*! - * \brief Return a pointer to the EclipseGrid object - * - * The EclipseGrid class is used to internalize the cornerpoint - * grid representation and, amongst others, can be used to write - * EGRID files (which tends to be difficult with a plain - * Dune::CpGrid) - */ - Opm::EclipseGridConstPtr eclipseGrid() const - { return eclipseState_->getEclipseGrid(); } - - /*! - * \brief Returns the name of the case. - * - * i.e., the all-uppercase version of the file name from which the - * deck is loaded with the ".DATA" suffix removed. - */ - const std::string &caseName() const - { return caseName_; } - -private: - std::string caseName_; - GridPointer grid_; - Opm::DeckConstPtr deck_; - Opm::EclipseStateConstPtr eclipseState_; -}; - -} // namespace Ewoms - -#endif diff --git a/examples/problems/eclproblem.hh b/examples/problems/eclproblem.hh index e25e2ba64..10e2e481f 100644 --- a/examples/problems/eclproblem.hh +++ b/examples/problems/eclproblem.hh @@ -24,10 +24,9 @@ #ifndef EWOMS_ECL_PROBLEM_HH #define EWOMS_ECL_PROBLEM_HH -#include "eclgridmanager.hh" - #include #include +#include #include #include