Hello everyone,
I define a Function object of c to store the solution after each finite element step. The code is as below
mesh = RectangleMesh(Point(0,0), Point(20,20), 20, 20) V = FunctionSpace(mesh, "CG", 1) c = Function(V, name="Concentration")
After I obtain the solution c, I then want to use abs() command to make sure that all value in c is non-negative. However, when I use the following command to check the minimum value in c, it is negative with very large magnitude.
c_.assign(project(abs(c), V)) print(" min abs(c):", c_.vector().get_local().min())
My question is what is wrong here and what should I do if I want to get non-negative c?
Thanks!