Architecture



The main interface gives the user a broad overview of the program in addition to a choice of running a homogeneous or a heterogeneous simulation. Both options will go similar screens. For a heterogeneous simulation, you can create your own initial patterns.

In the heterogeneous parameter input screen, the user may change the default parameter values and select a self-created pattern file and/or parameter file they would like to use in the simulations. In addition, the user can change the size of the simulation square. When the user starts the simulation, the class BitmapConverter is called. This class reads the hex numbers (colors) from the picture file and creates an array storing the corresponding concentrations (e.g. white color (0x000000) implies C = 0). After this process, the simulation screen is called. This is where the concentrations are displayed. Here the user may choose to change the time step, the number of time steps to calculate before displaying an image, and the temperature.

The homogeneous parameter input screen is very similar except that the user does not have to input a pattern file. In addition, the class BitmapConverter is bypassed since there aren’t any pattern files to read.

All of the calculations are done in the class FFTandCalc.

There is one more class called Parameters. This class stores all of the parameters from the input screen. This prevents transferring large amounts of data between classes and reduces the amount of clatter, making the program more organized and easier to debug.

This software is written in C# because the syntax is similar to Java but is a better language for intense computations. The following is a diagram of the architecture of our software.

Diagram