aboutsummaryrefslogtreecommitdiff
path: root/symbolic/D2Q9.py
blob: 22f7ed5d5cb51e0f4d4b7a2004de669bf44f96b2 (plain)
1
2
3
4
5
6
7
8
9
from sympy import *

q = 9
d = 2

c = [ Matrix(x) for x in [(-1, 1), ( 0, 1), ( 1, 1), (-1, 0), ( 0, 0), ( 1, 0), (-1,-1), ( 0, -1), ( 1, -1)] ]
w = [ Rational(*x) for x in [(1,36), (1,9), (1,36), (1,9), (4,9), (1,9), (1,36), (1,9), (1,36)] ]

c_s = sqrt(Rational(1,3))