next up previous contents
Next: Numerical Algorithms Up: Defining Labels and Initial Previous: Auxiliary Functions   Contents

Periodic Variables

We must tell DsTool whether our phase space contains any periodic variables. The coding of this information is accomplished through two C-language constants: EUCLIDEAN or PERIODIC. If there are no periodic variables, then the phase space is EUCLIDEAN; if there is at least one periodic variable, the phase space is classified as PERIODIC. For PERIODIC phase spaces, we must also inform DsTool as to which variables are periodic and what interval to use as a fundamental domain.

For our example, since the equations of motion are invariant under the transformation $\phi \to \phi + 2n \pi$ for any integer $n$, we may consider $\phi$ to be a periodic variable with period $2 \pi$. We may choose any interval of length $2 \pi$ as a fundamental domain for the variable $\phi$. Common choices are the intervals $[-\pi, \pi]$ and $[0, 2 \pi]$. We make the latter choice. To pass this information into DsTool, we edit yet a few more lines in bball_init():

int           manifold_type=PERIODIC;   /* EUCLIDEAN or PERIODIC                */
static int    periodic_varb[]={TRUE, FALSE}; /* if PERIODIC, which varbs periodic? */
static double period_start[]={0.,0.};   /*if PERIODIC, begin fundamental domain */
static double period_end[]={TWOPI, 1.}; /*if PERIODIC, end of fundamental domain*/

We remark on the variables period_start and period_end. If the $j$th coordinate is not periodic (i.e., the value of periodic_varb$[j]$ is FALSE) then it does not matter what period_start$[j]$ and period_end$[j]$ are because the entries are ignored by DsTool. Similarly, if the variable manifold_type is EUCLIDEAN, then it doesn't matter what values are given for the entries of periodic_varb. It is always safe, of course, to set each entry of periodic_varb to FALSE. As mentioned in Section 4.2.5.1, TWOPI is a global constant.


next up previous contents
Next: Numerical Algorithms Up: Defining Labels and Initial Previous: Auxiliary Functions   Contents
2010-01-07