project function should collapse subspaces

Bug #907745 reported by Garth Wells
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Confirmed
Undecided
Unassigned

Bug Description

The below code throws an error because Functions cannot be created used subspaces (views). It should be fixable if project checks if the FunctionSpace is a subspace, and if so collapses it.

from dolfin import *
mesh=UnitSquare(10, 10)
U = FunctionSpace(mesh, "CG", 1)
V = FunctionSpace(mesh, "CG", 1)
W=U*V
f1=Function(W.sub(0))
f1.vector()[:]=1.0
f2=project(f1, W.sub(1))

Johannes Ring (johannr)
Changed in dolfin:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.