Due to a key rollover of our WebSSO provider there might be a short downtime of this Gitlab server on Friday, November 2.

Commit 66467409 authored by Martin Bauer's avatar Martin Bauer

Merge branch 'fvm' into 'master'

Fix FiniteDifferenceStaggeredStencilDerivation on Sympy 1.1

See merge request pycodegen/pystencils!105
parents ed864c0e 5790e28d
Pipeline #20388 passed with stage
in 3 minutes and 57 seconds
......@@ -306,7 +306,7 @@ class FiniteDifferenceStaggeredStencilDerivation:
center = [tuple(p + pos) for p in points].index((0, 0, 0)[:dim])
best = [b for b in best if b[center] != 0]
if len(best) > 1: # if there are still multiple, they are equivalent, so we average
weights = sp.Add(*[sp.Matrix(b) for b in best]) / len(best)
weights = [sum([b[i] for b in best]) / len(best) for i in range(len(weights))]
weights = best[0]
assert weights
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment