25 #ifndef EWOMS_BASE_GRID_MANAGER_HH
26 #define EWOMS_BASE_GRID_MANAGER_HH
31 #include <dune/common/version.hh>
33 #include <type_traits>
37 namespace Properties {
50 template <
class TypeTag>
54 typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
55 typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
56 typedef typename GET_PROP_TYPE(TypeTag, GridManager) Implementation;
60 : simulator_(simulator)
67 {
return *gridView_; }
73 {
return *gridView_; }
80 { asImp_().grid().loadBalance(); }
86 #if DUNE_VERSION_NEWER(DUNE_COMMON, 2,3)
87 gridView_.reset(
new GridView(asImp_().grid().leafGridView()));
89 gridView_.reset(
new GridView(asImp_().grid().leafView()));
94 Implementation &asImp_()
95 {
return *
static_cast<Implementation*
>(
this); }
97 const Implementation &asImp_()
const
98 {
return *
static_cast<const Implementation*
>(
this); }
100 Simulator &simulator_;
101 std::unique_ptr<GridView> gridView_;
void finalizeInit_()
Definition: basegridmanager.hh:84
const GridView & gridView() const
Returns a reference to the grid view to be used.
Definition: basegridmanager.hh:72
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
GridView & gridView()
Returns a reference to the grid view to be used.
Definition: basegridmanager.hh:66
Definition: baseauxiliarymodule.hh:35
void loadBalance()
Distribute the grid (and attached data) over all processes.
Definition: basegridmanager.hh:79
BaseGridManager(Simulator &simulator)
Definition: basegridmanager.hh:59
Provides the magic behind the eWoms property system.