A ``greedy algorithm'' was used to perform coloring: first all nodes are assigned the ``color'' (or label) zero. This means that it has no color. Then, for each and every node, a check is made to see what nodes are its neighbors, and for those neighboring nodes, a check is made to see what are their colors/labels. The node in question is assigned the smallest color (label) number which is ``not taken''. If that is not available, it is assigned the next lowest label/number after all the labels are checked. To find the neighbors of a node, a linked list is created where for every node in the connectivity (t vector), all the nodes in that element are placed in the linked list (while checking for duplicates). The entire procedure is described below:
The above procedure was done and the new stiffness matrices were obtained. Cases were run with meshes containing, about 500, 25,000, 550,000, and 1,500,000 nodes. The re-ordered stiffness matrices for 500 nodes is shown in figure 4. For the 1.5 million node case, the computer ran out of RAM. This algorithm was written to parallelize the solver, it algorithm itself has not been parallelized, part of the reason being that any gains in speed look to be offset by the large amount of communication required here. The time for the code to run is about 2-3 seconds for the 25,000 node case and about 20 seconds for the 550,000 node case.
|