The Attribute Class



next up previous contents
Next: The Grid Classes Up: 7.1.1 Architecture Previous: The Value Definition

The Attribute Class

   

The information contained in a value definition object is not enough to represent a PIF attribute. Attributes additionally have an attribute type associated with them, and may have an inheritance handle for inheriting information from other attributes.

However, information is needed in an attribute, that is not pertinent on PIF but has to be stored in attribute objects too. For example, an extrapolation constant array see Section 7.1.3 is contained in the attribute class definition, which is used if the ``constant extrapolation mode'' is requested from the interpolation routines. In this case the interpolation routines will use this extrapolation constant, if a point is not located inside the grid on which interpolation takes place. Furthermore, a GRS object pointer to the grid object the attribute is defined on, and an array of pointers to attribute derivatives (which are attributes themselves) used for interpolation on tensor product grids see Section 7.1.3 are contained in the attribute class. Fig. 7.3 shows an example of an attribute object which in turn references a grid object.

  
Figure: Attribute object referencing a grid object. Note that only members referencing other objects are drawn. The attribute is contained in a linked list of attributes. The values of the attribute object are contained in an array object (in this case a floating point array object). The grid the attribute is defined on is also referenced by its spatial derivatives, which are stored as attribute objects too.

During unstructured grid reading, a method for preparing the attribute containing the element type specification of an unstructured grid is used. This method reads the ElementType attribute and checks if all elements are equal (i.e. it is a uniform unstructured grid) or not (i.e. it is a mixed-element unstructured grid). In the latter case, another method for reading the next element type from the ElementType attribute is used then for obtaining the correct grid element type.

For interpolation on attributes, methods for logarithmizing and delogarithmizing attributes are used, if the quantity to be interpolated has exponential characteristics. In this case, the attribute is logarithmized after reading, then the interpolation is performed, and the new (interpolated) attribute is delogarithmized accordingly.

The higher-order tensor product interpolation needs to calculated the spatial attribute derivatives prior to interpolation. GRS stores this derivatives also as attributes, and therefore needs to clone an attribute holding the derivatives from an already existing one. The cloned attribute inherits the values of all attribute members, with the exception of the PIF inheritance handle, but gets a new name assigned which is derived from the name of the original attribute by appending a sequential unique number.

The two most important methods used by applications are the one reading an attribute and the grid it is defined on into memory, and another one performing the actual interpolation on one point on the attribute. These two methods are explained in detail in Section 7.1.3.



next up previous contents
Next: The Grid Classes Up: 7.1.1 Architecture Previous: The Value Definition



Martin Stiftinger
Tue Nov 29 19:41:50 MET 1994