Skip to content

Commit

Permalink
Update type check to get shape in replace
Browse files Browse the repository at this point in the history
  • Loading branch information
nbouziani committed May 2, 2024
1 parent fbd288e commit ca024f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ufl/algorithms/replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from ufl.algorithms.analysis import has_exact_type
from ufl.algorithms.map_integrands import map_integrand_dags
from ufl.classes import CoefficientDerivative, Form
from ufl.classes import CoefficientDerivative, BaseForm
from ufl.constantvalue import as_ufl
from ufl.core.external_operator import ExternalOperator
from ufl.core.interpolate import Interpolate
Expand All @@ -28,7 +28,7 @@ def __init__(self, mapping):
# One can replace Coarguments by 1-Forms
def get_shape(x):
"""Get the shape of an object."""
if isinstance(x, Form):
if isinstance(x, BaseForm):
return x.arguments()[0].ufl_shape
return x.ufl_shape

Expand Down

0 comments on commit ca024f6

Please sign in to comment.