FunctionAXPY with sub function should be possible

Issue #687 resolved
Chaffra Affouda created an issue

The example below fails because the subfunctions are not on the same FunctionSpace. The old formulation MixedFunctionSpace([Q,Q,Q]) kept the same underlying subspace but this information is lost with the new formulation. This is incovenient when using the subfunctions iteratively in a NewtonSolver for example.

mesh = UnitIntervalMesh(10)
Q = FunctionSpace(mesh,'CG',1)
mixed_element = ufl.MixedElement([Q.ufl_element()]*3)
Q3 = FunctionSpace(mesh,mixed_element)

u_mixed = Function (Q3)
u1, u2, u3 = u_mixed.split(deepcopy=False)

#this fails because the sub function are not on the same function_space
u_comb = FunctionAXPY([(1.0,u1),(2.0,u2),(3.0,u3)])

Comments (4)

  1. Jan Blechta

    @chaffra The above code does not fail any more. Could you provide a failing example or confirm the this is not an issue?

  2. Log in to comment