refactoring: rename GridCreator to GridManager

because "manager" sounds less religious than "creator" and the
GridCreators did all kinds of other stuff besides creating the grid.

this patch also gets rid of the static function inside these classes,
which should make them easier to understand...
This commit is contained in:
Andreas Lauser 2014-04-24 12:24:51 +02:00
parent 4c7a2d2ca0
commit 87f30dad6f
11 changed files with 123 additions and 148 deletions

View File

@ -114,10 +114,10 @@ relevant properties for the \eWoms property system:
used is defined in line \ref{tutorial1:set-grid} -- in this case used is defined in line \ref{tutorial1:set-grid} -- in this case
it is \texttt{Dune::YaspGrid}. it is \texttt{Dune::YaspGrid}.
\item Since \Dune does not provide a uniform mechanism to create or \item Since \Dune does not provide a uniform mechanism to create or
load grids, \eWoms features the concept of grid creators. In this load grids, \eWoms features the concept of grid managers. In this
case, the generic \texttt{CubeGridCreator} is used. This grid case, the generic \texttt{CubeGridManager} is used. This grid
creator constructs a structured rectangular grid with a specified manager constructs a structured rectangular grid with a specified
size and resolution. For this grid creator, the physical domain of size and resolution. For this grid manager, the physical domain of
the grid is specified via the run-time parameters the grid is specified via the run-time parameters
\texttt{DomainSizeX} and \texttt{DomainSizeY} and its resolution by \texttt{DomainSizeX} and \texttt{DomainSizeY} and its resolution by
\texttt{CellsX} and \texttt{CellsY}. These parameters can be \texttt{CellsX} and \texttt{CellsY}. These parameters can be
@ -328,15 +328,15 @@ even not at all.
not want to go through the trouble of installing this grid manager, not want to go through the trouble of installing this grid manager,
please skip this exercise. please skip this exercise.
Change the grid creator used by the problem to Change the grid manager used by the problem to
\texttt{SimplexGridCreator<TypeTag>} and the type of the grid to \texttt{SimplexGridManager<TypeTag>} and the type of the grid to
\texttt{Dune::ALUSimplexGrid<2, 2>}. The grid creator is specified \texttt{Dune::ALUSimplexGrid<2, 2>}. The grid manager is specified
on line \ref{tutorial1:set-gridcreator}, whil the type of the on line \ref{tutorial1:set-grid-manager}, while the type of the
\Dune grid manager is set on line \Dune grid manager is set on line
\ref{tutorial1:set-grid}. You also need to change the include \ref{tutorial1:set-grid}. You also need to change the include
statement of the grid creator from \texttt{cubegridcreator.hh} to statement of the grid manager from \texttt{cubegridmanager.hh} to
\texttt{simplexgridcreator.hh} on line \texttt{simplexgridmanager.hh} on line
\ref{tutorial1:include-grid-creator} and the one for the grid \ref{tutorial1:include-grid-manager} and the one for the grid
manager from \texttt{dune/grid/yaspgrid.hh} to manager from \texttt{dune/grid/yaspgrid.hh} to
\texttt{dune/grid/alugrid.hh} on line \ref{tutorial1:include-grid-manager}. \texttt{dune/grid/alugrid.hh} on line \ref{tutorial1:include-grid-manager}.

View File

