27#ifndef EWOMS_DGF_GRID_VANGUARD_HH
28#define EWOMS_DGF_GRID_VANGUARD_HH
30#include <dune/grid/io/file/dgfparser/dgfparser.hh>
31#include <dune/grid/common/mcmgmapper.hh>
48template <
class TypeTag>
57 using GridPointer = std::unique_ptr< Grid >;
65 Parameters::Register<Parameters::GridFile>
66 (
"The file name of the DGF file to load");
67 Parameters::Register<Parameters::GridGlobalRefinements>
68 (
"The number of global refinements of the grid "
69 "executed after it was loaded");
78 const std::string
dgfFileName = Parameters::Get<Parameters::GridFile>();
79 unsigned numRefinments = Parameters::Get<Parameters::GridGlobalRefinements>();
95 this->finalizeInit_();
102 {
return *gridPtr_; }
108 {
return *gridPtr_; }
118 { gridPtr_->loadBalance(); }
126 {
return fractureMapper_; }
134 {
return fractureMapper_; }
137 void addFractures_(Dune::GridPtr<Grid>&
dgfPointer)
142 if (
dgfPointer.nofParameters(
static_cast<int>(Grid::dimension)) == 0)
146 const unsigned edgeCodim = Grid::dimension - 1;
148 using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<LevelGridView>;
149 VertexMapper vertexMapper(
gridView, Dune::mcmgVertexLayout());
155 const auto& element = *
eIt;
157 Dune::ReferenceElements<Scalar, Grid::dimension>::general(element.type());
174 static_cast<unsigned>(vertexMapper.subIndex(element,
179 if (
static_cast<int>(
vertexIndices.size()) == Grid::dimension)
186 GridPointer gridPtr_;
187 FractureMapper fractureMapper_;
Provides the base class for most (all?) simulator vanguards.
Provides the base class for most (all?) simulator vanguards.
Definition basevanguard.hh:49
const GridView & gridView() const
Returns a reference to the grid view to be used.
Definition basevanguard.hh:69
Provides a simulator vanguard which creates a grid by parsing a Dune Grid Format (DGF) file.
Definition dgfvanguard.hh:50
static void registerParameters()
Register all run-time parameters for the DGF simulator vanguard.
Definition dgfvanguard.hh:63
FractureMapper & fractureMapper()
Returns the fracture mapper.
Definition dgfvanguard.hh:125
const FractureMapper & fractureMapper() const
Returns the fracture mapper.
Definition dgfvanguard.hh:133
DgfVanguard(Simulator &simulator)
Load the grid from the file.
Definition dgfvanguard.hh:75
void loadBalance()
Distributes the grid on all processes of a parallel computation.
Definition dgfvanguard.hh:117
const Grid & grid() const
Returns a reference to the grid.
Definition dgfvanguard.hh:107
Grid & grid()
Returns a reference to the grid.
Definition dgfvanguard.hh:101
Stores the topology of fractures.
Definition fracturemapper.hh:43
void addFractureEdge(unsigned vertexIdx1, unsigned vertexIdx2)
Marks an edge as having a fracture.
Definition fracturemapper.hh:74
Stores the topology of fractures.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
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.