From 57670c0e9542b950787c1d32f924d34a98914866 Mon Sep 17 00:00:00 2001 From: Liwei Ji Date: Tue, 19 Nov 2024 11:06:23 -0500 Subject: [PATCH] ADMconstraints: treat dexK separatedly to remove warnings --- ADMconstraints/wolfram/ADM_set_constraint.hxx | 3 --- ADMconstraints/wolfram/ADM_set_constraint.wl | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ADMconstraints/wolfram/ADM_set_constraint.hxx b/ADMconstraints/wolfram/ADM_set_constraint.hxx index b49f76d1..57514b25 100644 --- a/ADMconstraints/wolfram/ADM_set_constraint.hxx +++ b/ADMconstraints/wolfram/ADM_set_constraint.hxx @@ -71,7 +71,6 @@ const vreal dgam313 = tmp_dgam(0,2)(2); const vreal dgam322 = tmp_dgam(1,1)(2); const vreal dgam323 = tmp_dgam(1,2)(2); const vreal dgam333 = tmp_dgam(2,2)(2); -const vreal dexK111 = tmp_dexK(0,0)(0); const vreal dexK112 = tmp_dexK(0,1)(0); const vreal dexK113 = tmp_dexK(0,2)(0); const vreal dexK122 = tmp_dexK(1,1)(0); @@ -80,7 +79,6 @@ const vreal dexK133 = tmp_dexK(2,2)(0); const vreal dexK211 = tmp_dexK(0,0)(1); const vreal dexK212 = tmp_dexK(0,1)(1); const vreal dexK213 = tmp_dexK(0,2)(1); -const vreal dexK222 = tmp_dexK(1,1)(1); const vreal dexK223 = tmp_dexK(1,2)(1); const vreal dexK233 = tmp_dexK(2,2)(1); const vreal dexK311 = tmp_dexK(0,0)(2); @@ -88,7 +86,6 @@ const vreal dexK312 = tmp_dexK(0,1)(2); const vreal dexK313 = tmp_dexK(0,2)(2); const vreal dexK322 = tmp_dexK(1,1)(2); const vreal dexK323 = tmp_dexK(1,2)(2); -const vreal dexK333 = tmp_dexK(2,2)(2); const vreal ddgam1111 = tmp_ddgam(0,0)(0,0); const vreal ddgam1112 = tmp_ddgam(0,1)(0,0); const vreal ddgam1113 = tmp_ddgam(0,2)(0,0); diff --git a/ADMconstraints/wolfram/ADM_set_constraint.wl b/ADMconstraints/wolfram/ADM_set_constraint.wl index 61881bd2..4fc5498c 100644 --- a/ADMconstraints/wolfram/ADM_set_constraint.wl +++ b/ADMconstraints/wolfram/ADM_set_constraint.wl @@ -56,18 +56,35 @@ $MainPrint[] := PrintInitializations[{Mode -> "MainIn", StorageType -> "Tile"}, ADMVarlist]; PrintInitializations[{Mode -> "MainIn", StorageType -> "Tile", TensorType -> "Vect"}, - dADMVarlist]; + Drop[dADMVarlist, {-1}]]; + + (* treat dexK separately *) + Module[{printdK, varname, symmetry, printname}, + {varname, symmetry, printname} = ParseVar[dADMVarlist[[-1]]]; + printdK[kk_, ii_, jj_] := PrintComponentInitialization[{varname, symmetry}, dexK[{kk, -GetDefaultChart[]}, {ii, -GetDefaultChart[]}, {jj, -GetDefaultChart[]}]]; + SetParsePrintCompInitMode[MainIn -> True]; + SetParsePrintCompInitStorageType[Tile -> True]; + SetParsePrintCompInitTensorType[Vect -> True]; + Do[If[ii != jj || ii != kk || jj != kk, printdK[kk, ii, jj]], {kk, 1, 3}, {ii, 1, 3}, {jj, ii, 3}] + CleanParsePrintCompInitStorageType[]; + CleanParsePrintCompInitTensorType[]; + CleanParsePrintCompInitMode[]; + ]; + PrintInitializations[{Mode -> "MainIn", StorageType -> "Tile", TensorType -> "Smat"}, ddADMVarlist]; pr[]; PrintEquations[{Mode -> "Temp"}, Drop[IntermediateVarlist, {-1}]]; pr[]; + (* treat DexK separately *) Module[{printDK}, printDK[kk_, ii_, jj_] := PrintComponentEquation[GetDefaultChart[], DexK[{kk, -GetDefaultChart[]}, {ii, -GetDefaultChart[]}, {jj, -GetDefaultChart[]}]]; SetParsePrintCompEQNMode[{NewVar -> True}]; Do[If[ii != jj || ii != kk || jj != kk, printDK[kk, ii, jj]], {kk, 1, 3}, {ii, 1, 3}, {jj, ii, 3}] + CleanParsePrintCompEQNMode[]; ]; + pr[]; PrintEquations[{Mode -> "Temp"}, MatterVarlist]; pr[];