@ -25,7 +25,7 @@
#define EWOMS_POWER_INJECTION_PROBLEM_HH #define EWOMS_POWER_INJECTION_PROBLEM_HH
#include <ewoms/models/ncp/ncpproperties.hh> #include <ewoms/models/ncp/ncpproperties.hh>
#include <ewoms/io/cubegridcreator.hh> #include <ewoms/io/cubegridmanager.hh>
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp> #include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp> #include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
@ -53,8 +53,8 @@ NEW_TYPE_TAG(DiffusionBaseProblem);
// Set the grid implementation to be used // Set the grid implementation to be used
SET_TYPE_PROP(DiffusionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>); SET_TYPE_PROP(DiffusionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridCreator property // set the GridManager property
SET_TYPE_PROP(DiffusionBaseProblem, GridCreator, Ewoms::CubeGridCreator<TypeTag>); SET_TYPE_PROP(DiffusionBaseProblem, GridManager, Ewoms::CubeGridManager<TypeTag>);
// Set the problem property // Set the problem property
SET_TYPE_PROP(DiffusionBaseProblem, Problem, Ewoms::DiffusionProblem<TypeTag>); SET_TYPE_PROP(DiffusionBaseProblem, Problem, Ewoms::DiffusionProblem<TypeTag>);

View File

@ -18,13 +18,13 @@
*/ */
/*! /*!
* \file * \file
* \copydoc Ewoms::EclGridCreator * \copydoc Ewoms::EclGridManager
*/ */
#ifndef EWOMS_ECL_GRID_CREATOR_HH #ifndef EWOMS_ECL_GRID_MANAGER_HH
#define EWOMS_ECL_GRID_CREATOR_HH #define EWOMS_ECL_GRID_MANAGER_HH
#include <ewoms/parallel/mpihelper.hh> #include <ewoms/parallel/mpihelper.hh>
#include <ewoms/io/basegridcreator.hh> #include <ewoms/io/basegridmanager.hh>
#include <opm/core/utility/PropertySystem.hpp> #include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/parametersystem.hh> #include <ewoms/common/parametersystem.hh>
@ -45,23 +45,23 @@ template <class TypeTag>
class EclProblem; class EclProblem;
template <class TypeTag> template <class TypeTag>
class EclGridCreator; class EclGridManager;
} // namespace Ewoms } // namespace Ewoms
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
NEW_TYPE_TAG(EclGridCreator); NEW_TYPE_TAG(EclGridManager);
// declare the properties required by the for the ecl grid creator // declare the properties required by the for the ecl grid manager
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
NEW_PROP_TAG(EclipseDeckFileName); NEW_PROP_TAG(EclipseDeckFileName);
SET_STRING_PROP(EclGridCreator, EclipseDeckFileName, "grids/ecl.DATA"); SET_STRING_PROP(EclGridManager, EclipseDeckFileName, "grids/ecl.DATA");
// set the Grid and GridCreator properties // set the Grid and GridManager properties
SET_TYPE_PROP(EclGridCreator, Grid, Dune::CpGrid); SET_TYPE_PROP(EclGridManager, Grid, Dune::CpGrid);
SET_TYPE_PROP(EclGridCreator, GridCreator, Ewoms::EclGridCreator<TypeTag>); SET_TYPE_PROP(EclGridManager, GridManager, Ewoms::EclGridManager<TypeTag>);
}} // namespace Opm, Properties }} // namespace Opm, Properties
namespace Ewoms { namespace Ewoms {
@ -71,20 +71,20 @@ namespace Ewoms {
* \brief Helper class for grid instantiation of the ecl problem. * \brief Helper class for grid instantiation of the ecl problem.
*/ */
template <class TypeTag> template <class TypeTag>
class EclGridCreator : public BaseGridCreator<TypeTag> class EclGridManager : public BaseGridManager<TypeTag>
{ {
typedef BaseGridManager<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
public:
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
typedef std::shared_ptr<Grid> GridPointer;
private: typedef std::shared_ptr<Grid> GridPointer;
typedef std::shared_ptr<const Grid> GridConstPointer;
static const int dim = Grid::dimension; static const int dim = Grid::dimension;
public: public:
/*! /*!
* \brief Register all run-time parameters for the grid creator. * \brief Register all run-time parameters for the grid manager.
*/ */
static void registerParameters() static void registerParameters()
{ {
@ -95,7 +95,11 @@ public:
/*! /*!
* \brief Create the grid for the ecl problem * \brief Create the grid for the ecl problem
*/ */
static void makeGrid() /*!
* \brief Create the grid for the lens problem
*/
EclGridManager(Simulator &simulator)
: ParentType(simulator)
{ {
std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclipseDeckFileName); std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclipseDeckFileName);
@ -112,37 +116,26 @@ public:
/*isPeriodic=*/false, /*isPeriodic=*/false,
/*flipNormals=*/false, /*flipNormals=*/false,
/*clipZ=*/false); /*clipZ=*/false);
this->finalizeInit_();
} }
/*! /*!
* \brief Return a reference to the grid. * \brief Return a pointer to the grid.
*/ */
static GridPointer gridPointer() GridPointer gridPointer()
{ return grid_; } { return grid_; }
/*! /*!
* \brief Distribute the grid (and attached data) over all * \brief Return a pointer to the grid.
* processes.
*/ */
static void loadBalance() GridConstPointer gridPointer() const
{ grid_->loadBalance(); } { return grid_; }
/*!
* \brief Destroy the grid
*
* This is required to guarantee that the grid is deleted before
* MPI_Comm_free is called.
*/
static void deleteGrid()
{
grid_.reset();
deck_.reset();
}
/*! /*!
* \brief Return a pointer to the parsed Eclipse deck * \brief Return a pointer to the parsed Eclipse deck
*/ */
static Opm::DeckConstPtr deck() Opm::DeckConstPtr deck() const
{ return deck_; } { return deck_; }
/*! /*!
@ -153,24 +146,15 @@ public:
* EGRID files (which tends to be difficult with a plain * EGRID files (which tends to be difficult with a plain
* Dune::CpGrid) * Dune::CpGrid)
*/ */
static Opm::EclipseGridConstPtr eclipseGrid() Opm::EclipseGridConstPtr eclipseGrid() const
{ return eclipseGrid_; } { return eclipseGrid_; }
private: private:
static GridPointer grid_; GridPointer grid_;
static Opm::DeckConstPtr deck_; Opm::DeckConstPtr deck_;
static Opm::EclipseGridConstPtr eclipseGrid_; Opm::EclipseGridConstPtr eclipseGrid_;
}; };
template <class TypeTag>
typename EclGridCreator<TypeTag>::GridPointer EclGridCreator<TypeTag>::grid_;
template <class TypeTag>
Opm::DeckConstPtr EclGridCreator<TypeTag>::deck_;
template <class TypeTag>
Opm::EclipseGridConstPtr EclGridCreator<TypeTag>::eclipseGrid_;
} // namespace Ewoms } // namespace Ewoms
#endif #endif

