dokken
3
You are taking the first sub-space of the mixed element, which is V
, not V.sub(0)
You can check this by printing ME.element.num_sub_elements
, which gives you 5
, not 6
.
Thus, you would have to change:
To
ME0y, _ = ME.sub(0).sub(1).collapse()
bottom_value2 = fem.Function(ME0y)
bottom_value2.x.array[:]= 0
right_corner_vertex = mesh.locate_entities_boundary(msh,0,right_corner)
right_dof = fem.locate_dofs_topological ((ME.sub(0).sub(1),ME0y),0,right_corner_vertex)
bc_right_corner = fem.dirichletbc(bottom_value2, right_dof, ME.sub(0).sub(1))