Skip to content

Commit

Permalink
DerivativeRuleDispatcher: Add handler for base form coordinate deriva…
Browse files Browse the repository at this point in the history
…tives
  • Loading branch information
nbouziani committed Jul 18, 2023
1 parent fce0461 commit 330438d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ufl/algorithms/apply_derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ufl.core.terminal import Terminal
from ufl.corealg.map_dag import map_expr_dag
from ufl.corealg.multifunction import MultiFunction
from ufl.differentiation import CoordinateDerivative
from ufl.differentiation import CoordinateDerivative, BaseFormCoordinateDerivative
from ufl.domain import extract_unique_domain
from ufl.operators import (bessel_I, bessel_J, bessel_K, bessel_Y, cell_avg,
conditional, cos, cosh, exp, facet_avg, ln, sign,
Expand Down Expand Up @@ -1115,6 +1115,14 @@ def coordinate_derivative(self, o, f, dummy_w, dummy_v, dummy_cd):
rcache=self.rcaches[key]),
o_[1], o_[2], o_[3])

def base_form_coordinate_derivative(self, o, f, dummy_w, dummy_v, dummy_cd):
o_ = o.ufl_operands
key = (BaseFormCoordinateDerivative, o_[0])
return BaseFormCoordinateDerivative(map_expr_dag(self, o_[0],
vcache=self.vcaches[key],
rcache=self.rcaches[key]),
o_[1], o_[2], o_[3])

def indexed(self, o, Ap, ii): # TODO: (Partially) duplicated in generic rules
# Reuse if untouched
if Ap is o.ufl_operands[0]:
Expand Down

0 comments on commit 330438d

Please sign in to comment.