Skip to content

Commit

Permalink
Action: get ufl_domains() from operands
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 23, 2023
1 parent 2a46a1b commit b00ba4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ufl/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ufl.differentiation import CoefficientDerivative
from ufl.form import BaseForm, Form, FormSum, ZeroBaseForm
from ufl.matrix import Matrix
from itertools import chain

# --- The Action class represents the action of a numerical object that needs
# to be computed at assembly time ---
Expand Down Expand Up @@ -121,8 +122,8 @@ def _analyze_domains(self):
"""Analyze which domains can be found in Action."""
from ufl.domain import join_domains

# Collect unique domains
self._domains = join_domains([e.ufl_domain() for e in self.ufl_operands])
# Collect domains
self._domains = join_domains(chain.from_iterable(e.ufl_domains() for e in self.ufl_operands))

def equals(self, other):
"""Check if two Actions are equal."""
Expand Down

0 comments on commit b00ba4e

Please sign in to comment.