For our example, since the equations of motion are invariant under the transformation
for any integer n, we may consider
to be a
periodic variable with period
.
We may choose any interval of length
as a fundamental domain for the variable
.
Common choices are
the intervals
and
.
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 jth 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.