In the following demonstration we show some examples for the greedy graph coloring scheme. The MATLAB code used to generate these results may be downloaded here. Jump to examples:

The first example shows the coloring for a regular Quad mesh with 20 elements on a rectangular domain.

Click on the tabs titled "10 Colors, 2 Threads", "6 Colors, 4 Threads" and "4 Colors, 6 Threads" to see coloring scheme for each case.

Note that the ratio of threads (color element capacity) by number of elements, severely impacts the efficiency of the algorithm. If we consider the algorithm to be efficient when all the colors are full (same as using the fewer number of colors), then the fewer threads or the larger the mesh, the more efficient is the solution. This because the thread restriction gains more control over the coloring solution.

- 10 Colors, 2 Threads
- 6 Colors, 4 Threads
- 4 Colors, 6 Threads

The second example shows the coloring for a regular Tria mesh with 40 elements on a rectangular domain. Triangular elements commonly share nodes with more elements, thus requiring more colors (even if we keep the number of elements fixed)

Click on the tabs "20 Colors, 2 Threads", "12 Colors, 4 Threads" and "8 Colors, 6 Threads" to see coloring scheme for each case.

- 20 Colors, 2 Threads
- 12 Colors, 4 Threads
- 8 Colors, 6 Threads

The coloring does not require for the domain to have any type of structure, nor the elements to be of any certain type. It can be universally applied to domains of all shapes and sizes. In the final example we illustrate the coloring for a circular domain. A regular Tria mesh with 92 elements is used to discretize the domain.

Two cases are depicted under the tabs titled "14 Colors, 8 Threads" and "10 Colors, 16 Threads". Other cases can be generated by modifying the provided MATLAB code.

- 14 Colors, 8 Threads
- 10 Colors, 16 Threads