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>
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.
|
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 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...
|
|
|
GridPointer & | gridPtr () |
| Returns a reference to the shared pointer to the grid. More...
|
|
|
static void | printCoordinate (const Dune::FieldVector< double, dim > &v) |
|
static void | printIndices (const std::vector< unsigned int > &vid) |
|
◆ 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
-
polarCoordinates | Vector containing radial, angular and axial coordinates (in this order) |
indices | Indices specifying the radial, angular and axial direction (in this order) |
modelParamGroup | name of the model parameter group |
verbose | if 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 3 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()
Returns a reference to the grid.
◆ gridPtr()
Returns a reference to the shared pointer to the grid.
◆ init()
◆ loadBalance()
Distributes the grid on all processes of a parallel computation.
◆ printCoordinate()
◆ printIndices()
The documentation for this class was generated from the following file: