27#ifndef EWOMS_SIMPLEX_GRID_VANGUARD_HH
28#define EWOMS_SIMPLEX_GRID_VANGUARD_HH
34#include <dune/grid/utility/structuredgridfactory.hh>
35#include <dune/common/fvector.hh>
43template <
class TypeTag>
51 using GridPointer = std::unique_ptr<Grid>;
52 using CoordScalar =
typename Grid::ctype;
53 enum { dimWorld = Grid::dimensionworld };
54 using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
62 Parameters::registerParam<TypeTag, Properties::GridGlobalRefinements>
63 (
"The number of global refinements of the grid "
64 "executed after it was loaded");
65 Parameters::registerParam<TypeTag, Properties::DomainSizeX>
66 (
"The size of the domain in x direction");
67 Parameters::registerParam<TypeTag, Properties::CellsX>
68 (
"The number of intervalls in x direction");
70 Parameters::registerParam<TypeTag, Properties::DomainSizeY>
71 (
"The size of the domain in y direction");
72 Parameters::registerParam<TypeTag, Properties::CellsY>
73 (
"The number of intervalls in y direction");
76 Parameters::registerParam<TypeTag, Properties::DomainSizeZ>
77 (
"The size of the domain in z direction");
78 Parameters::registerParam<TypeTag, Properties::CellsZ>
79 (
"The number of intervalls in z direction");
89 Dune::array<unsigned, dimWorld> cellRes;
90 GlobalPosition upperRight;
91 GlobalPosition lowerLeft;
94 upperRight[0] = Parameters::get<TypeTag, Properties::DomainSizeX>();
95 cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
98 upperRight[1] = Parameters::get<TypeTag, Properties::DomainSizeY>();
99 cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
103 upperRight[2] = Parameters::get<TypeTag, Properties::DomainSizeZ>();
104 cellRes[2] = Parameters::get<TypeTag, Properies::CellsZ>();
107 simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
111 unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
112 simplexGrid_->globalRefine(numRefinments);
114 this->finalizeInit_();
121 {
return simplexGrid_; }
127 {
return *simplexGrid_; }
130 GridPointer simplexGrid_;
Defines a type tags and some fundamental properties all models.
Provides the base class for most (all?) simulator vanguards.
Definition: basevanguard.hh:49
Provides a simulator vanguard which a creates regular grid made of simplices.
Definition: simplexvanguard.hh:45
static void registerParameters()
Register all run-time parameters for the grid manager.
Definition: simplexvanguard.hh:60
SimplexGridVanguard(Simulator &simulator)
Create the Grid.
Definition: simplexvanguard.hh:86
const Grid & grid() const
Returns a reference to the grid.
Definition: simplexvanguard.hh:126
Grid & grid()
Returns a reference to the grid.
Definition: simplexvanguard.hh:120
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:242
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.