Skip to content

[BUG]: demo_elascity not working #3759

Open
@QuentinoRMIT

Description

@QuentinoRMIT

Summarize the issue

HI, I just downloaded the demo_elasticty.py, but when I try to runit I get the error

"
Traceback (most recent call last):
File "/home/ec2-user/Documents/PYTHON/FENICSX/TUTOS/ELASTICITY/demo_elasticity.py", line 183, in
apply_lifting(b, [a], bcs=bc)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/ec2-user/anaconda3/envs/fenicsx-env/lib/python3.13/site-packages/dolfinx/fem/petsc.py", line 672, in apply_lifting
_assemble.apply_lifting(b_local.array_w, a, bcs, x0_r, alpha, constants, coeffs)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ec2-user/anaconda3/envs/fenicsx-env/lib/python3.13/site-packages/dolfinx/fem/assemble.py", line 347, in apply_lifting
_bcs = [[bc._cpp_object for bc in bcs0] for bcs0 in bcs]
^^^
TypeError: 'DirichletBC' object is not iterable
"

what could I have doe wrong ?

thanks,

Quentin

How to reproduce the bug

I ran demo_elasticity.py

Minimal Example (Python)

Output (Python)

Version

main branch

DOLFINx git commit

No response

Installation

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions