next up previous contents index
Next: Display Methods on Triang2d Up: Triang2d Previous: Triang2d

Memory Methods on Triang2d

 

     

GRAPE(triang2d, "free")()
TRIANG2D *triang2d;

The associated memory of the instance variables is freed and the instance is deleted. For a more detailed description of this method see 5.4.4.1. This method is normally only called by the delete-method on class ROOT.

         

GRAPE(triang2d, "list-alloc")(max_points, max_elements)
GRAPE(triang2d, "list-growto")(max_points, max_elements)
GRAPE(triang2d, "list-free")()
TRIANG2D * triang2d;
int max_points, max_elements
"list-alloc" allocates memory for max-points points for the vertex lists and for max_elements elements for the connectivity, "list-free" frees the memory for the vertex lists and for the connectivity.

"list-growto" uses "list-alloc" to assure at least max_... points and elements exist.

For further information about list-alloc see 5.4.4.2.

         

GRAPE(triang2d, "point-list-alloc")(max-points, tri-connect)
GRAPE(triang2d, "point-list-free")()
TRIANG2D *triang2d;
TRIANG2D *tri-connect;
int max-points;
"point-list-alloc" allocates memory for max-points points for the vertex lists. If tri-connect is not NULL, it allocates memory for the connectivity too. "point-list-free" frees only the memory for the vertex lists.

     

GRAPE(triang2d, "list-shrink-send")()
TRIANG2D *triang2d;
Free unused space of the vertex lists: new vertex lists for triang2d->number_of_points points are allocated, the points with index from 0 to triang2d->number_of_points are copied and the old vertex lists are freed. This method is called by

   GRAPE(triang2d, "optimize-mem-send")()
TRIANG2D * triang2d
Free unused space of the vertex lists.

     

GRAPE(triang2d, "hardcopy")()
TRIANG2D *triang2d;
Create an identical copy of triang2d which has its own lists (all data is copied). "hardcopy" may not be sent to superclasses since always a new structure is allocated. The pointer to the new Triang2d instance is returned.

     

GRAPE(triang2d, "softcopy")(t2-copy)
TRIANG2D *triang2d;
TRIANG2D *t2-copy;
Make a softcopy of a Triang2d instance: like "hardcopy" but only the used data (up to number-of-points and number-of-elements) is copied. If t2-copy is not NULL then this instance is used to store the copy otherwise a new Triang2d instance is created.

     

(int *)GRAPE(t2-one, "merge")(t2-two)
TRIANG2D *t2-one;
TRIANG2D *t2-two;
Merge two Triang2d instances: append the vertex lists of t2-one to those of t2-two. If the method fails it returns NULL.


next up previous contents index
Next: Display Methods on Triang2d Up: Triang2d Previous: Triang2d

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.