version 3.10.0
Loading...
Searching...
No Matches
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 > > >

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

  • Positions0 : position array for x-coordinate
  • Positions1 : position array for y-coordinate
  • Positions2 : position array for z-coordinate
  • Cells0 : number of cells array for x-coordinate
  • Cells1 : number of cells array for y-coordinate
  • Cells2 : number of cells array for z-coordinate
  • Grading0 : grading factor array for x-coordinate
  • Grading1 : grading factor array for y-coordinate
  • Grading2 : grading factor array for z-coordinate
  • Verbosity : whether the grid construction should output to standard out
  • Periodic : true or false for each direction
  • Overlap : overlap size in cells
  • Partitioning : a non-standard load-balancing, number of processors per direction
  • KeepPyhsicalOverlap : whether to keep the physical overlap in physical size or in number of cells upon refinement
  • Refinement : the number of global refines to apply initially.

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 Grid
 
using GridData
 

Public Member Functions

void init (const std::string &modelParamGroup="")
 Make the grid. This is implemented by specializations of this method.
 
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.
 
void init (const std::string &modelParamGroup="")
 Make the grid. Implement this method in the specialization of this class for a grid type.
 
void init (const std::string &modelParamGroup="")
 Make the grid. Implement this method in the specialization of this class for a grid type.
 
Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & grid ()
 Returns a reference to the grid.
 
const Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & grid () const
 Returns a const reference to the grid.
 
Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & grid ()
 Returns a reference to the grid.
 
const Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & grid () const
 Returns a const reference to the grid.
 
void loadBalance ()
 Call loadBalance() function of the grid.
 
void loadBalance ()
 Call loadBalance() function of the grid.
 
std::shared_ptr< GridDatagetGridData () const
 Get an owning pointer to grid data associated with 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.
 
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

std::shared_ptr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > & gridPtr ()
 Returns a reference to the grid pointer (std::shared_ptr<Grid>)
 
std::shared_ptr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > & gridPtr ()
 Returns a reference to the grid pointer (std::shared_ptr<Grid>)
 
Dune::GridPtr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > & dgfGridPtr ()
 Returns a reference to the DGF grid pointer (Dune::GridPtr<Grid>).
 
Dune::GridPtr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > & 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.
 
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 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 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 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.
 
void maybeRefineGrid (const std::string &modelParamGroup)
 Refines a grid after construction if GridParameterGroup.Refinement is set in the input file.
 
void makeStructuredGrid (CellType cellType, const std::string &modelParamGroup)
 Makes a structured cube grid using the structured grid factory.
 

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.
 
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 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.
 
bool enableVtkData_
 A state variable if cell or point data have been read from a VTK file.
 
std::shared_ptr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > gridPtr_
 
std::shared_ptr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > gridPtr_
 
Dune::GridPtr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > dgfGridPtr_
 
Dune::GridPtr< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > dgfGridPtr_
 
std::shared_ptr< GridDatagridData_
 
std::shared_ptr< GridDatagridData_
 

Member Typedef Documentation

◆ Grid [1/2]

using Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > >

◆ Grid [2/2]

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

◆ ParentType

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

Member Enumeration Documentation

◆ CellType

Member Function Documentation

◆ dgfGridPtr() [1/2]

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

◆ dgfGridPtr() [2/2]

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

◆ getFileExtension() [1/2]

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

◆ getFileExtension() [2/2]

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

◆ getGridData() [1/2]

std::shared_ptr< GridData > Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::getGridData ( ) const
inline
Note
Throws if no grid data is available

◆ getGridData() [2/2]

std::shared_ptr< GridData > Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::getGridData ( ) const
inline
Note
Throws if no grid data is available

◆ grid() [1/4]

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

◆ grid() [2/4]

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

◆ grid() [3/4]

const Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::grid ( ) const
inline

◆ grid() [4/4]

const Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > & Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::grid ( ) const
inline

◆ gridPtr() [1/2]

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

◆ gridPtr() [2/2]

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

◆ hasGridData() [1/2]

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

◆ hasGridData() [2/2]

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

◆ init() [1/4]

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

◆ init() [2/4]

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

◆ init() [3/4]

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

◆ init() [4/4]

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

◆ loadBalance() [1/2]

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

◆ loadBalance() [2/2]

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

◆ makeGridFromDgfFile() [1/2]

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

◆ makeGridFromDgfFile() [2/2]

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

◆ makeGridFromFile() [1/2]

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

◆ makeGridFromFile() [2/2]

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

◆ makeStructuredGrid() [1/3]

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

◆ makeStructuredGrid() [2/3]

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

◆ makeStructuredGrid() [3/3]

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

◆ maybeRefineGrid() [1/2]

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

◆ maybeRefineGrid() [2/2]

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

Member Data Documentation

◆ dgfGridPtr_ [1/2]

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

◆ dgfGridPtr_ [2/2]

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

◆ enableDgfGridPointer_ [1/2]

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

◆ enableDgfGridPointer_ [2/2]

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

◆ enableGmshDomainMarkers_ [1/2]

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

◆ enableGmshDomainMarkers_ [2/2]

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

◆ enableVtkData_ [1/2]

bool Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::enableVtkData_
protected

◆ enableVtkData_ [2/2]

bool Dumux::GridManagerBase< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >::enableVtkData_
protected

◆ gridData_ [1/2]

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

◆ gridData_ [2/2]

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

◆ gridPtr_ [1/2]

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

◆ gridPtr_ [2/2]

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

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