Non-homogeneous Dirichlet BC at a point

Dear All,
can we impose a non-homogeneous Dirichlet boundary condition at a point in a square domain?

Ex:
u_xx + u_yy = f(x, y) over a square

AB, BC, CD, and DA are four boundaries of a square.

So, how to impose, u(A) = non-zero value in FreeFEM

Thanks!!!

1 Like

As far as I know, this cannot be done using the on() function. However, when solving a linear system, Ax=b you can always lock a DOF to a value by setting a row of the matrix A to all zeros except for a one at the point corresponding your DOF of interest. Then set the corresponding DOF in b to the desired value of the Dirichlet condition.

2 Likes

Thanks @cmd. This makes sense. I’ll implement it further.