Hi, I have added a part (as per the advection-diffusion demo) to my code to alleviate numerical instability. Yet I get this error message which I can't figure out where it relates to. Could you please help? Many thanks,
(parts of the error message have been deleted to fit the space)
Product can only represent products of scalars.
FAILURE in reuse_if_possible: type(o) = <class 'ufl.algebra.Product'> operands =
w_{10}
-0.0864 + -0.1728 + 0.864 * w_2 / (0.0025 + w_2)
<class 'ufl.algebra.Product'> ; (sum_{i_{20}} ((w_5)[i_{20}]) * (({ A
<class 'ufl.algebra.Sum'> ; 0.02 * (-1 * (v_{-1} * (-0.0864 + -0.1728
Traceback (most recent call last): File "s13.py", line 240, in <module>
F = action(F, S) File "C:\FEniCS\lib\site-packages\ufl\formoperators.py", line 100,
return compute_form_action(form, coefficient) File "C:\FEniCS\lib\site-packages\ufl\algorithms\formtransformation 389, in compute_form_action
return replace(form, { u: coefficient }) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in replace
return apply_transformer(e, Replacer(mapping2)) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in apply_transformer
return transform_integrands(e, _transform) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in transform_integrands
integrand = transform(itg.integrand()) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in
_transform
return transformer.visit(expr) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in visit
r = h(o, *map(self.visit, o.operands())) File "C:\FEniCS\lib\site-packages\ufl\algorithms\transformations.py , in reuse_if_possible
r = o.reconstruct(*operands) File "C:\FEniCS\lib\site-packages\ufl\expr.py", line 214, in recons
return self.__class__._uflclass(*operands) File "C:\FEniCS\lib\site-packages\ufl\algebra.py", line 177, in __n
error("Product can only represent products of scalars.") File "C:\FEniCS\lib\site-packages\ufl\log.py", line 148, in error
raise self._exception_type(self._format_raw(*message)) ufl.log.UFLException: Product can only represent products of scalars.