Skip to content

Commit

Permalink
[tests.riccati] test only with CSC format
Browse files Browse the repository at this point in the history
  • Loading branch information
pmli committed Nov 5, 2017
1 parent 163f8cf commit 3885be2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pymortests/riccati.py
Expand Up @@ -31,19 +31,19 @@ def diff_conv_1d_fd(n, a, b):
diagonals = [-a * 2 * (n + 1) ** 2 * np.ones((n,)),
(a * (n + 1) ** 2 + b * (n + 1) / 2) * np.ones((n - 1,)),
(a * (n + 1) ** 2 - b * (n + 1) / 2) * np.ones((n - 1,))]
A = sps.diags(diagonals, [0, -1, 1])
A = sps.diags(diagonals, [0, -1, 1], format='csc')
return A


def diff_conv_1d_fem(n, a, b):
diagonals = [-a * 2 * (n + 1) ** 2 * np.ones((n,)),
(a * (n + 1) ** 2 + b * (n + 1) / 2) * np.ones((n - 1,)),
(a * (n + 1) ** 2 - b * (n + 1) / 2) * np.ones((n - 1,))]
A = sps.diags(diagonals, [0, -1, 1])
A = sps.diags(diagonals, [0, -1, 1], format='csc')
diagonals = [2 / 3 * np.ones((n,)),
1 / 6 * np.ones((n - 1,)),
1 / 6 * np.ones((n - 1,))]
E = sps.diags(diagonals, [0, -1, 1])
E = sps.diags(diagonals, [0, -1, 1], format='csc')
return A, E


Expand Down

0 comments on commit 3885be2

Please sign in to comment.