next up previous contents
Next: Debugging Up: Physics Previous: Physics

evalr()

  void evalr(Complex (*func)(d3vec,double),double dparam)
Input:

Output:

Add a function of the above prototype to the definition of the pvector class; this utility will make our job of doing physics simpler.

Important: ``Wrapping'' around i=j=k=0 means that, for all grid points, you always take the closest periodic image to the origin. For instance, i=N-1 is the point just before the end of the array (i=N), which by periodic boundary conditions is equivalent to i=0. Thus, we interpret i=N-1 as the point x=-1*d, where d is the grid spacing. Thus, in general, to map points [i][j][k] to vectors in space, we use the following translation:

tabular131





Tomas Arias
Mon Apr 8 17:11:28 EDT 2002