- removed milestone
Subdofmap of restricted VectorFunctionSpace not restricted
Issue #79
new
See https://bitbucket.org/fenics-project/dolfin/issue/444. I'm not sufficiently knowledgeable about ffc to say this is definitively a bug in ffc, but I think this may be the problem.
Comments (7)
-
-
- changed component to finite-elements
-
I guess you are aware of the 'work-around' by constructing the restricted Vector/TensorFunctionSpace from the ufl_elements? Consider the following minimal example:
from dolfin import * k = 4; nx = 5; ny = 5; mesh = UnitSquareMesh(nx,ny) # Building functions space from ufl element, works perfect Qbard = VectorElement("CG", mesh.ufl_cell(), k) Qbar = RestrictedElement(Qbard, 'facet') # Following approach returns the error (issue #444) #Qbar2 = VectorFunctionSpace(mesh,'CG', k,restriction = 'facet')
-
Does not help:
from dolfin import * mesh = UnitSquareMesh(3, 3) e = VectorElement("P", mesh.ufl_cell(), 3)['facet'] FunctionSpace(mesh, e)
suffers from the same problem.
-
Indeed, it however seems to work for a mixed function space:
from dolfin import * k = 3; mesh = UnitSquareMesh(3,3) ## Building mixed function V = VectorElement("DG", mesh.ufl_cell(), k) Vbar = VectorElement("CG", mesh.ufl_cell(), k)['facet'] mixed = FunctionSpace(mesh, MixedElement([V,Vbar])) # Just check if we get expected nr of dofs dofmapVbar = mixed.sub(1).dofmap() cell2dofVbar = [ [dof for dof in dofmapVbar.cell_dofs(cell)] \ for cell in range(mesh.num_cells())] print 'Facet dofs cell 0', cell2dofVbar[0]
Can you confirm that?
-
Yes, but how does it workaround the original problem?
-
Formally, it is not a workaround to the original issue. However, in practice I guess (correct me if I am wrong) facet function spaces generally occur in mixed problems (e.g. HDG type approaches).
- Log in to comment
Removing milestone: 1.7 (automated comment)