next up previous contents index
Next: Methods for Creating TimeStep Up: TimeStep Previous: TimeStep

Memory Methods on TimeStep

 

   tex2html_wrap44564    tex2html_wrap44566
TIMESTEP * step
"free" deletes all pre_objects and post_objects of the TimeStep sequence step (i.e. all objects of the pre_steps and post_steps, too), finally the TimeSteps itself are freed.

Since the steps in the sequence point to each other (step-> post_step's pre_step is step) the TimeStep class needs a special "zero-refs" method (compare 5.4.5.2) to determine if the sequence can be deleted.

   tex2html_wrap44568    tex2html_wrap44570
TIMESTEP * step, * copy
Both methods create a copy of step with the same number of steps and the same times as step and return it. "softcopy" uses a given copy sequence to store the copy, if copy is NULL it allocates new TimeSteps for the copy as "hardcopy" does.

The big difference between these methods is that "hardcopy" copies all objects of the step sequence using "hardcopy" while "softcopy" only ASSIGNs the objects of the step sequence to the copy sequence, existing objects in the copy sequence are deleted.



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.