changeset 523:390901860b0a refactor/inflated_tensormapping_tests

Add some tests to test a wider range of possibilities for inflation
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 25 Nov 2020 15:04:02 +0100
parents 3968210797a9
children 41c1760a7770 78090ec3074d
files test/testLazyTensors.jl
diffstat 1 files changed, 25 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/testLazyTensors.jl	Tue Nov 24 11:05:41 2020 +0100
+++ b/test/testLazyTensors.jl	Wed Nov 25 15:04:02 2020 +0100
@@ -370,12 +370,36 @@
                 (v-> @tullio res[a,b,c,d] := Ã[c,i]*v[a,b,i,d]),
             ),
             (
+                InflatedTensorMapping(I(3,2), B, I(4)),
+                (v-> @tullio res[a,b,c,d,e] := B̃[c,d,i]*v[a,b,i,e]),
+            ),
+            (
+                InflatedTensorMapping(I(3,2), C, I(4)),
+                (v-> @tullio res[a,b,c,d] := C̃[c,i,j]*v[a,b,i,j,d]),
+            ),
+            (
                 InflatedTensorMapping(I(3,2), A),
                 (v-> @tullio res[a,b,c] := Ã[c,i]*v[a,b,i]),
             ),
             (
+                InflatedTensorMapping(I(3,2), B),
+                (v-> @tullio res[a,b,c,d] := B̃[c,d,i]*v[a,b,i]),
+            ),
+            (
+                InflatedTensorMapping(I(3,2), C),
+                (v-> @tullio res[a,b,c] := C̃[c,i,j]*v[a,b,i,j]),
+            ),
+            (
                 InflatedTensorMapping(A,I(4)),
-                (v-> @tullio res[c,d] := Ã[c,i]*v[i,d]),
+                (v-> @tullio res[a,b] := Ã[a,i]*v[i,b]),
+            ),
+            (
+                InflatedTensorMapping(B,I(4)),
+                (v-> @tullio res[a,b,c] := B̃[a,b,i]*v[i,c]),
+            ),
+            (
+                InflatedTensorMapping(C,I(4)),
+                (v-> @tullio res[a,b] := C̃[a,i,j]*v[i,j,b]),
             ),
         ]