next up previous contents
Next: Using ADM Macros Up: Purpose Previous: Purpose   Contents

Finite Differencing

By default, the macros use centered 2nd order finite differencing, with 3-point finite difference molecules. That is, when finite differencing the the grid-point indices $\texttt{i} \pm 1$, $\texttt{j} \pm 1$, and $\texttt{k} \pm 1$ must also be valid, and driver::ghost_size must be set to at least $1$.

Some of the macros also support centered 4th order finite differencing; This is selected with the parameter spatial_order. This may be set to either $2$ or $4$; it defaults to $2$. If it's set to $4$, then 5-point finite difference molecules are used, so the grid-point indices $\texttt{i} \pm 2$, $\texttt{j} \pm 2$, and $\texttt{k} \pm 2$ must also be valid, and driver::ghost_size must be set to at least $2$. The only save way to be certain which macros support 4th order finite differencing is to check the source code; the macros which don't support it simply hard-code 2nd order finite differencing and ignore the spatial_order parameter.

At present 4th order finite differencing is only supported for Fortran code. (That is, at present the C versions of the macros all ignore the spatial_order parameter.)


next up previous contents
Next: Using ADM Macros Up: Purpose Previous: Purpose   Contents