Welcome ![]()
Please read Read before posting: How do I get my question answered?. In particular, itโs very difficult for us to comment based on a 4 line snippet of the code.
You may also want to go back to the basics before you try using FEniCS on your actual problem. A possible place to start is The FEniCSx tutorial โ FEniCSx tutorial , which has been linked several times in this forum.