Failing convergence in nonlinear solve

Issue #22 invalid
Martin Sandve Alnæs created an issue

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)

  1. Martin Sandve Alnæs reporter

    This is weird, considering that assemble(F) and assemble(derivative(F,u)) returns exactly the same vector and matrix with standard ffc and uflacs.

  2. Martin Sandve Alnæs 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.

  3. Martin Sandve Alnæs reporter

    matrix/vector is the same, ill posed test problem just happens to converge for tensor representation because of rounding error there.

  4. Log in to comment