27 #ifndef EWOMS_BASE_GRID_MANAGER_HH 28 #define EWOMS_BASE_GRID_MANAGER_HH 33 #include <dune/common/version.hh> 36 #include <dune/fem/space/common/dofmanager.hh> 39 #include <type_traits> 43 namespace Properties {
57 template <
class TypeTag>
61 typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
62 typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
63 typedef typename GET_PROP_TYPE(TypeTag, GridManager) Implementation;
66 typedef typename GET_PROP_TYPE(TypeTag, GridPart) GridPart;
71 : simulator_(simulator)
80 {
return *gridView_; }
86 const GridPart& gridPart()
const 87 {
return *gridPart_; }
93 {
return *gridPart_; }
105 typedef Dune::Fem::DofManager< Grid > FemDofManager;
106 return FemDofManager::instance( gridPart().grid() ).sequence();
118 { asImp_().grid().loadBalance(); }
125 gridPart_.reset(
new GridPart(asImp_().grid()));
126 gridView_.reset(
new GridView(static_cast<GridView> (*gridPart_)));
128 gridView_.reset(
new GridView(asImp_().grid().leafGridView()));
133 Implementation& asImp_()
134 {
return *
static_cast<Implementation*
>(
this); }
136 const Implementation& asImp_()
const 137 {
return *
static_cast<const Implementation*
>(
this); }
139 Simulator& simulator_;
140 std::unique_ptr<GridView> gridView_;
142 std::unique_ptr<GridPart> gridPart_;
Definition: baseauxiliarymodule.hh:37
const GridView & gridView() const
Returns a reference to the grid view to be used.
Definition: basegridmanager.hh:79
void loadBalance()
Distribute the grid (and attached data) over all processes.
Definition: basegridmanager.hh:117
Provides the base class for most (all?) grid managers.
Definition: basegridmanager.hh:58
This file provides the infrastructure to retrieve run-time parameters.
Provides the magic behind the eWoms property system.
int gridSequenceNumber() const
Returns the number of times the grid has been changed since its creation.
Definition: basegridmanager.hh:102
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:75
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystem.hh:247