diff options
Diffstat (limited to 'symbolic/D2Q9.py')
-rw-r--r-- | symbolic/D2Q9.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/symbolic/D2Q9.py b/symbolic/D2Q9.py index 9693477..e3ac9de 100644 --- a/symbolic/D2Q9.py +++ b/symbolic/D2Q9.py @@ -1,6 +1,7 @@ -from sympy import * +from sympy import Matrix +from itertools import product -q = 9 d = 2 +q = 9 -c = [ Matrix(x) for x in [(-1, 1), ( 0, 1), ( 1, 1), (-1, 0), ( 0, 0), ( 1, 0), (-1,-1), ( 0, -1), ( 1, -1)] ] +c = [ Matrix(x) for x in product([-1,0,1], repeat=d) ] |