diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2011-06-23 10:03:41 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2011-06-23 10:03:41 -0400 |
commit | 9d4011dba46157c1da28a236b6cdb726eaa9ed96 (patch) | |
tree | 452e0d33ff1b7f8590bb35301ae5c658b49e37c0 /m/McLachlan_ADMConstraints.m | |
parent | eaba1d7ded1a44744ce01e00572322954d66e441 (diff) |
Use new Jacobian mechanism for all thorns
Diffstat (limited to 'm/McLachlan_ADMConstraints.m')
-rw-r--r-- | m/McLachlan_ADMConstraints.m | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/m/McLachlan_ADMConstraints.m b/m/McLachlan_ADMConstraints.m index 3e3ad3a..1abb5ae 100644 --- a/m/McLachlan_ADMConstraints.m +++ b/m/McLachlan_ADMConstraints.m @@ -10,13 +10,13 @@ SetSourceLanguage["C"]; (* Options *) (******************************************************************************) -createCode[derivOrder_, useGlobalDerivs_, evolutionTimelevels_, addMatter_] := +createCode[derivOrder_, useJacobian_, evolutionTimelevels_, addMatter_] := Module[{}, prefix = "ML_"; suffix = "" - <> If [useGlobalDerivs, "_MP", ""] + <> If [useJacobian, "_MP", ""] <> If [derivOrder!=4, "_O" <> ToString[derivOrder], ""] (* <> If [evolutionTimelevels!=3, "_TL" <> ToString[evolutionTimelevels], ""] *) (* <> If [addMatter==1, "_M", ""] *) @@ -38,12 +38,7 @@ derivatives = StandardCenteredDifferenceOperator[1,derivOrder/2,j] }; -FD = PDstandardNth; - -ResetJacobians; -If [useGlobalDerivs, - DefineJacobian[PD, FD, J, dJ], - DefineJacobian[PD, FD, KD, Zero3]]; +PD = PDstandardNth; @@ -55,7 +50,6 @@ If [useGlobalDerivs, Map [DefineTensor, {normal, tangentA, tangentB, dir, nn, nu, nlen, nlen2, su, vg, - J, dJ, g, K, alpha, beta, detg, gu, G, R, trR, Km, trK, H, M, T00, T0, T, rho, S, @@ -63,7 +57,6 @@ Map [DefineTensor, Map [AssertSymmetricIncreasing, {g[la,lb], K[la,lb], R[la,lb], T[la,lb]}]; -AssertSymmetricIncreasing [dJ[ua,lb,lc], lb, lc]; AssertSymmetricIncreasing [G[ua,lb,lc], lb, lc]; Map [AssertSymmetricDecreasing, {gu[ua,ub]}]; @@ -129,11 +122,7 @@ extraGroups = {"ADMBase::dtshift", {dtbetax, dtbetay, dtbetaz}}, {"TmunuBase::stress_energy_scalar", {eTtt}}, {"TmunuBase::stress_energy_vector", {eTtx, eTty, eTtz}}, - {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}}, - {"Coordinates::jacobian", {J11, J12, J13, J21, J22, J23, J31, J32, J33}}, - {"Coordinates::jacobian2", {dJ111, dJ112, dJ113, dJ122, dJ123, dJ133, - dJ211, dJ212, dJ213, dJ222, dJ223, dJ233, - dJ311, dJ312, dJ313, dJ322, dJ323, dJ333}} + {"TmunuBase::stress_energy_tensor", {eTxx, eTxy, eTxz, eTyy, eTyz, eTzz}} }; @@ -189,8 +178,7 @@ ADMConstraintsCalc = inheritedImplementations = Join[{"ADMBase"}, - If [addMatter!=0, {"TmunuBase"}, {}], - If [useGlobalDerivs, {"Coordinates"}, {}]]; + If [addMatter!=0, {"TmunuBase"}, {}]]; (******************************************************************************) (* Parameters *) @@ -210,6 +198,7 @@ CreateKrancThornTT [groups, ".", ADMConstraints, DeclaredGroups -> declaredGroupNames, PartialDerivatives -> derivatives, EvolutionTimelevels -> evolutionTimelevels, + UseJacobian -> useJacobian, UseLoopControl -> True, InheritedImplementations -> inheritedImplementations ]; @@ -223,7 +212,7 @@ CreateKrancThornTT [groups, ".", ADMConstraints, (******************************************************************************) (* derivative order: 2, 4, 6, 8, ... *) -(* useGlobalDerivs: False or True *) +(* useJacobian: False or True *) (* timelevels: 2 or 3 (keep this at 3; this is better chosen with a run-time parameter) *) (* matter: 0 or 1 |