26 #ifndef EWOMS_SIMPLEX_GRID_MANAGER_HH
27 #define EWOMS_SIMPLEX_GRID_MANAGER_HH
33 #include <dune/grid/utility/structuredgridfactory.hh>
34 #include <dune/common/fvector.hh>
39 namespace Properties {
58 template <
class TypeTag>
62 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
64 typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
66 typedef Dune::shared_ptr<Grid> GridPointer;
67 typedef typename Grid::ctype CoordScalar;
68 enum { dimWorld = Grid::dimensionworld };
69 typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
78 "The number of global refinements of the grid "
79 "executed after it was loaded");
81 "The size of the domain in x direction");
83 "The number of intervalls in x direction");
86 "The size of the domain in y direction");
88 "The number of intervalls in y direction");
92 "The size of the domain in z direction");
94 "The number of intervalls in z direction");
102 : ParentType(simulator)
104 Dune::array<unsigned, dimWorld> cellRes;
105 GlobalPosition upperRight;
106 GlobalPosition lowerLeft;
122 simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
126 unsigned numRefinments =
EWOMS_GET_PARAM(TypeTag,
unsigned, GridGlobalRefinements);
127 simplexGrid_->globalRefine(numRefinments);
129 this->finalizeInit_();
136 {
return simplexGrid_; }
142 {
return *simplexGrid_; }
145 GridPointer simplexGrid_;
static void registerParameters()
Register all run-time parameters for the grid manager.
Definition: simplexgridmanager.hh:75
Grid & grid()
Returns a reference to the grid.
Definition: simplexgridmanager.hh:135
Defines a type tags and some fundamental properties all models.
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
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:73
Definition: baseauxiliarymodule.hh:35
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description)
Register a run-time parameter.
Definition: parametersystem.hh:64
Provides the magic behind the eWoms property system.
const Grid & grid() const
Returns a reference to the grid.
Definition: simplexgridmanager.hh:141
SimplexGridManager(Simulator &simulator)
Create the Grid.
Definition: simplexgridmanager.hh:101
Provides a grid manager which a regular grid made of simplices.
Definition: simplexgridmanager.hh:59
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:95