Skip to content

Commit

Permalink
Add missing linear operators to ArgumentDependencyExtractor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Sandve Alnæs committed May 20, 2015
1 parent 448ca2c commit 873194a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ufl/algorithms/argument_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def __init__(self):
Transformer.__init__(self)
self._empty = frozenset()

def expr(self, o, *opdeps):
"Default for nonterminals: nonlinear in all operands."
def operator(self, o, *opdeps):
"Default for Operators: nonlinear in all operands."
for d in opdeps:
if d:
raise NotMultiLinearException(repr(o))
Expand All @@ -64,12 +64,18 @@ def argument(self, o):
def linear(self, o, a):
"Nonterminals that are linear with a single argument."
return a
nabla_grad = linear
nabla_div = linear
grad = linear
div = linear
curl = linear
reference_grad = linear
reference_div = linear
reference_curl = linear
transposed = linear
trace = linear
skew = linear
sym = linear
positive_restricted = linear
negative_restricted = linear
cell_avg = linear
Expand Down

0 comments on commit 873194a

Please sign in to comment.