Hello, I'm trying to set a function to zero everyone except on the mesh boundary. I have come up with this code:
from dolfin import * mesh = UnitCubeMesh(16, 16, 16) bmesh = BoundaryMesh(mesh, 'exterior') boundary_points = bmesh.entity_map(0).array() V = FunctionSpace(mesh, 'Lagrange', 1) g = Function(V) g.vector()[boundary_points] = 1 plot(g, mesh, interactive=True) However, when looking at the plot, only about half the boundary cells seem colored. What am I doing wrong? Thanks, Nikolaus _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
