Skip to content

Commit

Permalink
Update EM example to use new xTensor interface
Browse files Browse the repository at this point in the history
  • Loading branch information
barrywardell committed Mar 7, 2014
1 parent fa6171d commit 6a5b010
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Examples/EM.m
Expand Up @@ -39,14 +39,14 @@
StandardCenteredDifferenceOperator[1,2,j]
};

PD = PDstandard2nd;
pd[t_, i_] := xTensorKranc`Private`PDKrancBasis[i][t];

(**************************************************************************************)
(* Tensors *)
(**************************************************************************************)

(* Register the tensor quantities with the TensorTools package *)
Map[DefineTensor, {El,B}];
Map[DefineTensor, {El[la], B[la]}];

(**************************************************************************************)
(* Groups *)
Expand Down Expand Up @@ -93,8 +93,8 @@
Where -> Interior,
Equations ->
{
dot[El[la]] -> (Eps[la,lb,lc] Euc[ub,ue] Euc[uc,uf] PD[B[lf],le]),
dot[B[la]] -> -(Eps[la,lb,lc] Euc[ub,ue] Euc[uc,uf] PD[El[lf],le])
dot[El[la]] -> (Eps[la,lb,lc] Euc[ub,ue] Euc[uc,uf] pd[B[lf],le]),
dot[B[la]] -> -(Eps[la,lb,lc] Euc[ub,ue] Euc[uc,uf] pd[El[lf],le])
}
}

Expand All @@ -108,7 +108,7 @@
Where -> Interior,
Equations ->
{
CEl -> PD[El[la],lb] Euc[ua,ub], CB -> PD[B[la],lb] Euc[ua,ub]
CEl -> pd[El[la],lb] Euc[ua,ub], CB -> pd[B[la],lb] Euc[ua,ub]
}
}

Expand Down
12 changes: 6 additions & 6 deletions Examples/EM/src/RegisterSymmetries.cc
Expand Up @@ -16,34 +16,34 @@ extern "C" void EM_RegisterSymmetries(CCTK_ARGUMENTS)


/* Register symmetries of grid functions */
sym[0] = -1;
sym[0] = 1;
sym[1] = 1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::El1");

sym[0] = 1;
sym[1] = -1;
sym[1] = 1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::El2");

sym[0] = 1;
sym[1] = 1;
sym[2] = -1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::El3");

sym[0] = -1;
sym[0] = 1;
sym[1] = 1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::B1");

sym[0] = 1;
sym[1] = -1;
sym[1] = 1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::B2");

sym[0] = 1;
sym[1] = 1;
sym[2] = -1;
sym[2] = 1;
SetCartSymVN(cctkGH, sym, "EM::B3");

sym[0] = 1;
Expand Down

0 comments on commit 6a5b010

Please sign in to comment.