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> 
   46template <
class TypeTag>
 
   54    using GridPointer = std::unique_ptr<Grid>;
 
   55    using CoordScalar = 
typename Grid::ctype;
 
   57        dim = Grid::dimension,
 
   58        dimWorld = Grid::dimensionworld,
 
   60    using GlobalPosition = Dune::FieldVector<CoordScalar, dimWorld>;
 
   68        Parameters::Register<Parameters::GridGlobalRefinements>
 
   69            (
"The number of global refinements of the grid " 
   70             "executed after it was loaded");
 
   71        Parameters::Register<Parameters::DomainSizeX>
 
   72            (
"The size of the domain in x direction");
 
   73        Parameters::Register<Parameters::CellsX>
 
   74            (
"The number of intervalls in x direction");
 
   76            Parameters::Register<Parameters::DomainSizeY>
 
   77                (
"The size of the domain in y direction");
 
   78            Parameters::Register<Parameters::CellsY>
 
   79                (
"The number of intervalls in y direction");
 
   81        if constexpr (dim > 2) {
 
   82            Parameters::Register<Parameters::DomainSizeZ>
 
   83                (
"The size of the domain in z direction");
 
   84            Parameters::Register<Parameters::CellsZ>
 
   85                (
"The number of intervalls in z direction");
 
   95        Dune::array<unsigned, dim> cellRes;
 
   96        GlobalPosition upperRight;
 
   97        GlobalPosition lowerLeft;
 
  100        upperRight[0] = Parameters::Get<Parameters::DomainSizeX>();
 
  101        cellRes[0] = Parameters::Get<Parameters::CellsX>();
 
  102        if constexpr (dim > 1) {
 
  104            upperRight[1] = Parameters::Get<Parameters::DomainSizeY>();
 
  105            cellRes[1] = Parameters::Get<Parameters::CellsY>();
 
  107        if constexpr (dim > 2) {
 
  109            upperRight[2] = Parameters::Get<Parameters::DomainSizeZ>();
 
  110            cellRes[2] = Parameters::Get<Parameters::CellsZ>();
 
  113        simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
 
  117        unsigned numRefinments = Parameters::Get<Parameters::GridGlobalRefinements>();
 
  118        simplexGrid_->globalRefine(numRefinments);
 
  120        this->finalizeInit_();
 
  127    { 
return simplexGrid_; }
 
  133    { 
return *simplexGrid_; }
 
  136    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:48
static void registerParameters()
Register all run-time parameters for the grid manager.
Definition: simplexvanguard.hh:66
SimplexGridVanguard(Simulator &simulator)
Create the Grid.
Definition: simplexvanguard.hh:92
const Grid & grid() const
Returns a reference to the grid.
Definition: simplexvanguard.hh:132
Grid & grid()
Returns a reference to the grid.
Definition: simplexvanguard.hh:126
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.
The Opm property system, traits with inheritance.