next up previous contents
Next: Potential from a sum Up: evalr() Previous: evalr()

Debugging

Complex constant(d3vec r,double dconst)
Complex planewave(d3vec r,double G)
Output:

To debug evalr() above and to test that your transforms represent the correct physics, add the two functions above to your physics.C program (not as part of the pvector class, but as regular functions). Then, compile and run the program. Note how the program uses the statement ``ones.evalr(constant,1.)'' to fill the pvector ``ones'' with the value of 1. using your constant() function!

Next, based on the test for G=(0,0,0) provided in main(), use your planewave() function to write your own test for G=(1,0,0).



Tomas Arias
Sun Apr 15 19:43:40 EDT 2001