This repo has simple implementations of classical diffusion equation and spinodal decomposition solvers in C. For examples implemented in MATLAB, check out this repo
I have learned a lot looking at other people's code. I am posting my code here so that somebody starting out could use this as a template to build upon or to tinker around to understand what is happening.
Use the following commands in your terminal:
git clone git@github.com:jitinnair1/hello-again-phasefield.git
cd hello-again-phasefield && mkdir build && cd build
cmake ..
make
Once the project is built, you will find the excutables under the bin
folder. To run the executable use ./
followed by the name of the executable like:
./diffusion_eqn_explicit
This will generate an output folder with .vtk
files which can be opened using ParaView
This code was written at a time when I had just started learning C. So this code is not optimised for performance. Please create an issue if you encountered errors or unexpected behavior.