What is DirichletBC().nodes ? #2451
-
This is either a bug or I don't understand what from firedrake import *
for N in [10, 50, 100]: # various mesh refinements
for p in range(1,6): # various polynomial degrees
mesh = UnitIntervalMesh(N)
V = FunctionSpace(mesh, 'CG', p)
bcs = DirichletBC(V, 0.0, "on_boundary")
print("N = %3u, p = %u, Vdim = %3u" % (N, p, V.dim()),
"bcs.nodes = ", bcs.nodes) is
After comparing the values of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Firedrake traverses the mesh entities (cells, facets, edges, vertices) and collects DoFs defined on each entity. The order of traversal is determined by Line 826 in e6e778a For instance, for N = 10 and p = 4, Firedrake collects DoFs as the following: x-o-o-o-x-o-o-o-x...x-o-o-o-x which agrees with your observation. We should note, however, that it is not guaranteed that we visit the left-most cell first. |
Beta Was this translation helpful? Give feedback.
Firedrake traverses the mesh entities (cells, facets, edges, vertices) and collects DoFs defined on each entity. The order of traversal is determined by
mesh._plex_renumbering
(firedrake/firedrake/mesh.py
Line 826 in e6e778a
For instance, for N = 10 and p = 4, Firedrake collects DoFs as the following:
x-o-o-o-x-o-o-o-x...x-o-o-o-x
3 0 1 2 4 5 6 7 8 ... 36 37 38 39 40,
which agrees with your observation. We should note, however, that it is not guaranteed that we visit the left-most cell first.