Skip to content

BUG: Stokes topology optimization example (ROL) throwing an error in firedrake.adjoint #3423

@diego-hayashi

Description

@diego-hayashi

Describe the bug
The Stokes topology optimization example (ROL) from pyadjoint is throwing an an error in firedrake.adjoint.

Steps to Reproduce
Run the stokes-topology-rol-firedrake.py example from pyadjoint.

Expected behavior
It was supposed to run fine. At least the FEniCS 2019.1.0 version of this same code works fine.

Error message
The traceback is the following:

Traceback (most recent call last):
  File "stokes-topology-rol-firedrake.py", line 130, in <module>
    rho_opt = solver.solve()
              ^^^^^^^^^^^^^^
  File "/home/opt/firedrake/src/pyadjoint/pyadjoint/tape.py", line 111, in wrapper
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/opt/firedrake/src/pyadjoint/pyadjoint/optimization/rol_solver.py", line 240, in solve
    self.solver.solve()
  File "/home/opt/firedrake/src/pyadjoint/pyadjoint/optimization/rol_solver.py", line 126, in applyAdjointJacobian
    self.con.jacobian_adjoint_action(x.dat, v.dat, jv.dat[0])
  File "/home/opt/firedrake/src/pyadjoint/pyadjoint/optimization/constraints.py", line 95, in jacobian_adjoint_action
    c.jacobian_adjoint_action(m, dp[i], tmp)
  File "/home/opt/firedrake/src/firedrake/firedrake/adjoint/ufl_constraints.py", line 102, in jacobian_adjoint_action
    raise NotImplementedError("Do I need to untangle all controls?")
NotImplementedError: Do I need to untangle all controls?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions