I am very new to fenics project and was trying to run the example of Poisson equation. However in the step where we define the element space -
from dolfinx.fem import FunctionSpace
V = FunctionSpace(domain, (“Lagrange”, 1))
I am getting the error, -" FunctionSpace.init() missing 1 required positional argument: ‘cppV’ ".
I am not sure what should be this third argument and any guidance would be very helpful.
*for installation, I followed building from the source code. My dolfinix version is 0.8.0.0.
The API for functionspaces changed after the 0.7.0 release. You now need to call
dolfinx.fem.functionspace (all non-captialized), as this is the new constructor.
Yes it worked, thanks a lot. Since I am new to fenics, I was planning to follow the examples as in the documentation .examples. So are they as per the new version? What is the best way to know if the APIs have changed with respect to what is specified in the example?
I do not update the tutorial before there is an official release, so the API there is compatible with 0.7.0.
tries to keep up with the dolfinx main branch, But Ive been Busy lately, so haven’t had time to adapt it.
You can see the differences at
Thank you very much for the support. I shall check out the links.
Note that if you are new to the system, you’ll find it way easier to use the released version, not the development version (which may continue to change).
Yeah, true. I shall try to get back to the release version. Thanks a lot.