1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Auxiliary Functions</TITLE>
<META NAME="description" CONTENT="Auxiliary Functions">
<META NAME="keywords" CONTENT="userman">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="userman.css">
<LINK REL="next" HREF="node61.html">
<LINK REL="previous" HREF="node59.html">
<LINK REL="up" HREF="node57.html">
<LINK REL="next" HREF="node61.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1285"
HREF="node61.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/lib/latex2html/icons.gif/next_motif.gif"></A>
<A NAME="tex2html1282"
HREF="node57.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/lib/latex2html/icons.gif/up_motif.gif"></A>
<A NAME="tex2html1276"
HREF="node59.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/lib/latex2html/icons.gif/previous_motif.gif"></A>
<A NAME="tex2html1284"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/lib/latex2html/icons.gif/contents_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1286"
HREF="node61.html">Periodic Variables</A>
<B> Up:</B> <A NAME="tex2html1283"
HREF="node57.html">Defining Labels and Initial</A>
<B> Previous:</B> <A NAME="tex2html1277"
HREF="node59.html">Parameters</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H3><A NAME="SECTION00625300000000000000">
Auxiliary Functions</A>
</H3>
For our example, we have only a single function which we will call ``KE'' for kinetic energy.
From the definition of the function (<I>v</I><SUP>2</SUP>) and from the default plotting range for the
variable <I>v</I>, the interval [0, 1000] is probably a suitable range on which to plot
the value of <I>v</I><SUP>2</SUP>. Accordingly, we edit a few more lines in bball_init():
<PRE>
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 */
</PRE>
<P>
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 <EM>not</EM>
*funct_names[]=.
<P>
<BR><HR>
<ADDRESS>
<I>John Lapeyre</I>
<BR><I>1998-09-04</I>
</ADDRESS>
</BODY>
</HTML>
|