Hello,
I want to get the dofs of the left part of a boundary.
- when I compute bmesh, I can not access to the dof??
I want to plot the boundary :
- If I plot bmesh, I get only one line and not the whole boundary.
Thanks by advance,
Stéphane
initialisation
from dolfin import *
mesh = UnitSquareMesh(32, 32)
V = VectorFunctionSpace(mesh, "Lagrange", 1)
Sub domain for clamp at left end
def left(x, on_boundary):
return x[0] < DOLFIN_EPS and on_boundary
Sub domain for rotation at right end
def right(x, on_boundary):
return x[0] > 1 - DOLFIN_EPS and on_boundary
Create mesh function over the cell facets
boundary_subdomains = MeshFunction("size_t", mesh, mesh.topology().dim() - 1)
boundary_subdomains.set_all(0)
AutoSubDomain(left).mark(boundary_subdomains, 1)
AutoSubDomain(right).mark(boundary_subdomains, 2)
boundary mesh
bmesh = BoundaryMesh(mesh,'exterior')
plot(bmesh)