I am aware this is a nonlinearity. In fact, I was following the tutorial âSolving PDEs in Python â The FEniCS Tutorial Volume Iâ, by HP Langtangen and A. Logg, particularly the section 3.2 (page 46) where they do implement a Nonlinear Poisson equation by using a variational formulation. Their code, which can be downladed from
But their code wonât run and issue the error
AttributeError: âdolfin.cpp.la.PETScVectorâ object has no attribute âarrayâ.
I wonder if this is because that code is fenics legacy and my installation is not.
Thank you for your quick response and useful link. It does compile now.
I still do not know how to implement my positive part function. I am aware I have a lot to learn.
Can you reference a tutorial of the likes of that of Langtangen and Logg but updated to dolfinx?