27#ifndef EWOMS_STRUCTURED_GRID_VANGUARD_HH
28#define EWOMS_STRUCTURED_GRID_VANGUARD_HH
30#include <dune/common/fvector.hh>
31#include <dune/common/version.hh>
33#include <dune/grid/yaspgrid.hh>
34#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
44#include <dune/alugrid/grid.hh>
45#include <dune/alugrid/dgf.hh>
53template <
class TypeTag>
58namespace Opm::Properties {
68static constexpr int dim = 2;
70static constexpr int dim = GRIDDIM;
75template<
class TypeTag>
77{
using type = Dune::ALUGrid< dim, dim, Dune::cube, Dune::nonconforming >; };
79template<
class TypeTag>
81{
using type = Dune::YaspGrid< dim >; };
84template<
class TypeTag>
97template <
class TypeTag>
100 using ParentType = BaseVanguard<TypeTag>;
105 using GridPointer = std::unique_ptr<Grid>;
107 static constexpr int dim = Grid::dimension;
116 (
"The number of global refinements of the grid "
117 "executed after it was loaded");
119 (
"The size of the domain in x direction");
121 (
"The number of intervalls in x direction");
122 if constexpr (dim > 1) {
124 (
"The size of the domain in y direction");
126 (
"The number of intervalls in y direction");
128 if constexpr (dim > 2) {
130 (
"The size of the domain in z direction");
132 (
"The number of intervalls in z direction");
140 : ParentType(simulator)
142 Dune::FieldVector<int, dim> cellRes;
144 using GridScalar = double;
145 Dune::FieldVector<GridScalar, dim> upperRight;
146 Dune::FieldVector<GridScalar, dim> lowerLeft( 0 );
153 if constexpr (dim == 3) {
158 std::stringstream dgffile;
159 dgffile <<
"DGF" <<
'\n'
160 <<
"INTERVAL" <<
'\n'
162 << upperRight <<
'\n'
165 <<
"GridParameter" <<
'\n'
166 <<
"overlap 1" <<
'\n'
172 gridPtr_.reset(Dune::GridPtr<Grid>(dgffile).release());
175 gridPtr_->globalRefine(numRefinements);
177 this->finalizeInit_();
184 {
return *gridPtr_; }
190 {
return *gridPtr_; }
193 GridPointer gridPtr_;
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.
Helper class for grid instantiation of the lens problem.
Definition structuredgridvanguard.hh:99
StructuredGridVanguard(Simulator &simulator)
Create the grid for the lens problem.
Definition structuredgridvanguard.hh:139
static void registerParameters()
Register all run-time parameters for the structured grid simulator vanguard.
Definition structuredgridvanguard.hh:113
const Grid & grid() const
Return a constant reference to the grid object.
Definition structuredgridvanguard.hh:189
Grid & grid()
Return a reference to the grid object.
Definition structuredgridvanguard.hh:183
The generic type tag for problems using the immiscible multi-phase model.
Definition blackoilmodel.hh:82
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.
The type of the DUNE grid.
Definition basicproperties.hh:104
Definition structuredgridvanguard.hh:62
Property which provides a Vanguard (manages grids).
Definition basicproperties.hh:100