26 #ifndef EWOMS_CUBE_GRID_MANAGER_HH
27 #define EWOMS_CUBE_GRID_MANAGER_HH
34 #include <dune/grid/utility/structuredgridfactory.hh>
36 #include <dune/common/fvector.hh>
41 namespace Properties {
63 template <
class TypeTag>
67 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
69 typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
71 typedef Dune::shared_ptr<Grid> GridPointer;
72 typedef typename Grid::ctype CoordScalar;
73 enum { dimWorld = Grid::dimensionworld };
74 typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
83 "The number of global refinements of the grid "
84 "executed after it was loaded");
86 "The size of the domain in x direction");
88 "The number of intervalls in x direction");
91 "The size of the domain in y direction");
93 "The number of intervalls in y direction");
97 "The size of the domain in z direction");
99 "The number of intervalls in z direction");
107 : ParentType(simulator)
109 Dune::array<unsigned int, dimWorld> cellRes;
110 GlobalPosition upperRight(0.0);
111 GlobalPosition lowerLeft(0.0);
113 for (
unsigned i = 0; i < dimWorld; ++i)
127 unsigned numRefinements =
EWOMS_GET_PARAM(TypeTag,
unsigned, GridGlobalRefinements);
128 cubeGrid_ = Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeft,
void finalizeInit_()
Definition: basegridmanager.hh:84
static void registerParameters()
Register all run-time parameters for the grid manager.
Definition: cubegridmanager.hh:80
Defines a type tags and some fundamental properties all models.
Grid & grid()
Returns a reference to the grid.
Definition: cubegridmanager.hh:139
NEW_PROP_TAG(Grid)
The type of the DUNE grid.
This file provides the infrastructure to retrieve run-time parameters.
Provides the base class for most (all?) grid managers.
Definition: basegridmanager.hh:51
CubeGridManager(Simulator &simulator)
Create the grid.
Definition: cubegridmanager.hh:106
const Grid & grid() const
Returns a reference to the grid.
Definition: cubegridmanager.hh:145
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:73
Definition: baseauxiliarymodule.hh:35
GridPointer cubeGrid_
Definition: cubegridmanager.hh:149
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description)
Register a run-time parameter.
Definition: parametersystem.hh:64
Provides a grid manager which a regular grid made of quadrilaterals.
Definition: cubegridmanager.hh:64
Provides the magic behind the eWoms property system.
Provides the base class for most (all?) grid managers.
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:95