27#ifndef EWOMS_SIMPLEX_GRID_VANGUARD_HH
28#define EWOMS_SIMPLEX_GRID_VANGUARD_HH
30#include <dune/common/fvector.hh>
32#include <dune/grid/utility/structuredgridfactory.hh>
48template <
class TypeTag>
56 using GridPointer = std::unique_ptr<Grid>;
57 using CoordScalar =
typename Grid::ctype;
59 dim = Grid::dimension,
60 dimWorld = Grid::dimensionworld,
62 using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
71 (
"The number of global refinements of the grid "
72 "executed after it was loaded");
74 (
"The size of the domain in x direction");
76 (
"The number of intervalls in x direction");
79 (
"The size of the domain in y direction");
81 (
"The number of intervalls in y direction");
83 if constexpr (dim > 2) {
85 (
"The size of the domain in z direction");
87 (
"The number of intervalls in z direction");
95 : ParentType(simulator)
97 std::array<unsigned, dim> cellRes{};
98 GlobalPosition upperRight;
99 GlobalPosition lowerLeft;
104 if constexpr (dim > 1) {
109 if constexpr (dim > 2) {
115 simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
120 simplexGrid_->globalRefine(numRefinments);
122 this->finalizeInit_();
129 {
return simplexGrid_; }
135 {
return *simplexGrid_; }
138 GridPointer simplexGrid_;
Provides the base class for most (all?) simulator vanguards.
Defines a type tags and some fundamental properties all models.
Provides the base class for most (all?) simulator vanguards.
Definition basevanguard.hh:50
static void registerParameters()
Register all run-time parameters for the grid manager.
Definition simplexvanguard.hh:68
SimplexGridVanguard(Simulator &simulator)
Create the Grid.
Definition simplexvanguard.hh:94
const Grid & grid() const
Returns a reference to the grid.
Definition simplexvanguard.hh:134
Grid & grid()
Returns a reference to the grid.
Definition simplexvanguard.hh:128
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
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:233
This file provides the infrastructure to retrieve run-time parameters.
void Register(const char *usageString)
Register a run-time parameter.
Definition parametersystem.hpp:292
auto Get(bool errorIfNotRegistered=true)
Retrieve a runtime parameter.
Definition parametersystem.hpp:187
The Opm property system, traits with inheritance.