Skip to content

Commit 3d41c50

Browse files
author
Daniel Ruprecht
committed
order check for partial quadrature rules now running
1 parent 0864f27 commit 3d41c50

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_collocation.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,15 @@ def test_3(self):
6161
for type in classes:
6262
for M in range(type[1],type[2]+1):
6363
coll = getattr(pySDC.CollocationClasses, type[0])(M, t_start, t_end)
64-
Q = coll.Qmat
65-
Q = Q[1:,1:]
64+
Q = coll.Qmat[1:,1:]
6665
# as in TEST 1, create and integrate a polynomial with random coefficients, but now of degree M-1
6766
poly_coeff = np.random.rand(M-1)
6867
poly_vals = np.polyval(poly_coeff, coll.nodes)
6968
poly_int_coeff = np.polyint(poly_coeff)
70-
#print Q
7169
for i in range(0,M):
7270
int_ex = np.polyval(poly_int_coeff, coll.nodes[i]) - np.polyval(poly_int_coeff, t_start)
73-
print np.shape(Q)
74-
#int_coll = np.dot(poly_vals, Q[i,:])
71+
int_coll = np.dot(poly_vals, Q[i,:])
72+
assert abs(int_ex - int_coll)<1e-10, "For node type " + type[0] + ", partial quadrature rule failed to integrate polynomial of degree M-1 exactly for M = " + str(M)
7573

7674
# TEST 4:
7775
# Check that the quadrature rules for [tau_m, tau_m+1] defined by Smat have order equal to number of nodes M

0 commit comments

Comments
 (0)