wiki:DataStructures

Version 4 (modified by trac, 12 years ago) ( diff )

How The Structures Work


The basic data structure used throughout the BearCLAW application is the Node. Each Node represents a grid within the AMR mesh that BearCLAW assembles to solve problems. The grid data for each node is contained in a NodeInfo structure referenced via pointer, thereby keeping the actual data decoupled from the algorithm.

Nodes are assembled into a collection of tree-like structures called a forest. The Forest starts with a single node called a ForestSeed. This node anchors the root nodes, which represent the grids with the coarsest resolution.

It should be noted at this point that this structure differs substantially from a classic tree structure in several ways. In a tree each parent has pointers to all its children, and there are no links between nodes of similar depths. Siblings are linked like a list, and each parent only points to its eldest child. Furthermore, the eldest children often have links to nodes of a similar level, but with different parents. The resulting structure more resembles a series of nested linked lists than a continuously-branching tree.

A series of Powerpoint slides containing a graphical representation of the Node and Forest structures can be found here.

Note: See TracWiki for help on using the wiki.