This data type describes a node in the tree to be created.
Number of nodes in this list.
Number of integers to encode the properties. This depends on the number of colors and defines the size of the the first dimension (width) in the grw_int2dArray propertyBits.
Auxilary value to provide the number of bytes available per integer in the propertybits.
Indicator for the starting bit of the last byte in the propertybits.
Counter for the number of colors in the mesh.
Id of the 'none' color, this color will not be considered in the final color information for treelm.
If there is no 'none' color this will be -1, otherwise it is the id of the color with the label 'none' in the unique list of color labels.
Number of characters needed to hold all colors.
Number of levels, that need to be further refined for colors with subelement resolution.
If there are no colors with subelement resolution at all, this setting is 0.
True if distance refine objects are created for boundary attribute.
If there is no distance refine object then no need to append distance_first and distance_last for every node
List of treeIDs for all the nodes in the built tree.
We are exploiting here the fact, that new nodes are created in order level by level. Therefore, it is not necessary to use an additional index list to maintain the ranking of the entries, as it is done in the dyn_arrays.
The property bits can be used to attach various information to the element. They can span multiple integers (width of the 2d growing array) and all bytes except the very last one are used to encode colors (1 byte per color).
In the last byte other properties are encoded (Bits 0-7) of last byte. (The last byte is given by ibits(PropertyBits%val(propLength,iNode), pos=bit_size(int)-8, len=8)) The following bits are used: Bit 0: NoSolidification is set, if solidification is not allowed for node Bit 1: isLeaf Bit is set, if there are no further descendants Bit 2: IntersectsBoundaries, is set, if the element intersects boundaries Bit 3: IntersectsAll Set, if all objects are seperate intersected_object Bit 4: isFluidifyable is set, if the node is fluidifyable. Bit 5: isFlooded is set, if node is flooded by any color. Bit 6: isColored is set, if there is another than the none color in the node. Bit 7: isTarget is set, if this node should be in the final mesh, even so it has further children.
To encode a color, we need a representation for each of the 6 sides and one for the volume, resulting in a total of 7 bits for each color. Thus, a complete Byte is used for each color. The first color is stored in the first Byte of the first integer and the other follow consecutively. Ordering of the sides as given by the definition described for the linkPos component. We also need to store intersections on a per color basis, as we want to get the flooding stopped by differently colored boundaries. The layout of the bits for each color ar therefore: Bit 0: intersects a relevant geometry (same color or geom. color = -1) Bit 1: node is flooded with this color Bit 2-7: colored wetness of the 6 node sides
Store which of 26 directions of node has boundary. Uses first 26 bits of the integer with each bit corresponds to treelm direction given by qOffset in tem_param_module
Minimum boundary ID intersect by the node
Used to set boundaryID based on thuming rule when a node is intersected by more than one boundary object
List of all objects intersecting this node.
If children are created for this node, the number of children with intersected objects thats fits in to the memory of its parent starting from child with highest number of intersected object will be copied to the memory position of its parent to save memory.
First and last position of this node's intersected objects in growing array of intersected_object
List of all sphere_distance objects intersecting this node
First and last position of this node's intersected distance refine objects in growing array of intersected_distance
Memory unused by children from parent intersected object list
Memory unused by children from parent intersected distance list
minLevel for each node. Used in refineleaf and inherit distance refine object. If intersected object level is <= minLevel then that object is not added to intersected object list for children. This should reduce memory to inHerit lot of intersected objects to children
This is used to store the location of the 6 neighbors for leaf nodes and the first child for virtual nodes at linkpos(1).
1: neighbor x-1 / first child node 2: neighbor x+1 3: neighbor y-1 4: neighbor y+1 5: neighbor z-1 6: neighbor z+1
If subelement resolution is required, the sublevel keeps track of how deep the subelement resolution is below the target element.
For nodes above isTarget nodes it is set to a negative value. In the target node it is set to the subelement_resolution. On each level this counter is decreased by 1, when passing it on to the children. Boundaries, that require subelement resolution will stop in refinement, when sublevel has reached 0, or if a total level of 20 is reached. If subelement_resolution is 0, this array is not used (and not allocated).