version 3.9-dev
Dumux::GridManagerBase< GridType > Class Template Reference

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

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

Inheritance diagram for Dumux::GridManagerBase< GridType >:

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...
 
const Gridgrid () const
 Returns a const 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 { 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
Enumerator
Simplex 
Cube 

Member Function Documentation

◆ dgfGridPtr()

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

◆ getFileExtension()

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

◆ getGridData()

template<class GridType >
std::shared_ptr< GridData > Dumux::GridManagerBase< GridType >::getGridData ( ) const
inline
Note
Throws if no grid data is available

◆ grid() [1/2]

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

◆ grid() [2/2]

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

◆ gridPtr()

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

◆ hasGridData()

template<class GridType >
bool Dumux::GridManagerBase< GridType >::hasGridData ( ) const
inline

◆ init()

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

◆ loadBalance()

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

◆ makeGridFromDgfFile()

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

◆ makeGridFromFile()

template<class GridType >
void Dumux::GridManagerBase< GridType >::makeGridFromFile ( const std::string &  fileName,
const std::string &  modelParamGroup 
)
inlineprotected
  • 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

◆ maybeRefineGrid()

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

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

◆ enableGmshDomainMarkers_

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

◆ 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: