Problem with the definition of Diriclet conditions

I have this mesh :

from dolfin import *
from fenics import *
import matplotlib.pyplot as plt

#mesh

Y=0.5

X=0.5

nx2=60

ny2=60

mesh2 = RectangleMesh(Point(-0.5, -0.5), Point(X, Y), nx2, ny2, diagonal=“left”)

plt.figure(1)

plot(mesh2)

I want to solve an equation with the Diriclet conditions at the boundary.
So on all 4 sides my function must be zero, how do I do that?
Thank you

Hi, I would suggest you have a look at the documentation, see for instance: Poisson equation — DOLFIN documentation

It works ! thank you !