SubIndices of SubEntities
It is rather inconvenient to get the SubIndices
of an SubEntity
, this for example needed to set dirichlet boundaries.
for i in grid.boundaryIntersections:
e = i.inside
geo = e.geometry
indices = grid.indexSet.subIndices(e, 2)
for j in e.domain.subEntities((i.indexInInside, 1), 2):
A[indices[j]] *= 0
A[indices[j], indices[j]] = 1
b[indices[j]] = g(geo.corner(j))
It would be nice if there was a direct way to get the global indices of e.g. the vertices of an edge of a triangle.