Custom Values in Dirichlet BCs, solving Poisson

Hello,
I am extremely green in this forum and in FeNiCS in general. I am trying to solve a 3D Poisson equation for certain Dirichlet BCs. I managed to solve such problems easily in the past while knowing the expression of the BC.
But now i dont have an expression or even something close to it. I just have some coordinates and the values in those coordinates. Note that all those coordinates are in the boundary of the domain. Can i manually enter them somehow ? I simply have an array of the coordinates, that corespond to a list with the solutions(although i can modify this data as i please).
If this is too easy a question, which it probably is, please, at least, kindly refer me to an example in the forum or the guide.
Thank you for your help

1 Like

There are quite a few ways to do this. One approach would be to match the input coordinates with the degree of freedom and the insert values at these indices.
You can obtain the dof coordinates using V.tabulate_dof_coordinates().
Then you should match the indices of these coordinates with your input indices, and insert them into a corresponding function.
For the insertion into the function see: Assign nodal values in parallel - #2 by nate and the following posts.