27#ifndef EWOMS_CUBE_GRID_VANGUARD_HH
28#define EWOMS_CUBE_GRID_VANGUARD_HH
30#include <dune/common/fvector.hh>
31#include <dune/grid/utility/structuredgridfactory.hh>
51template <
class TypeTag>
54 using ParentType = BaseVanguard<TypeTag>;
59 using GridPointer = std::unique_ptr<Grid>;
60 using CoordScalar =
typename Grid::ctype;
62 dim = Grid::dimension,
63 dimWorld = Grid::dimensionworld,
65 using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
74 (
"The number of global refinements of the grid "
75 "executed after it was loaded");
77 (
"The size of the domain in x direction");
79 (
"The number of intervalls in x direction");
81 if constexpr (dim > 1) {
83 (
"The size of the domain in y direction");
85 (
"The number of intervalls in y direction");
87 if constexpr (dim > 2) {
89 (
"The size of the domain in z direction");
91 (
"The number of intervalls in z direction");
99 : ParentType(simulator)
101 std::array<unsigned int, dim> cellRes{};
102 GlobalPosition upperRight(0.0);
103 GlobalPosition lowerLeft(0.0);
108 if constexpr (dim > 1) {
112 if constexpr (dim > 2) {
118 cubeGrid_ = Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeft, upperRight, cellRes);
119 cubeGrid_->globalRefine(
static_cast<int>(numRefinements));
121 this->finalizeInit_();
128 {
return *cubeGrid_; }
134 {
return *cubeGrid_; }
137 GridPointer cubeGrid_;
Provides the base class for most (all?) simulator vanguards.
Defines some fundamental parameters for all models.
Defines a type tags and some fundamental properties all models.
const Grid & grid() const
Returns a reference to the grid.
Definition cubegridvanguard.hh:133
Grid & grid()
Returns a reference to the grid.
Definition cubegridvanguard.hh:127
CubeGridVanguard(Simulator &simulator)
Create the grid.
Definition cubegridvanguard.hh:98
static void registerParameters()
Register all run-time parameters for the simulator vanguad.
Definition cubegridvanguard.hh:71
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
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.