Failing convergence in nonlinear solve
Reported by Gabriel Balaban
#!/usr/bin/env python
from dolfin import *
#Turn this on or off to make the Newton solver converge / diverge.
parameters["form_compiler"]["representation"] = "uflacs"
m = UnitSquareMesh(2,2)
V = VectorFunctionSpace(m, "CG",1)
u = Function(V)
v = TestFunction(V)
F = inner(grad(u),grad(v))*dx + inner(as_vector((0.001,0)),v)*dx
solve(F == 0, u)
Comments (5)
-
reporter -
reporter Set representation to "quadrature" and you get the same result.
But is this really supposed to converge? I found that assembling F with u= a large constant gives slightly different results for tensor representation, but F only depends on the gradient of u so that is a bug in tensor representation (probably a rounding issue).
I'm thinking this is an ill posed system and the rounding error in tensor representation in ffc happens to make it converge.
-
reporter - changed status to invalid
matrix/vector is the same, ill posed test problem just happens to converge for tensor representation because of rounding error there.
-
Problem is missing boundary conditions, which is why it's ill-posed.
-
Missing BC and strange roundoff error sounds correct. Thanks for clearing that one up :-).
- Log in to comment
This is weird, considering that assemble(F) and assemble(derivative(F,u)) returns exactly the same vector and matrix with standard ffc and uflacs.