3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > Class Template Reference

Provides a grid manager for YaspGrids with different zones and grading. More...

#include <dumux/io/grid/gridmanager_yasp.hh>

Inheritance diagram for Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >:

Description

template<class ctype, int dim>
class Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >

Provides a grid manager for YaspGrids with different zones and grading.

All keys are expected to be in group GridParameterGroup. The following keys are recognized:

The grading factor \( g \) specifies the ratio between the next and the current cell size: \( g = \frac{h_{i+1}}{h_i} \). Negative grading factors are converted to \( g = -\frac{1}{g_\textrm{negative}} \) to avoid issues with imprecise fraction numbers.

Public Types

using Grid = typename Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > >
 
using ParentType = GridManagerBase< Grid >
 
using GridData = Dumux::GridData< Grid >
 

Public Member Functions

void init (const std::string &modelParamGroup="")
 Make the grid. This is implemented by specializations of this method. More...
 
void init (const std::array< std::vector< ctype >, dim > &positions, const std::array< std::vector< int >, dim > &cells, const std::array< std::vector< ctype >, dim > &grading, const std::string &modelParamGroup="")
 Make the grid using input data not read from the input file. More...
 
Gridgrid ()
 Returns a reference to the grid. More...
 
void loadBalance ()
 Call loadBalance() function of the grid. More...
 
std::shared_ptr< GridDatagetGridData () const
 Get an owning pointer to grid data associated with the grid. More...
 
bool hasGridData () const
 Check whether there is data associated with the grid. More...
 

Protected Types

enum  CellType
 The cell types for structured grids. More...
 

Protected Member Functions

std::shared_ptr< Grid > & gridPtr ()
 Returns a reference to the grid pointer (std::shared_ptr<Grid>) More...
 
Dune::GridPtr< Grid > & dgfGridPtr ()
 Returns a reference to the DGF grid pointer (Dune::GridPtr<Grid>). More...
 
std::string getFileExtension (const std::string &fileName) const
 Returns the filename extension of a given filename. More...
 
void makeGridFromFile (const std::string &fileName, const std::string &modelParamGroup)
 Makes a grid from a file. We currently support. More...
 
void makeGridFromDgfFile (const std::string &fileName)
 Makes a grid from a DGF file. This is used by grid managers that only support DGF. More...
 
void makeStructuredGrid (CellType cellType, const std::string &modelParamGroup)
 Makes a structured cube grid using the structured grid factory. More...
 
void maybeRefineGrid (const std::string &modelParamGroup)
 Refines a grid after construction if GridParameterGroup.Refinement is set in the input file. More...
 

Protected Attributes

bool enableDgfGridPointer_
 A state variable if the DGF Dune::GridPtr has been enabled. It is always enabled if a DGF grid file was used to create the grid. More...
 
bool enableGmshDomainMarkers_
 A state variable if domain markers have been read from a Gmsh file. More...
 
std::shared_ptr< GridgridPtr_
 
Dune::GridPtr< GriddgfGridPtr_
 
std::shared_ptr< GridDatagridData_
 

Member Typedef Documentation

◆ Grid

template<class ctype , int dim>
using Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::Grid = typename Dune::YaspGrid<dim, Dune::TensorProductCoordinates<ctype, dim> >

◆ GridData

using Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::GridData = Dumux::GridData<Grid>
inherited

◆ ParentType

template<class ctype , int dim>
using Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::ParentType = GridManagerBase<Grid>

Member Enumeration Documentation

◆ CellType

enum Dumux::GridManagerBase::CellType
protectedinherited

The cell types for structured grids.

Member Function Documentation

◆ dgfGridPtr()

Dune::GridPtr< Grid > & Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::dgfGridPtr ( )
inlineprotectedinherited

Returns a reference to the DGF grid pointer (Dune::GridPtr<Grid>).

◆ getFileExtension()

std::string Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::getFileExtension ( const std::string &  fileName) const
inlineprotectedinherited

Returns the filename extension of a given filename.

◆ getGridData()

std::shared_ptr< GridData > Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::getGridData ( ) const
inlineinherited

Get an owning pointer to grid data associated with the grid.

Note
Throws if no grid data is available

◆ grid()

Grid & Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::grid ( )
inlineinherited

Returns a reference to the grid.

◆ gridPtr()

std::shared_ptr< Grid > & Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::gridPtr ( )
inlineprotectedinherited

Returns a reference to the grid pointer (std::shared_ptr<Grid>)

◆ hasGridData()

bool Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::hasGridData ( ) const
inlineinherited

Check whether there is data associated with the grid.

◆ init() [1/2]

template<class ctype , int dim>
void Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::init ( const std::array< std::vector< ctype >, dim > &  positions,
const std::array< std::vector< int >, dim > &  cells,
const std::array< std::vector< ctype >, dim > &  grading,
const std::string &  modelParamGroup = "" 
)
inline

Make the grid using input data not read from the input file.

◆ init() [2/2]

template<class ctype , int dim>
void Dumux::GridManager< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::init ( const std::string &  modelParamGroup = "")
inline

Make the grid. This is implemented by specializations of this method.

◆ loadBalance()

void Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::loadBalance ( )
inlineinherited

Call loadBalance() function of the grid.

◆ makeGridFromDgfFile()

void Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::makeGridFromDgfFile ( const std::string &  fileName)
inlineprotectedinherited

Makes a grid from a DGF file. This is used by grid managers that only support DGF.

◆ makeGridFromFile()

void Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::makeGridFromFile ( const std::string &  fileName,
const std::string &  modelParamGroup 
)
inlineprotectedinherited

Makes a grid from a file. We currently support.

  • dgf (Dune Grid Format)
  • msh (Gmsh mesh format)
  • vtp/vtu (VTK file formats)

◆ makeStructuredGrid()

void Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::makeStructuredGrid ( CellType  cellType,
const std::string &  modelParamGroup 
)
inlineprotectedinherited

Makes a structured cube grid using the structured grid factory.

◆ maybeRefineGrid()

void Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::maybeRefineGrid ( const std::string &  modelParamGroup)
inlineprotectedinherited

Refines a grid after construction if GridParameterGroup.Refinement is set in the input file.

Member Data Documentation

◆ dgfGridPtr_

Dune::GridPtr<Grid> Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::dgfGridPtr_
protectedinherited

◆ enableDgfGridPointer_

bool Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::enableDgfGridPointer_
protectedinherited

A state variable if the DGF Dune::GridPtr has been enabled. It is always enabled if a DGF grid file was used to create the grid.

◆ enableGmshDomainMarkers_

bool Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::enableGmshDomainMarkers_
protectedinherited

A state variable if domain markers have been read from a Gmsh file.

◆ gridData_

std::shared_ptr<GridData> Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::gridData_
protectedinherited

◆ gridPtr_

std::shared_ptr<Grid> Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::gridPtr_
protectedinherited

The documentation for this class was generated from the following file: