Universität Regensburg Mathematik Allan-Cahn and Cahn-Hilliard variational inequalities solved with Optimization Techniques