First of all, you are missing one thing, which is that in DirichletBC
in the other post, the argument pointwise
is used.
Secondly,
You can inspect your Dirichlet conditions with the following:
bc1= DirichletBC(V, c, point3, method="pointwise")
bc21 = DirichletBC(V.sub(0), Constant(0.0), point2, method="pointwise")
bc22 = DirichletBC(V.sub(1), Constant(0.0), point2, method="pointwise")
bc3 = DirichletBC(V.sub(0), Constant(0.0), point1, method="pointwise")
bcr = DirichletBC(V, r, right)
u_ = Function(V)
u_.vector()[:] = 0.5
bcs = [bc1,bc21,bc22,bc3,bcr]
[bc.apply(u_.vector()) for bc in bcs]
File("u.pvd") <<u_
and inspect u.pvd
in for instance paraview (I suggest using the point visualization there).
If you use the modified BCs, I get a result by using for instance a 4x4x4 cube.
Displaced mesh is showed below:
To me, it seems you have not gotten your elasticity parameters right.