Auxiliary Functions

For our example, we have only a single function which we will call ``KE'' for kinetic energy. From the definition of the function ($v^2$) and from the default plotting range for the variable $v$, the interval $[0, 1000]$ is probably a suitable range on which to plot the value of $v^2$. Accordingly, we edit a few more lines in bball_init():
int            n_funct=1;                /* number of user-defined functions */
static char    *funct_names[]={"KE"};    /* list of funct names; {""} if none*/
static double  funct_min[]={0};          /* default funct min for display    */
static double  funct_max[]={1000};       /* default funct max for display    */

We remark that if we did not want to monitor any auxiliary functions then we would set n_funct=0. The array of function names, however, must contain at least an empty string or else our code will not compile properly. In other words, if there were no auxiliary quantities of interest, then we could write *funct_names[]="", but not *funct_names[]=.



Adrian Bunk 2001-08-22