View File

@ -18,13 +18,13 @@
*/ */
/*! /*!
* \file * \file
* \copydoc Ewoms::FingerGridCreator * \copydoc Ewoms::FingerGridManager
*/ */
#ifndef EWOMS_FINGER_GRID_CREATOR_HH #ifndef EWOMS_FINGER_GRID_MANAGER_HH
#define EWOMS_FINGER_GRID_CREATOR_HH #define EWOMS_FINGER_GRID_MANAGER_HH
#include <ewoms/parallel/mpihelper.hh> #include <ewoms/parallel/mpihelper.hh>
#include <ewoms/io/basegridcreator.hh> #include <ewoms/io/basegridmanager.hh>
#include <opm/core/utility/PropertySystem.hpp> #include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/parametersystem.hh> #include <ewoms/common/parametersystem.hh>
@ -34,13 +34,13 @@
#include <vector> #include <vector>
// some hacky defines for the grid creator // some hacky defines for the grid manager
#define FINGER_DIM 2 #define FINGER_DIM 2
#define FINGER_CUBES 1 #define FINGER_CUBES 1
namespace Ewoms { namespace Ewoms {
template <class TypeTag> template <class TypeTag>
class FingerGridCreator; class FingerGridManager;
template <class TypeTag> template <class TypeTag>
class FingerProblem; class FingerProblem;
@ -48,8 +48,8 @@ class FingerProblem;
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
// declare the properties required by the for the finger grid creator // declare the properties required by the for the finger grid manager
NEW_TYPE_TAG(FingerGridCreator); NEW_TYPE_TAG(FingerGridManager);
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
@ -64,8 +64,8 @@ NEW_PROP_TAG(CellsZ);
NEW_PROP_TAG(GridGlobalRefinements); NEW_PROP_TAG(GridGlobalRefinements);
SET_TYPE_PROP(FingerGridCreator, Grid, Dune::ALUGrid<FINGER_DIM, FINGER_DIM, Dune::cube, Dune::nonconforming>); SET_TYPE_PROP(FingerGridManager, Grid, Dune::ALUGrid<FINGER_DIM, FINGER_DIM, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(FingerGridCreator, GridCreator, Ewoms::FingerGridCreator<TypeTag>); SET_TYPE_PROP(FingerGridManager, GridManager, Ewoms::FingerGridManager<TypeTag>);
}} // namespace Opm, Properties }} // namespace Opm, Properties
@ -74,17 +74,18 @@ namespace Ewoms {
* \brief Helper class for grid instantiation of the finger problem. * \brief Helper class for grid instantiation of the finger problem.
*/ */
template <class TypeTag> template <class TypeTag>
class FingerGridCreator : public BaseGridCreator<TypeTag> class FingerGridManager : public BaseGridManager<TypeTag>
{ {
typedef BaseGridManager<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
enum { dim = FINGER_DIM }; enum { dim = FINGER_DIM };
public: public:
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
/*! /*!
* \brief Register all run-time parameters for the grid creator. * \brief Register all run-time parameters for the grid manager.
*/ */
static void registerParameters() static void registerParameters()
{ {
@ -112,7 +113,8 @@ public:
/*! /*!
* \brief Create the grid for the finger problem * \brief Create the grid for the finger problem
*/ */
static void makeGrid() FingerGridManager(Simulator &simulator)
: ParentType(simulator)
{ {
grid_ = new Grid; grid_ = new Grid;
@ -268,33 +270,27 @@ public:
} }
/*! /*!
* \brief Return a reference to the grid. * \brief Destroy the grid.
*/ */
static Grid* gridPointer() ~FingerGridManager()
{ delete grid_; }
/*!
* \brief Return a pointer to the grid.
*/
Grid* gridPointer()
{ return grid_; } { return grid_; }
/*! /*!
* \brief Distribute the grid (and attached data) over all * \brief Return a pointer to the grid.
* processes.
*/ */
static void loadBalance() const Grid* gridPointer() const
{ grid_->loadBalance(); } { return grid_; }
/*!
* \brief Destroy the grid.
*
* This is required to guarantee that the grid is deleted before
* MPI_Comm_free is called.
*/
static void deleteGrid()
{ delete grid_; }
private: private:
static Grid *grid_; Grid *grid_;
}; };
template <class TypeTag>
typename FingerGridCreator<TypeTag>::Grid *FingerGridCreator<TypeTag>::grid_;
} // namespace Ewoms } // namespace Ewoms
#endif #endif

View File

@ -24,7 +24,7 @@
#ifndef EWOMS_FINGER_PROBLEM_HH #ifndef EWOMS_FINGER_PROBLEM_HH
#define EWOMS_FINGER_PROBLEM_HH #define EWOMS_FINGER_PROBLEM_HH
#include "fingergridcreator.hh" #include "fingergridmanager.hh"
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp> #include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp> #include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
@ -53,7 +53,7 @@ class FingerProblem;
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(FingerGridCreator)); NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(FingerGridManager));
// declare the properties used by the finger problem // declare the properties used by the finger problem
NEW_PROP_TAG(InitialWaterSaturation); NEW_PROP_TAG(InitialWaterSaturation);

View File

@ -37,7 +37,7 @@
#include <opm/material/fluidsystems/2pImmiscibleFluidSystem.hpp> #include <opm/material/fluidsystems/2pImmiscibleFluidSystem.hpp>
#include <opm/material/components/SimpleH2O.hpp> #include <opm/material/components/SimpleH2O.hpp>
#include <opm/material/components/Dnapl.hpp> #include <opm/material/components/Dnapl.hpp>
#include <ewoms/io/artgridcreator.hh> #include <ewoms/io/artgridmanager.hh>
#include <ewoms/models/discretefracture/discretefracturemodel.hh> #include <ewoms/models/discretefracture/discretefracturemodel.hh>
@ -59,8 +59,8 @@ namespace Properties {
// Create a type tag for the problem // Create a type tag for the problem
NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(DiscreteFractureModel)); NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(DiscreteFractureModel));
// Set the GridCreator property // Set the GridManager property
SET_TYPE_PROP(FractureProblem, GridCreator, Ewoms::ArtGridCreator<TypeTag>); SET_TYPE_PROP(FractureProblem, GridManager, Ewoms::ArtGridManager<TypeTag>);
// Set the grid type // Set the grid type
SET_TYPE_PROP( SET_TYPE_PROP(
@ -362,7 +362,7 @@ public:
* \brief Returns the object representating the fracture topology. * \brief Returns the object representating the fracture topology.
*/ */
const FractureMapper &fractureMapper() const const FractureMapper &fractureMapper() const
{ return GET_PROP_TYPE(TypeTag, GridCreator)::fractureMapper(); } { return this->simulator().gridManager().fractureMapper(); }
/*! /*!
* \brief Returns the width of the fracture. * \brief Returns the width of the fracture.

View File

@ -18,13 +18,13 @@
*/ */
/*! /*!
* \file * \file
* \copydoc Ewoms::LensGridCreator * \copydoc Ewoms::LensGridManager
*/ */
#ifndef EWOMS_LENS_GRID_CREATOR_HH #ifndef EWOMS_LENS_GRID_MANAGER_HH
#define EWOMS_LENS_GRID_CREATOR_HH #define EWOMS_LENS_GRID_MANAGER_HH
#include <ewoms/parallel/mpihelper.hh> #include <ewoms/parallel/mpihelper.hh>
#include <ewoms/io/basegridcreator.hh> #include <ewoms/io/basegridmanager.hh>
#include <opm/core/utility/PropertySystem.hpp> #include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/parametersystem.hh> #include <ewoms/common/parametersystem.hh>
@ -39,14 +39,14 @@ template <class TypeTag>
class LensProblem; class LensProblem;
template <class TypeTag> template <class TypeTag>
class LensGridCreator; class LensGridManager;
} // namespace Ewoms } // namespace Ewoms
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
NEW_TYPE_TAG(LensGridCreator); NEW_TYPE_TAG(LensGridManager);
// declare the properties required by the for the lens grid creator // declare the properties required by the for the lens grid manager
NEW_PROP_TAG(Grid); NEW_PROP_TAG(Grid);
NEW_PROP_TAG(Scalar); NEW_PROP_TAG(Scalar);
@ -60,9 +60,9 @@ NEW_PROP_TAG(CellsZ);
NEW_PROP_TAG(GridGlobalRefinements); NEW_PROP_TAG(GridGlobalRefinements);
// set the Grid and GridCreator properties // set the Grid and GridManager properties
SET_TYPE_PROP(LensGridCreator, Grid, Dune::YaspGrid<2>); SET_TYPE_PROP(LensGridManager, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(LensGridCreator, GridCreator, Ewoms::LensGridCreator<TypeTag>); SET_TYPE_PROP(LensGridManager, GridManager, Ewoms::LensGridManager<TypeTag>);
}} // namespace Opm, Properties }} // namespace Opm, Properties
namespace Ewoms { namespace Ewoms {
@ -72,19 +72,18 @@ namespace Ewoms {
* \brief Helper class for grid instantiation of the lens problem. * \brief Helper class for grid instantiation of the lens problem.
*/ */
template <class TypeTag> template <class TypeTag>
class LensGridCreator : public BaseGridCreator<TypeTag> class LensGridManager : public BaseGridManager<TypeTag>
{ {
typedef BaseGridManager<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
public:
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
private:
static const int dim = Grid::dimension; static const int dim = Grid::dimension;
public: public:
/*! /*!
* \brief Register all run-time parameters for the grid creator. * \brief Register all run-time parameters for the grid manager.
*/ */
static void registerParameters() static void registerParameters()
{ {
@ -112,7 +111,8 @@ public:
/*! /*!
* \brief Create the grid for the lens problem * \brief Create the grid for the lens problem
*/ */
static void makeGrid() LensGridManager(Simulator &simulator)
: ParentType(simulator)
{ {
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3) #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
std::bitset<dim> isPeriodic(false); std::bitset<dim> isPeriodic(false);
@ -149,37 +149,32 @@ public:
/*numCells=*/cellRes, isPeriodic, /*numCells=*/cellRes, isPeriodic,
/*overlap=*/1); /*overlap=*/1);
grid_->globalRefine(numRefinements); grid_->globalRefine(numRefinements);
this->finalizeInit_();
} }
/*! /*!
* \brief Return a reference to the grid. * \brief Destroy the grid
*/ */
static Grid* gridPointer() ~LensGridManager()
{ delete grid_; }
/*!
* \brief Return a pointer to the grid object.
*/
Grid* gridPointer()
{ return grid_; } { return grid_; }
/*! /*!
* \brief Distribute the grid (and attached data) over all * \brief Return a constant pointer to the grid object.
* processes.
*/ */
static void loadBalance() const Grid* gridPointer() const
{ grid_->loadBalance(); } { return grid_; }
/*!
* \brief Destroy the grid
*
* This is required to guarantee that the grid is deleted before
* MPI_Comm_free is called.
*/
static void deleteGrid()
{ delete grid_; }
private: private:
static Grid *grid_; Grid *grid_;
}; };
template <class TypeTag>
typename LensGridCreator<TypeTag>::Grid *LensGridCreator<TypeTag>::grid_;
} // namespace Ewoms } // namespace Ewoms
#endif #endif

View File

@ -24,7 +24,7 @@
#ifndef EWOMS_LENS_PROBLEM_HH #ifndef EWOMS_LENS_PROBLEM_HH
#define EWOMS_LENS_PROBLEM_HH #define EWOMS_LENS_PROBLEM_HH
#include "lensgridcreator.hh" #include "lensgridmanager.hh"
#include <ewoms/models/immiscible/immiscibleproperties.hh> #include <ewoms/models/immiscible/immiscibleproperties.hh>
#include <ewoms/linear/parallelamgbackend.hh> #include <ewoms/linear/parallelamgbackend.hh>
@ -53,7 +53,7 @@ class LensProblem;
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(LensGridCreator)); NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(LensGridManager));
// declare the properties specific for the lens problem // declare the properties specific for the lens problem
NEW_PROP_TAG(LensLowerLeftX); NEW_PROP_TAG(LensLowerLeftX);

