![]() ![]() ![]() ![]() Next: Using the mask Up: SpaceMask Previous: Abstract Contents The mask bit-fieldThe mask is a grid function which can be used to assign a state to each point on the grid. It is used as a bit field, with different bits, or combinations of bits, assigned to represent various states. The mask is currently implemented as a CCTK_INT grid function, providing 32 bits per point.part391 Appropriate numbers of bits within the mask can be allocated to represent individual states of a given type. For instance, a programmer wants to record whether each point of the grid has state ``interior'', ``excised'' or ``boundary''. The collection of these states is called a type, and 2-bits of the mask (enough to represent the three possible states of the type) are allocated to hold this information. If an independent classification of points (ie. a new type) is required, bits are allocated to it from the remaining free bits in the mask. (See Figure D19.1.) The SpaceMask thorn provides a set of routines for allocating bits within the mask, and for setting and checking the mask state at individual points.
![]() ![]() ![]() ![]() Next: Using the mask Up: SpaceMask Previous: Abstract Contents |