File: node56.html

package info (click to toggle)
dstooltk-doc 2.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,024 kB
  • ctags: 451
  • sloc: perl: 753; makefile: 49; sh: 8
file content (130 lines) | stat: -rw-r--r-- 5,329 bytes parent folder | download | duplicates (2)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!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>Defining Auxiliary Functions</TITLE>
<META NAME="description" CONTENT="Defining 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="node57.html">
<LINK REL="previous" HREF="node55.html">
<LINK REL="up" HREF="node52.html">
<LINK REL="next" HREF="node57.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1236"
 HREF="node57.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/lib/latex2html/icons.gif/next_motif.gif"></A> 
<A NAME="tex2html1233"
 HREF="node52.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/lib/latex2html/icons.gif/up_motif.gif"></A> 
<A NAME="tex2html1227"
 HREF="node55.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/lib/latex2html/icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html1235"
 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="tex2html1237"
 HREF="node57.html">Defining Labels and Initial</A>
<B> Up:</B> <A NAME="tex2html1234"
 HREF="node52.html">Installing a New Dynamical</A>
<B> Previous:</B> <A NAME="tex2html1228"
 HREF="node55.html">Defining Information About an</A>
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00624000000000000000">&#160;</A><A NAME="auxeqn">&#160;</A><A NAME="2063">&#160;</A>
<BR>
Defining Auxiliary Functions
</H2> 
We continue with the above example.  Suppose that there is some scalar function
of the phase space variables, time, and parameters which we wish to monitor.
The scalar function may be a physically meaningful quantity such as the 
total energy of an (almost) conservative system,
or it could be a mathematically interesting quantity such as the
largest eigenvalue of the Jacobian matrix.  Sometimes it is useful to have functions 
which represent coordinate transformations.  For example, a particular dynamical system may 
be best described in terms of spherical coordinates.   Auxiliary functions can also
be used to monitor the distance from some set of interest.  For example, if a
system spends most of its time close to the sphere |<I>x</I>|=1 then it may be interesting
to define a function |<I>x</I>|. 

<P>
For our bouncing ball example, we will monitor the quantity <I>v</I><SUP>2</SUP>.  Since <I>v</I><SUB><I>j</I></SUB> is proportional to 
the ball's velocity just after it strikes the table for the  <I>j</I>th time, we can think 
of <I>v</I><SUB><I>j</I></SUB><SUP>2</SUP> as being a measure of the ball's kinetic energy at time <I>j</I>.  To define this function,
find the location in the file bball_def.c which reads
<PRE>
/* ------------------------------------------------------------------------
   function used to define aux functions of the varbs, time, or params
   ------------------------------------------------------------------------ */
/*
int user_aux_func(f,x,p)
double *f,*x,*p;
{
}
*/
</PRE>
and edit it to produce
<PRE>
/* ------------------------------------------------------------------------
   function used to define aux functions of the varbs, time, or params
   ------------------------------------------------------------------------ */
int bball_aux(f,x,p)
double *f,*x,*p;
{
   f[0] = x[1] * x[1];
}
</PRE>
The number of auxiliary functions is completely arbitrary; it is not necessary to have
any auxiliary functions.  When this equation is called, the calling routine passes in
the current state of the phase space variables (in x), the current parameters (in p),
and an array (f) which is filled up by this function.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1236"
 HREF="node57.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="/usr/lib/latex2html/icons.gif/next_motif.gif"></A> 
<A NAME="tex2html1233"
 HREF="node52.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="/usr/lib/latex2html/icons.gif/up_motif.gif"></A> 
<A NAME="tex2html1227"
 HREF="node55.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="/usr/lib/latex2html/icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html1235"
 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="tex2html1237"
 HREF="node57.html">Defining Labels and Initial</A>
<B> Up:</B> <A NAME="tex2html1234"
 HREF="node52.html">Installing a New Dynamical</A>
<B> Previous:</B> <A NAME="tex2html1228"
 HREF="node55.html">Defining Information About an</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I>John Lapeyre</I>
<BR><I>1998-09-04</I>
</ADDRESS>
</BODY>
</HTML>