143 | | x=(xlower + (REAL(i,xPrec)-half) * dx) |
144 | | y=(ylower + (REAL(j,xPrec)-half) * dy) |
145 | | z=(zlower + (REAL(k,xPrec)-half) * dz) |
146 | | |
147 | | q(i,j,k) = rho(x,y,z) |
| 142 | x=(xlower + (REAL(i)-half) * dx) |
| 143 | y=(ylower + (REAL(j)-half) * dx) |
| 144 | z=(zlower + (REAL(k)-half) * dx) |
| 145 | |
| 146 | Info%q(i,j,k,irho) = rho(x,y,z) |
156 | | * '''''Xlower(3)''''': The spatial coordinates of the grid's lower bound in each dimension. These values are ''always'' given in computational units. |
157 | | * '''''dX(3)''''': The size of a spatial step in a given dimension. {{{dX(n)}}} can also be thought of as the size of a cell along dimension ''n''. |
158 | | |
159 | | To make this example more readable (and therefore easier to debug), we assigned the various array values more Cartesian-sounding names (ie., {{{Info%dX(2) = dy}}}). |
| 155 | * '''''xbounds(3,2)''''': The spatial coordinates of the grid's lower and upper bounds in each dimension. These values are ''always'' given in computational units. |
| 156 | * '''''dX''''': The size of a spatial step. {{{dX}}} can also be thought of as the size of a cell. In AstroBEAR's current form, {{{dX}}} is the same in every dimension and is therefore not actually an array. |
| 157 | |
| 158 | To make this example more readable (and therefore easier to debug), we assigned the various array values more Cartesian-sounding names. |