def inner(a, b): "UFL operator: Take the inner product of *a* and *b*. The complex conjugate of the second argument is taken." a = as_ufl(a) b = as_ufl(b) if a.ufl_shape == () and b.ufl_shape == (): return a * Conj(b) return Inner(a, b)
def inner(a, b): "UFL operator: Take the inner product of a and b." a = as_ufl(a) b = as_ufl(b) if a.shape() == () and b.shape() == (): return a * b return Inner(a, b)
def inner(a, b): "UFL operator: Take the inner product of *a* and *b*." a = as_ufl(a) b = as_ufl(b) if a.ufl_shape == () and b.ufl_shape == (): return a * b return Inner(a, b)
def _pow(self, o): if not isinstance(o, _valid_types): return NotImplemented if o == 2 and self.ufl_shape: return Inner(self, self) return Power(self, o)
def _pow(self, o): if not isinstance(o, _valid_types): return NotImplemented if self.shape() and o == 2: return Inner(self, self) return Power(self, o)