def MixedToMixedFunctionCopySubComponentToDifferentLocation(V): u = Function(V) assign(u.sub(0), project(Constant((1., 2.)), V.sub(0).collapse())) assign(u.sub(1), project(Constant((3., 4.)), V.sub(1).collapse())) return u
def MixedFunctionRestrictionToSubElementSolveAmbiguityWithComponents(V): up = Function(V) assign(up.sub(0).sub(0), project(Constant(1.), V.sub(0).sub(0).collapse())) assign(up.sub(0).sub(1), project(Constant(3.), V.sub(0).sub(1).collapse())) assign(up.sub(1), project(Constant(2.), V.sub(1).collapse())) return up
def MixedToMixedFunctionCopyComponentToSameLocation(V): u = Function(V) assign(u.sub(0), project(Constant(1.), V.sub(0).collapse())) assign(u.sub(1), project(Constant(2.), V.sub(1).collapse())) return u
def MixedFunctionRestrictionAmbiguous(V): up = Function(V) assign(up.sub(0), project(Constant((1., 1.)), V.sub(0).collapse())) assign(up.sub(1), project(Constant(2.), V.sub(1).collapse())) return up