next up previous contents
Next: Vertices Up: Programmer's manual Previous: Data structures, control flags


Each element can contain information about the error that was estimated for this element. Whenever a new element is created (function CreateElement in memory.c), heap space is allocated for the user data structure. For the magnetization problem this is one variable of type COORD (cf. misc/misc.h), which stores the estimated error. However, there is no ``default'' error for a new element. Therefore it is marked to contain no valid error. The indicator for this property is the first bit of the element's control word. If it is set (1) the error is valid, if it is cleared (0) the error is not valid. Then the value of the error can be imported using the imperror command (cf. section 4.2.3), which automatically sets the corresponding bit in the control word. The latter is done by the macro SET_ERROR_OK. ERROR_OK can be used to determine the current status and RESET_ERROR_OK to reset the error bit. The error itself can be accessed by the ERROR macro.

Werner Scholz