27#ifndef EWOMS_BASE_VANGUARD_HH
28#define EWOMS_BASE_VANGUARD_HH
33#include <dune/common/version.hh>
36#include <dune/fem/space/common/dofmanager.hh>
47template <
class TypeTag>
61 : simulator_(simulator)
70 {
return *gridView_; }
76 const GridPart& gridPart()
const
77 {
return *gridPart_; }
83 {
return *gridPart_; }
95 using FemDofManager = Dune::Fem::DofManager< Grid >;
96 return FemDofManager::instance( asImp_().grid() ).sequence();
109 asImp_().grid().loadBalance();
123 if constexpr (std::is_same_v<GridView,
125 Properties::GridPart>::GridViewType>) {
126 gridPart_ = std::make_unique<GridPart>(asImp_().grid());
127 gridView_ = std::make_unique<GridView>(
static_cast<GridView
>(*gridPart_));
128 assert(gridView_->size(0) == asImp_().grid().leafGridView().size(0));
132 gridView_ = std::make_unique<GridView>(asImp_().grid().leafGridView());
137 Implementation& asImp_()
138 {
return *
static_cast<Implementation*
>(
this); }
140 const Implementation& asImp_()
const
141 {
return *
static_cast<const Implementation*
>(
this); }
143 Simulator& simulator_;
145 std::unique_ptr<GridPart> gridPart_;
147 std::unique_ptr<GridView> gridView_;
Defines a type tags and some fundamental properties all models.
Provides the base class for most (all?) simulator vanguards.
Definition: basevanguard.hh:49
void updateGridView_()
Definition: basevanguard.hh:120
int gridSequenceNumber() const
Returns the number of times the grid has been changed since its creation.
Definition: basevanguard.hh:92
const GridView & gridView() const
Returns a reference to the grid view to be used.
Definition: basevanguard.hh:69
void finalizeInit_()
Definition: basevanguard.hh:115
BaseVanguard(Simulator &simulator)
Definition: basevanguard.hh:60
BaseVanguard(const BaseVanguard &)=delete
void loadBalance()
Distribute the grid (and attached data) over all processes.
Definition: basevanguard.hh:107
Definition: blackoilboundaryratevector.hh:37
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:235
This file provides the infrastructure to retrieve run-time parameters.