View File

@ -34,7 +34,7 @@
#include <opm/material/components/SimpleH2O.hpp> #include <opm/material/components/SimpleH2O.hpp>
#include <opm/material/components/Air.hpp> #include <opm/material/components/Air.hpp>
#include <ewoms/models/immiscible/immisciblemodel.hh> #include <ewoms/models/immiscible/immisciblemodel.hh>
#include <ewoms/io/cubegridcreator.hh> #include <ewoms/io/cubegridmanager.hh>
#include <dune/common/version.hh> #include <dune/common/version.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
@ -57,9 +57,9 @@ NEW_TYPE_TAG(PowerInjectionBaseProblem);
// Set the grid implementation to be used // Set the grid implementation to be used
SET_TYPE_PROP(PowerInjectionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>); SET_TYPE_PROP(PowerInjectionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridCreator property // set the GridManager property
SET_TYPE_PROP(PowerInjectionBaseProblem, GridCreator, SET_TYPE_PROP(PowerInjectionBaseProblem, GridManager,
Ewoms::CubeGridCreator<TypeTag>); Ewoms::CubeGridManager<TypeTag>);
// Set the problem property // Set the problem property
SET_TYPE_PROP(PowerInjectionBaseProblem, Problem, SET_TYPE_PROP(PowerInjectionBaseProblem, Problem,

View File

@ -24,7 +24,7 @@
#define EWOMS_STOKES_NI_TEST_PROBLEM_HH #define EWOMS_STOKES_NI_TEST_PROBLEM_HH
#include <ewoms/models/stokes/stokesmodel.hh> #include <ewoms/models/stokes/stokesmodel.hh>
#include <ewoms/io/simplexgridcreator.hh> #include <ewoms/io/simplexgridmanager.hh>
#include <opm/material/fluidsystems/H2OAirFluidSystem.hpp> #include <opm/material/fluidsystems/H2OAirFluidSystem.hpp>
#include <dune/grid/yaspgrid.hh> #include <dune/grid/yaspgrid.hh>

View File

@ -43,7 +43,7 @@
// For the DUNE grid // For the DUNE grid
#include <dune/grid/yaspgrid.hh> /*@\label{tutorial1:include-grid-manager}@*/ #include <dune/grid/yaspgrid.hh> /*@\label{tutorial1:include-grid-manager}@*/
#include <ewoms/io/cubegridcreator.hh> /*@\label{tutorial1:include-grid-creator}@*/ #include <ewoms/io/cubegridmanager.hh> /*@\label{tutorial1:include-grid-manager}@*/
// For Dune::FieldMatrix // For Dune::FieldMatrix
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
@ -68,9 +68,9 @@ SET_TAG_PROP(Tutorial1Problem, SpatialDiscretizationSplice,
SET_TYPE_PROP(Tutorial1Problem, Problem, SET_TYPE_PROP(Tutorial1Problem, Problem,
Ewoms::Tutorial1Problem<TypeTag>); /*@\label{tutorial1:set-problem}@*/ Ewoms::Tutorial1Problem<TypeTag>); /*@\label{tutorial1:set-problem}@*/
// Set grid and the grid creator to be used // Set grid and the grid manager to be used
SET_TYPE_PROP(Tutorial1Problem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial1:set-grid}@*/ SET_TYPE_PROP(Tutorial1Problem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial1:set-grid}@*/
SET_TYPE_PROP(Tutorial1Problem, GridCreator, Ewoms::CubeGridCreator<TypeTag>); /*@\label{tutorial1:set-gridcreator}@*/ SET_TYPE_PROP(Tutorial1Problem, GridManager, Ewoms::CubeGridManager<TypeTag>); /*@\label{tutorial1:set-grid-manager}@*/
// Set the wetting phase /*@\label{tutorial1:2p-system-start}@*/ // Set the wetting phase /*@\label{tutorial1:2p-system-start}@*/
SET_TYPE_PROP(Tutorial1Problem, SET_TYPE_PROP(Tutorial1Problem,