The problem is that your source f
is not a point source, but a constant everywhere.
If you follow Pointsource on specific points python, you should do the following (I’ve set Y=1
):
bc_point = DirichletBC(V,Constant(1.0),"near(x[0],0)&&near(x[1],1)&&near(x[2],0)","pointwise")
f = Function(V)
bc_point.apply(f.vector())
You can plot f
to now verify that it is indeed a point source.