Commit 84bfe3ac authored by Markus Holzer's avatar Markus Holzer
Browse files

Fail checks for shift matrix

parent 957923e3
Pipeline #33619 failed with stages
in 11 minutes and 14 seconds
......@@ -454,7 +454,13 @@ def set_up_shift_matrix(moments, stencil, velocity_symbols=sp.symbols("u_:3")):
M = moment_matrix(moments, stencil, shift_velocity=None)
MN = moment_matrix(moments, stencil, shift_velocity=velocity_symbols)
return sp.simplify(MN * M.inv())
N = sp.simplify(MN * M.inv())
assert N.is_lower, "Calculating the shift matrix gave not a lower diagonal matrix. Thus it failed"
assert sum(N.diagonal()) == len(stencil), "Calculating the shift matrix failed. " \
"There are entries on the diagonal which are not equal to one"
return N
def gram_schmidt(moments, stencil, weights=None):
Supports Markdown
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