aboutsummaryrefslogtreecommitdiff
path: root/symbolic
diff options
context:
space:
mode:
Diffstat (limited to 'symbolic')
-rw-r--r--symbolic/D3Q27.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/symbolic/D3Q27.py b/symbolic/D3Q27.py
new file mode 100644
index 0000000..6a81de5
--- /dev/null
+++ b/symbolic/D3Q27.py
@@ -0,0 +1,18 @@
+from sympy import *
+
+q = 27
+d = 3
+
+c = [ Matrix(x) for x in [
+ (-1, 1, 1), ( 0, 1, 1), ( 1, 1, 1), (-1, 0, 1), ( 0, 0, 1), ( 1, 0, 1), (-1,-1, 1), ( 0, -1, 1), ( 1, -1, 1),
+ (-1, 1, 0), ( 0, 1, 0), ( 1, 1, 0), (-1, 0, 0), ( 0, 0, 0), ( 1, 0, 0), (-1,-1, 0), ( 0, -1, 0), ( 1, -1, 0),
+ (-1, 1,-1), ( 0, 1,-1), ( 1, 1,-1), (-1, 0,-1), ( 0, 0,-1), ( 1, 0,-1), (-1,-1,-1), ( 0, -1,-1), ( 1, -1,-1)
+]]
+
+w = [Rational(*x) for x in [
+ (1, 216), (1,54), (1,216), (1,54), (2,27), (1,54), (1,216), (1,54), (1,216),
+ (1, 54), (2,27), (1, 54), (2,27), (8,27), (2,27), (1, 54), (2,27), (1, 54),
+ (1, 216), (1,54), (1,216), (1,54), (2,27), (1,54), (1,216), (1,54), (1,216)
+]]
+
+c_s = sqrt(Rational(1,3))