next up previous contents index
Next: Memory Methods on TimeStep Up: Supervising Classes Previous: Streaklines

TimeStep

 

The class TimeStep is currently the only fully implemented dynamic process in GRAPE. In this section we will only document the methods on TimeStep, refer to section 4.4.4 for a description of how to use this class.

TimeSteps are nodes in a double linked list (the dynamic process), they have a pointer to the previous (pre_step) and the following (post_step) step. The data stored in each TimeStep are the time of the step and the two objects pre_object and post_object:

 

#CLASS TimeStep : Root {
  double time;
  struct timestep *pre_step, *post_step;
  INSTANCE *pre_object, *post_object;
};

The pre_object and post_object of a TimeStep can either be identical (the simple case) or point to different instances. But even in the second case both objects have to represent the same data, for triang objects for example the geometries (FE data etc.) must be identical, only the discretizations may differ, see figure 4.22.

The most important method on TimeStep is

   (INSTANCE * ) GRAPE(step, "get-object")(inst, time)
TIMESTEP * step
INSTANCE * inst
double time
It creates a current object for the given time from the TimeStep sequence step. This object is created by interpolation therefore an "interpol" method must exist on the class of the step's objects. The result of the interpolation is stored in the inst instance and returned, if inst is NULL an new instance is allocated instead.

Since "get-object" uses "interpol" to create the object for a specific time from the dynamic process it must be possible to interpolate the post_object of a TimeStep and the pre_object of the following step post_step, for the triang classes therefore the discretizations of these objects have to be identical.





SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.