version 3.9-dev
Dumux::GridManager< Dune::OneDGrid > Class Reference

Provides a grid manager for OneDGrids from information in the input file. More...

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

Inheritance diagram for Dumux::GridManager< Dune::OneDGrid >:

Description

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

  • LeftBoundary : start coordinate
  • RightBoundary : end coordinate
  • Cells : the number of cell
  • RefinementType : local or copy
  • Refinement : the number of global refines to apply initially.

Public Types

using Grid = Dune::OneDGrid
 
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 loadBalance ()
 Call loadBalance() function of the grid. OneDGrid is not parallel an thus cannot communicate. More...
 
Gridgrid ()
 Returns a reference to the grid. More...
 
const Gridgrid () const
 Returns a const reference to 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

using Dumux::GridManager< Dune::OneDGrid >::Grid = Dune::OneDGrid

◆ GridData

using Dumux::GridManagerBase< Dune::OneDGrid >::GridData = Dumux::GridData<Grid>
inherited

◆ ParentType

using Dumux::GridManager< Dune::OneDGrid >::ParentType = GridManagerBase<Grid>

Member Enumeration Documentation

◆ CellType

enum Dumux::GridManagerBase::CellType
protectedinherited

Member Function Documentation

◆ dgfGridPtr()

Dune::GridPtr< Grid > & Dumux::GridManagerBase< Dune::OneDGrid >::dgfGridPtr ( )
inlineprotectedinherited

◆ getFileExtension()

std::string Dumux::GridManagerBase< Dune::OneDGrid >::getFileExtension ( const std::string &  fileName) const
inlineprotectedinherited

◆ getGridData()

std::shared_ptr< GridData > Dumux::GridManagerBase< Dune::OneDGrid >::getGridData ( ) const
inlineinherited
Note
Throws if no grid data is available

◆ grid() [1/2]

Grid & Dumux::GridManagerBase< Dune::OneDGrid >::grid ( )
inlineinherited

◆ grid() [2/2]

const Grid & Dumux::GridManagerBase< Dune::OneDGrid >::grid ( ) const
inlineinherited

◆ gridPtr()

std::shared_ptr< Grid > & Dumux::GridManagerBase< Dune::OneDGrid >::gridPtr ( )
inlineprotectedinherited

◆ hasGridData()

bool Dumux::GridManagerBase< Dune::OneDGrid >::hasGridData ( ) const
inlineinherited

◆ init()

void Dumux::GridManager< Dune::OneDGrid >::init ( const std::string &  modelParamGroup = "")
inline

◆ loadBalance()

void Dumux::GridManager< Dune::OneDGrid >::loadBalance ( )
inline

◆ makeGridFromDgfFile()

void Dumux::GridManagerBase< Dune::OneDGrid >::makeGridFromDgfFile ( const std::string &  fileName)
inlineprotectedinherited

◆ makeGridFromFile()

void Dumux::GridManagerBase< Dune::OneDGrid >::makeGridFromFile ( const std::string &  fileName,
const std::string &  modelParamGroup 
)
inlineprotectedinherited
  • dgf (Dune Grid Format)
  • msh (Gmsh mesh format)
  • vtp/vtu (VTK file formats)

◆ makeStructuredGrid()

void Dumux::GridManagerBase< Dune::OneDGrid >::makeStructuredGrid ( CellType  cellType,
const std::string &  modelParamGroup 
)
inlineprotectedinherited

◆ maybeRefineGrid()

void Dumux::GridManagerBase< Dune::OneDGrid >::maybeRefineGrid ( const std::string &  modelParamGroup)
inlineprotectedinherited

Member Data Documentation

◆ dgfGridPtr_

Dune::GridPtr<Grid> Dumux::GridManagerBase< Dune::OneDGrid >::dgfGridPtr_
protectedinherited

◆ enableDgfGridPointer_

bool Dumux::GridManagerBase< Dune::OneDGrid >::enableDgfGridPointer_
protectedinherited

◆ enableGmshDomainMarkers_

bool Dumux::GridManagerBase< Dune::OneDGrid >::enableGmshDomainMarkers_
protectedinherited

◆ gridData_

std::shared_ptr<GridData> Dumux::GridManagerBase< Dune::OneDGrid >::gridData_
protectedinherited

◆ gridPtr_

std::shared_ptr<Grid> Dumux::GridManagerBase< Dune::OneDGrid >::gridPtr_
protectedinherited

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