Skip to content

Commit 2b75318

Browse files
author
Daniel Ruprecht
committed
some more comments
1 parent 3ae0641 commit 2b75318

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_imexsweeper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_maysweepupdate(self):
217217
u0full = np.array([ level.u[l].values.flatten() for l in range(1,nnodes+1) ])
218218

219219
# Perform K node-to-node SDC sweep
220-
K = 1 + np.random.randint(4)
220+
K = 1 + np.random.randint(6)
221221
for i in range(0,K):
222222
level.sweep.update_nodes()
223223
# Fetch final value
@@ -232,5 +232,6 @@ def test_maysweepupdate(self):
232232
Mat_sweep = Mat_sweep + np.linalg.matrix_power(Pinv.dot(RHS),i).dot(Pinv)
233233
# Now build update function
234234
update = 1.0 + (problem.lambda_s[0] + problem.lambda_f[0])*level.sweep.coll.weights.dot(Mat_sweep.dot(np.ones(nnodes)))
235+
# Multiply u0 by value of update function to get end value directly
235236
uend_matrix = update*self.pparams['u0']
236237
assert abs(uend_matrix - uend_sweep)<1e-14, "Node-to-node sweep plus update yields different result than update function computed through K-sweep matrix"

0 commit comments

Comments
 (0)