- edited description
Function.sub(0, deepcopy=True) loses constrained_domain information
Issue #405
new
When extracting a function from a mixed function which lives on a function space with a constrained_domain, the information of the constrained_domain is lost. See the following example:
#!/usr/bin/env python
from dolfin import *
class PeriodicBoundary(SubDomain):
"Subdomain for periodic boundary condition"
def inside(self, x, on_boundary):
return bool(near(x[0], 0))
def map(self, x, y):
y[0] = x[0] - 1.0
mesh = IntervalMesh(20, 0.0, 1.0)
V = FunctionSpace(mesh, "CG", 1, constrained_domain=PeriodicBoundary())
W = V * V
w = Function(W)
v = w.sub(0, deepcopy=True)
print(V.dim())
print(v.function_space().dim())
Comments (9)
-
reporter -
reporter - edited description
-
- changed milestone to 1.6
-
reporter For those affected: Note, that this regression from 1.4 can be worked around with:
v = Function(V) assign(v, w.sub(0))
-
Issue
#462was marked as a duplicate of this issue. -
Issue
#510was marked as a duplicate of this issue. -
- changed milestone to 1.7
-
- removed milestone
Removing milestone: 1.7 (automated comment)
-
This may be redundant with some upcoming changes to how we handle periodic meshes.
- Log in to comment