next up previous contents
Next: An Example Up: CartGrid3D Previous: Specifying the Grid Symmetry   Contents

Specifying the Grid Size, Range, and Spacing

CartGrid3D provides several different methods for setting up the integer grid size (eg 128), floating-point grid spacing (eg 0.1), and floating-point grid range (eg 12.8).part21 You specify which method to use, with the grid::type parameter:

grid::type = "byrange"

You specify the $x$, $y$, and $z$ grid ranges, either with separate grid::xmin, grid::xmax, grid::ymin, grid::ymax, grid::zmin, and grid::zmax parameters, or with the grid::xyzmin and grid::xyzmax parameters. The grid spacings are then determined automagically from this information and the driver::global_nx, driver::global_ny, and driver::global_nz grid-size parameters. You should also choose the grid::domain parameter consistent with all these other parameters. (It's not clear whether or not the code ever explicitly checks this.)
grid::type = "box"

This is a special case of grid::type = "byrange" with the grid ranges hard-wired to grid::xyzmin = -0.5 and grid::xyzmax = +0.5.
grid::type = "byspacing"

You specify the $x$, $y$, and $z$ grid spacings, either with separate grid::dx, grid::dy, and grid::dz parameters, or with the grid::dxyz parameter. You also specify the grid symmetry with the grid::domain parameter. The $x$, $y$, and $z$ grid ranges are then determined automagically from this information and the driver::global_nx, driver::global_ny, and driver::global_nz grid-size parameters: Each coordinate's range is chosen to be either symmetric about zero, or to extend from 0 up to a maximum value.

There are also a number of optional parameters which can be used to specify whether or not it's ok to have a grid point with an $x$, $y$, and/or $z$ coordinate exactly equal to 0:

grid::no_originx, grid::no_originy, grid::no_originz, grid::no_origin

These parameters are all deprecated -- don't use them!
grid::avoid_originx

This is a Boolean parameter; if set to true (grid::avoid_originx = "true" or grid::avoid_originx = "yes" or grid::avoid_originx = 1) then the grid will be ``half-centered'' across $x=0$, ie there will be grid points at ..., $x = - \frac{3}{2} \Delta x$, $x = - \frac{1}{2} \Delta x$, $x = + \frac{1}{2} \Delta x$, $x = + \frac{3}{2} \Delta x$, ..., but not at $x=0$.
grid::avoid_originy

Same thing for $y$.
grid::avoid_originz

Same thing for $z$.
grid::avoid_origin

Same thing for all 3 axes $x$ and $y$ and $z$, ie no grid point will have $x=0$ or $y=0$ or $z=0$.


next up previous contents
Next: An Example Up: CartGrid3D Previous: Specifying the Grid Symmetry   Contents