Skip to content

'Action' object has no attribute 'ufl_shape' #44

@pbrubeck

Description

@pbrubeck

I would like to create a FormSum where one of the weights is an instance of action.

from firedrake import *

mesh = UnitIntervalMesh(2)

V = FunctionSpace(mesh, "CG", 1)
b = Cofunction(V.dual())
u = Function(V)
f = action(b, u) * b

assemble(f)

I get the following error message:

Traceback (most recent call last):
  File "/home/pbrubeck/git/dphil_thesis/static_condensation/snippets/bug_action.py", line 8, in <module>
    f = action(b, u) * b
  File "/home/pbrubeck/firedrake-dev-20221228-mpich/src/ufl/ufl/form.py", line 186, in __rmul__
    if is_scalar_constant_expression(scalar):
  File "/home/pbrubeck/firedrake-dev-20221228-mpich/src/ufl/ufl/checks.py", line 73, in is_scalar_constant_expression
    if expr.ufl_shape:
AttributeError: 'Action' object has no attribute 'ufl_shape'

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