next up previous contents index
Next: Special Methods on Triang3d Up: Triang3d Previous: General Methods on Triang3d

The Methods Read, Write and Free

 

   (TRIANG3D * ) GRAPE(Triang3d, "read")()
CLASS * Triang3d
Read a Triang3d instance from the standard textdevice. If successful the instance otherwise NULL is returned. This method is only provided for backward compatibility to read files written with "write", it is replaced by

   GRAPE(triang, "xdr")(xdrp)
TRIANG3D * triang
XDR * xdrp
Read the instance triang from or write it to the XDR stream xdrp. This method shouldnot be called directly, refer to 5.7 (especially 5.7.3) for details.

   

GRAPE(triang3d, "free")()
TRIANG3D *triang3d;

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

These three methods are also applicable to the class Fe3d.

           

GRAPE(fe3d, "xdr")(xdrp)
(FE3D *)GRAPE(Fe3d, "read")()
GRAPE(fe3d, "free")()

The methods for reading, xdr and deleting a Triang3d instance are extended ones because of the additional data of the subclass. The corresponding finite element function is treated as linear. After writing and reading commands have been given this situation can cause for example a change from a quadratic finite element function to a linear one. If there is no special read facility for the user's data it is possible to read the Triang3d part of an earlier written fe instance.



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.