version 3.11-dev
Loading...
Searching...
No Matches
Dumux::SubGridManagerBase< HostGrid, HostGridManager > Class Template Reference

The base class for grid managers for dune-subgrid.

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

Inheritance diagram for Dumux::SubGridManagerBase< HostGrid, HostGridManager >:

Public Types

using Grid = Dune::SubGrid<dim, HostGrid>
using GridData

Public Member Functions

template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void init (HostGrid &hostGrid, const ES &selector, const std::string &paramGroup="")
 Make the grid using an externally created host grid.
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void init (const ES &selector, const std::string &paramGroup="")
 Make the grid and create the host grid internally.
void loadBalance ()
 Call loadBalance() function of the grid.
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void update (const ES &selector)
 Update the existing subgrid.
void init (const std::string &modelParamGroup="")
 Make the grid. Implement this method in the specialization of this class for a grid type.
Gridgrid ()
 Returns a reference to the grid.
std::shared_ptr< GridDatagetGridData () const
 Get an owning pointer to grid data associated with the grid.
bool hasGridData () const
 Check whether there is data associated with the grid.

Protected Types

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

Protected Member Functions

template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void updateSubGrid_ (const ES &selector)
 Update the subgrid.
void initHostGrid_ (const std::string &paramGroup)
void initHostGrid_ (const GlobalPosition &lowerLeft, const GlobalPosition &upperRight, const std::array< int, dim > &cells, const std::string &paramGroup, const int overlap=1, const std::bitset< dim > periodic=std::bitset< dim >{})
HostGrid & hostGrid_ ()
 Returns a reference to the host grid.
std::shared_ptr< Grid > & gridPtr ()
 Returns a reference to the grid pointer (std::shared_ptr<Grid>).
Dune::GridPtr< Grid > & dgfGridPtr ()
 Returns a reference to the DGF grid pointer (Dune::GridPtr<Grid>).
std::string getFileExtension (const std::string &fileName) const
 Returns the filename extension of a given filename.
void makeGridFromFile (const std::string &fileName, const std::string &modelParamGroup)
 Makes a grid from a file. We currently support.
void makeGridFromDgfFile (const std::string &fileName)
 Makes a grid from a DGF file. This is used by grid managers that only support DGF.
void makeStructuredGrid (CellType cellType, const std::string &modelParamGroup)
 Makes a structured cube grid using the structured grid factory.
void maybeRefineGrid (const std::string &modelParamGroup)
 Refines a grid after construction if GridParameterGroup.Refinement is set in the input file.

Protected Attributes

std::unique_ptr< HostGridManager > hostGridManager_
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.
bool enableGmshDomainMarkers_
 A state variable if domain markers have been read from a Gmsh file.
bool enableVtkData_
 A state variable if cell or point data have been read from a VTK file.
std::shared_ptr< GridgridPtr_
Dune::GridPtr< GriddgfGridPtr_
std::shared_ptr< GridDatagridData_

Member Typedef Documentation

◆ Grid

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
using Dumux::SubGridManagerBase< HostGrid, HostGridManager >::Grid = Dune::SubGrid<dim, HostGrid>

◆ GridData

using Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::GridData
inherited

Member Enumeration Documentation

◆ CellType

enum Dumux::GridManagerBase::CellType
protectedinherited

Member Function Documentation

◆ dgfGridPtr()

Dune::GridPtr< Grid > & Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::dgfGridPtr ( )
inlineprotectedinherited

◆ getFileExtension()

std::string Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::getFileExtension ( const std::string & fileName) const
inlineprotectedinherited

◆ getGridData()

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

◆ grid()

Grid & Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::grid ( )
inlineinherited

◆ gridPtr()

std::shared_ptr< Grid > & Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::gridPtr ( )
inlineprotectedinherited

◆ hasGridData()

bool Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::hasGridData ( ) const
inlineinherited

◆ hostGrid_()

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
HostGrid & Dumux::SubGridManagerBase< HostGrid, HostGridManager >::hostGrid_ ( )
inlineprotected

◆ init() [1/3]

void Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::init ( const std::string & modelParamGroup = "")
inlineinherited

◆ init() [2/3]

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::init ( const ES & selector,
const std::string & paramGroup = "" )
inline

◆ init() [3/3]

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::init ( HostGrid & hostGrid,
const ES & selector,
const std::string & paramGroup = "" )
inline

◆ initHostGrid_() [1/2]

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::initHostGrid_ ( const GlobalPosition & lowerLeft,
const GlobalPosition & upperRight,
const std::array< int, dim > & cells,
const std::string & paramGroup,
const int overlap = 1,
const std::bitset< dim > periodic = std::bitset<dim>{} )
inlineprotected

◆ initHostGrid_() [2/2]

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::initHostGrid_ ( const std::string & paramGroup)
inlineprotected

◆ loadBalance()

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::loadBalance ( )
inline

◆ makeGridFromDgfFile()

void Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::makeGridFromDgfFile ( const std::string & fileName)
inlineprotectedinherited

◆ makeGridFromFile()

void Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::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::SubGrid< HostGrid::dimension, HostGrid > >::makeStructuredGrid ( CellType cellType,
const std::string & modelParamGroup )
inlineprotectedinherited

◆ maybeRefineGrid()

void Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::maybeRefineGrid ( const std::string & modelParamGroup)
inlineprotectedinherited

◆ update()

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::update ( const ES & selector)
inline

◆ updateSubGrid_()

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
template<class ES, typename std::enable_if_t< Dune::models< Concept::ElementSelector< HostElement >, ES >(), int > = 0>
void Dumux::SubGridManagerBase< HostGrid, HostGridManager >::updateSubGrid_ ( const ES & selector)
inlineprotected

Member Data Documentation

◆ dgfGridPtr_

Dune::GridPtr<Grid> Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::dgfGridPtr_
protectedinherited

◆ enableDgfGridPointer_

bool Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::enableDgfGridPointer_
protectedinherited

◆ enableGmshDomainMarkers_

bool Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::enableGmshDomainMarkers_
protectedinherited

◆ enableVtkData_

bool Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::enableVtkData_
protectedinherited

◆ gridData_

std::shared_ptr<GridData> Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::gridData_
protectedinherited

◆ gridPtr_

std::shared_ptr<Grid> Dumux::GridManagerBase< Dune::SubGrid< HostGrid::dimension, HostGrid > >::gridPtr_
protectedinherited

◆ hostGridManager_

template<class HostGrid, class HostGridManager = GridManager<HostGrid>>
std::unique_ptr<HostGridManager> Dumux::SubGridManagerBase< HostGrid, HostGridManager >::hostGridManager_
protected

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