Second point, I cannot even find the dolfinx.fem.bcs.DirichletBC class. In Dolfinx Docs I see the dolfinx.fem.dirichletbc ` function, classes such as dolfinx.cpp.fem.DirichletBC_float32, a MetaClass dolfinx.fem.DirichletBCMetaClass. so I am stuck, thanks for any hint.
This is very helpful thanks. I do hate to nag such helpful fellows, but can I re-iterate the second part of my problem above, about the dolfinx.fem.bcs.DirichletBC class.
I know this class exists as is the output of
There are issues immediately in the first class definition def __init__(self, F: ufl.form.Form, J: ufl.form.Form, u: dolfinx.Function, bcs: List[dolfinx.DirichletBC]):
This class set up structures for solving a non-linear problem using Newton’s method. module 'dolfinx' has no attribute 'Function'
I modify to dolfinx.fem.Function but the next problem is
module 'dolfinx' has no attribute 'DirichletBC'
I tried hence to modify dolfinx.DirichletBC in the class _init function definition to dolfinx.fem.bcs. DirichletBC
but get same some error module 'dolfinx.fem.bcs' has no attribute 'DirichletBC'
I tried out of desperation to add .cpp in various combos. Without even finding it on the docs it is difficult. The notebook is from 2021 I think.
Thanks. So I guess this happened on Dolfinx 0.0.7.
I am using Dolfinx 0.0.6, and it seems to me that a class
still existed, as it is the output of type called on a dirichlet boundary condition. `` bc = fem.dirichletbc(PETSc.ScalarType(0.), node_1, V) type(bc) ``
on my notebook right now.
I should then be able to use when modifyng the module I mentioned above, no?
Why do I get the error `` module 'dolfinx.fem.bcs' has no attribute 'DirichletBC' ``
I understand those notebooks are outdated but should still be possible to sort them out, or have the changes been very dramatic?
Thank you so much I appreciate I am being a tad dense here.
Well I say the class dolfinx.fem.bcs.DirichletBC exists as it is the output of the type issues with a bc as argument
bc = fem.dirichletbc(PETSc.ScalarType(0.), node_1, V)
and I get dolfinx.fem.bcs.DirichletBC, the class the object belongs to.
Now I worry I have not got Dolfinx 6.0.0, I cannot even find it in conda list in the conda environment where I installed it, via conda forge. dolfinx -v or dolfinx -version do not work.
But the point remains, if in my version a dolfinx.fem.bcs.DirichletBC class exists, why do I get an error