Skip to content

Commit

Permalink
ADMconstraints: treat dexK separatedly to remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Nov 19, 2024
1 parent cb828b1 commit 57670c0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
3 changes: 0 additions & 3 deletions ADMconstraints/wolfram/ADM_set_constraint.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -80,15 +79,13 @@ 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);
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);
Expand Down
19 changes: 18 additions & 1 deletion ADMconstraints/wolfram/ADM_set_constraint.wl
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down

0 comments on commit 57670c0

Please sign in to comment.