3.1-git
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::GridManagerBase< GridType > Class Template Reference

The grid manager base interface (public) and methods common to most grid manager specializations (protected). More...

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

Inheritance diagram for Dumux::GridManagerBase< GridType >:
Inheritance graph

Description

template<class GridType>
class Dumux::GridManagerBase< GridType >

The grid manager base interface (public) and methods common to most grid manager specializations (protected).

Public Types

using Grid = GridType
 
using GridData = Dumux::GridData< Grid >
 

Public Member Functions

void init (const std::string &modelParamGroup="")
 Make the grid. Implement this method in the specialization of this class for a grid type. More...
 
Gridgrid ()
 Returns a reference to the grid. More...
 
void loadBalance ()
 Call loadBalance() function of the grid. More...
 
std::shared_ptr< GridDatagetGridData () const
 

Protected Types

enum  CellType { Simplex , Cube }
 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...
 
template<int dim, int dimworld>
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_ = false
 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_ = false
 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 GridType >
using Dumux::GridManagerBase< GridType >::Grid = GridType

◆ GridData

template<class GridType >
using Dumux::GridManagerBase< GridType >::GridData = Dumux::GridData<Grid>

Member Enumeration Documentation

◆ CellType

template<class GridType >
enum Dumux::GridManagerBase::CellType
protected

The cell types for structured grids.

Enumerator
Simplex 
Cube 

Member Function Documentation

◆ dgfGridPtr()

template<class GridType >
Dune::GridPtr< Grid > & Dumux::GridManagerBase< GridType >::dgfGridPtr ( )
inlineprotected

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

◆ getFileExtension()

template<class GridType >
std::string Dumux::GridManagerBase< GridType >::getFileExtension ( const std::string &  fileName) const
inlineprotected

Returns the filename extension of a given filename.

◆ getGridData()

template<class GridType >
std::shared_ptr< GridData > Dumux::GridManagerBase< GridType >::getGridData ( ) const
inline

◆ grid()

template<class GridType >
Grid & Dumux::GridManagerBase< GridType >::grid ( )
inline

Returns a reference to the grid.

◆ gridPtr()

template<class GridType >
std::shared_ptr< Grid > & Dumux::GridManagerBase< GridType >::gridPtr ( )
inlineprotected

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

◆ init()

template<class GridType >
void Dumux::GridManagerBase< GridType >::init ( const std::string &  modelParamGroup = "")
inline

Make the grid. Implement this method in the specialization of this class for a grid type.

◆ loadBalance()

template<class GridType >
void Dumux::GridManagerBase< GridType >::loadBalance ( )
inline

Call loadBalance() function of the grid.

◆ makeGridFromDgfFile()

template<class GridType >
void Dumux::GridManagerBase< GridType >::makeGridFromDgfFile ( const std::string &  fileName)
inlineprotected

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

◆ makeGridFromFile()

template<class GridType >
void Dumux::GridManagerBase< GridType >::makeGridFromFile ( const std::string &  fileName,
const std::string &  modelParamGroup 
)
inlineprotected

Makes a grid from a file. We currently support.

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

◆ makeStructuredGrid()

template<class GridType >
template<int dim, int dimworld>
void Dumux::GridManagerBase< GridType >::makeStructuredGrid ( CellType  cellType,
const std::string &  modelParamGroup 
)
inlineprotected

Makes a structured cube grid using the structured grid factory.

◆ maybeRefineGrid()

template<class GridType >
void Dumux::GridManagerBase< GridType >::maybeRefineGrid ( const std::string &  modelParamGroup)
inlineprotected

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

Member Data Documentation

◆ dgfGridPtr_

template<class GridType >
Dune::GridPtr<Grid> Dumux::GridManagerBase< GridType >::dgfGridPtr_
protected

◆ enableDgfGridPointer_

template<class GridType >
bool Dumux::GridManagerBase< GridType >::enableDgfGridPointer_ = false
protected

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_

template<class GridType >
bool Dumux::GridManagerBase< GridType >::enableGmshDomainMarkers_ = false
protected

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

◆ gridData_

template<class GridType >
std::shared_ptr<GridData> Dumux::GridManagerBase< GridType >::gridData_
protected

◆ gridPtr_

template<class GridType >
std::shared_ptr<Grid> Dumux::GridManagerBase< GridType >::gridPtr_
protected

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