You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that while upgrading dolfinx from 0.6.2 to 0.7.0 that there is no longer a dof_indices method for the dolfinx.fem.bcs.DirichletBC class. I couldn't find anything related in the release notes of 0.7.0.
In 0.7.0 there seems to be a single unit-test that calls the dof_indices method, but this test was removed later (in #2820).
debugging my code with dolfinx 0.6.2:
(Pdb) p bcs[0]
<dolfinx.fem.bcs.DirichletBC object at 0x72af6bee1ad0>
(Pdb) p dir(bcs[0])
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'dof_indices', 'dtype', 'function_space', 'g', 'value']
(Pdb) p bcs[0].dof_indices
<bound method PyCapsule.dof_indices of <dolfinx.fem.bcs.DirichletBC object at 0x72af6bee1ad0>>
debugging my code with dolfinx 0.7.0:
(Pdb) p bcs[0]
<dolfinx.fem.bcs.DirichletBC object at 0x7acbd3d24dd0>
(Pdb) p bcs[0].function_space
<dolfinx.cpp.fem.FunctionSpace_float64 object at 0x7acbe0ddc530>
(Pdb) p dir(bcs[0])
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_cpp_object', 'function_space', 'g']
You can see that 0.7.0 no longer has the dof_indices, dtype and value methods/attributes. Is this on purpose?
Am I missing anything?
francesco-ballarin
changed the title
[BUG]: Missing dof_indices method of DirichletBC in python
Missing dof_indices method of DirichletBC in python
Apr 23, 2024
Summarize the issue
I noticed that while upgrading dolfinx from 0.6.2 to 0.7.0 that there is no longer a
dof_indices
method for thedolfinx.fem.bcs.DirichletBC
class. I couldn't find anything related in the release notes of 0.7.0.In 0.7.0 there seems to be a single unit-test that calls the dof_indices method, but this test was removed later (in #2820).
debugging my code with dolfinx 0.6.2:
debugging my code with dolfinx 0.7.0:
You can see that 0.7.0 no longer has the
dof_indices
,dtype
andvalue
methods/attributes. Is this on purpose?Am I missing anything?
How to reproduce the bug
see script below
Minimal Example (Python)
Output (Python)
Version
0.7.0
DOLFINx git commit
No response
Installation
conda linux-64 env
Additional information
No response
The text was updated successfully, but these errors were encountered: