This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Cell volume function in Poisson's equation

+1 vote

What is the difference between these two forms?

cell_volume = CellVolume(mesh)
F1 = inner((1 + u**2)*grad(u)*cell_volume, grad(v))*dx - cell_volume*f*v*dx

and

F2 = inner((1 + u**2)*grad(u), grad(v))*dx - f*v*dx

They give solutions u close to each other (please see demo_nonlinear_poisson.py) but the grad(u) have slightly different values. I am trying to understand what F1 means when compared to F2 in terms of discretization.

asked Jan 8, 2014 by chaffra FEniCS User (1,830 points)
edited Jan 8, 2014 by chaffra

I suspect the Newton solver takes different paths to the solution because the derivative is calculated differently. Try to decrease the relative_tolerance (to e.g. 1e-12).

Maybe it could be some projection of cell_volume (a DG0 function) to the solution space (CG1)?

...