Correct implementation of AllenCahn

Please read Read before posting: How do I get my question answered?. We cannot comment unless you post the full code.