3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dumux::CakeGridManager< Grid > Class Template Reference

Provides a grid manager with a method for creating creating vectors with polar Coordinates and one for creating a Cartesian grid from these polar coordinates. More...

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

Description

template<class Grid>
class Dumux::CakeGridManager< Grid >

Provides a grid manager with a method for creating creating vectors with polar Coordinates and one for creating a Cartesian grid from these polar coordinates.

Public Member Functions

void init (const std::string &modelParamGroup="")
 Make the grid. More...
 
std::unique_ptr< Grid > createCakeGrid (std::array< std::vector< Scalar >, dim > &polarCoordinates, Dune::FieldVector< int, dim > &indices, const std::string &modelParamGroup, bool verbose=false)
 Creates Cartesian grid from polar coordinates. More...
 
Grid & grid ()
 Returns a reference to the grid. More...
 
void loadBalance ()
 Distributes the grid on all processes of a parallel computation. More...
 

Static Public Member Functions

static void createVectors (std::array< std::vector< Scalar >, dim > &polarCoordinates, Dune::FieldVector< int, dim > &indices, const std::string &modelParamGroup, bool verbose=false)
 Create vectors containing polar coordinates of all points. More...
 

Protected Member Functions

GridPointer & gridPtr ()
 Returns a reference to the shared pointer to the grid. More...
 

Static Protected Member Functions

static void printCoordinate (const Dune::FieldVector< double, dim > &v)
 
static void printIndices (const std::vector< unsigned int > &vid)
 

Member Function Documentation

◆ createCakeGrid()

template<class Grid >
std::unique_ptr< Grid > Dumux::CakeGridManager< Grid >::createCakeGrid ( std::array< std::vector< Scalar >, dim > &  polarCoordinates,
Dune::FieldVector< int, dim > &  indices,
const std::string &  modelParamGroup,
bool  verbose = false 
)
inline

Creates Cartesian grid from polar coordinates.

Parameters
polarCoordinatesVector containing radial, angular and axial coordinates (in this order)
indicesIndices specifying the radial, angular and axial direction (in this order)
modelParamGroupname of the model parameter group
verboseif the output should be verbose

◆ createVectors()

template<class Grid >
static void Dumux::CakeGridManager< Grid >::createVectors ( std::array< std::vector< Scalar >, dim > &  polarCoordinates,
Dune::FieldVector< int, dim > &  indices,
const std::string &  modelParamGroup,
bool  verbose = false 
)
inlinestatic

Create vectors containing polar coordinates of all points.

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

  • Radial : min/max value for radial coordinate
  • Angular : min/max value for angular coordinate
  • Axial : min/max value for axial coordinate Adding 0, 1 (or 2 in 3D) specifies in which direction (x, y and z, respectively) the radial, angular and axial direction are oriented
  • Cells : number of cells array for x-coordinate (Again, an added 0, 1 or 2 specifies x, y or z)
  • Grading : grading factor array for x-coordinate (Same here)
  • Verbosity : whether the grid construction should output to standard out

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.

◆ grid()

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

Returns a reference to the grid.

◆ gridPtr()

template<class Grid >
GridPointer & Dumux::CakeGridManager< Grid >::gridPtr ( )
inlineprotected

Returns a reference to the shared pointer to the grid.

◆ init()

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

Make the grid.

◆ loadBalance()

template<class Grid >
void Dumux::CakeGridManager< Grid >::loadBalance ( )
inline

Distributes the grid on all processes of a parallel computation.

◆ printCoordinate()

template<class Grid >
static void Dumux::CakeGridManager< Grid >::printCoordinate ( const Dune::FieldVector< double, dim > &  v)
inlinestaticprotected

◆ printIndices()

template<class Grid >
static void Dumux::CakeGridManager< Grid >::printIndices ( const std::vector< unsigned int > &  vid)
inlinestaticprotected

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