diff options
author | tbode <tbode@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843> | 2010-05-07 00:59:10 +0000 |
---|---|---|
committer | tbode <tbode@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843> | 2010-05-07 00:59:10 +0000 |
commit | b3aafc21d0044b4d68ee7a6c088c472799ed9503 (patch) | |
tree | 3da4d04b0e3acc44f6b8e5feaf34c62095c05eea /m/WeylScal4.m | |
parent | f33a18fee7267ff212baec75795ecb13670643e8 (diff) |
WeylScal4:
Remove variable modifications in Kranc script.
Fix tensor parity tags.
Add old-style BC compatibility.
Add intelligence to runmath.sh in finding Kranc.
Change bash script permissions.
Add testsuites.
Expand README description.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/WeylScal4/trunk@52 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843
Diffstat (limited to 'm/WeylScal4.m')
-rw-r--r-- | m/WeylScal4.m | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/m/WeylScal4.m b/m/WeylScal4.m index eed4fae..4c373ec 100644 --- a/m/WeylScal4.m +++ b/m/WeylScal4.m @@ -1,5 +1,4 @@ -$Path = Join[$Path, {"~/Calpha/kranc/Tools/CodeGen", - "~/Calpha/kranc/Tools/MathematicaMisc"}]; +$Path = Join[$Path, Map[ToString, ReadList[StringToStream[Environment["MATHPATH"]], Word, WordSeparators->{":"}]]]; $RecursionLimit = 1000; @@ -48,16 +47,19 @@ derivatives = Map[DefineTensor, { R, gamma,g, gInv, k, ltet, n, rm, im, rmbar, imbar, tn, va, vb, vc, + wa, wb, wc, ea, eb, ec, Ro, Rojo, R4p, Psi0r, Psi0i, Psi1r, Psi1i, Psi2r, Psi2i, Psi3r, Psi3i, Psi4r,Psi4i }]; -SetTensorAttribute[Psi0r, TensorManualCartesianParities, {1,1,1}]; -SetTensorAttribute[Psi2r, TensorManualCartesianParities, {1,1,1}]; -SetTensorAttribute[Psi4r, TensorManualCartesianParities, {1,1,1}]; -SetTensorAttribute[Psi0i, TensorManualCartesianParities, {-1,-1,-1}]; -SetTensorAttribute[Psi2i, TensorManualCartesianParities, {-1,-1,-1}]; -SetTensorAttribute[Psi4i, TensorManualCartesianParities, {-1,-1,-1}]; +(* Psi0,2,4 behave as (pseudo)scalars *) +SetTensorAttribute[Psi0r, TensorParity, +1]; +SetTensorAttribute[Psi2r, TensorParity, +1]; +SetTensorAttribute[Psi4r, TensorParity, +1]; +SetTensorAttribute[Psi0i, TensorParity, -1]; +SetTensorAttribute[Psi2i, TensorParity, -1]; +SetTensorAttribute[Psi4i, TensorParity, -1]; +(* these are 'special' and require a patch to the symmetry thorns *) SetTensorAttribute[Psi1r, TensorManualCartesianParities, {1,1,-1}]; SetTensorAttribute[Psi3r, TensorManualCartesianParities, {-1,-1,1}]; SetTensorAttribute[Psi1i, TensorManualCartesianParities, {-1,-1,1}]; @@ -109,6 +111,7 @@ shorthands = gamma[ua,lb,lc], R[la,lb,lc,ld], invdetg, detg, third, detgmthirdroot, gInv[ua,ub], Ro[la,lb,lc], Rojo[la,lb], R4p[li,lj,lk,ll], omega11, omega22, omega33, omega12, omega13, omega23, va[ua], vb[ua], vc[ua], + wa[ua], wb[ua], wc[ua], ea[ua], eb[ua], ec[ua], tn[ua], nn, ltet[ua],n[ua],rm[ua],im[ua],rmbar[ua],imbar[ua], isqrt2, xmoved, ymoved, zmoved }; @@ -121,7 +124,7 @@ realParameters = {{Name -> offset, Default -> 10^(-15)},xorig,yorig,zorig}; PsisCalc[fdOrder_, PD_] := { Name -> "psis_calc_" <> fdOrder, - Schedule -> {"at CCTK_EVOL after MoL_Evolution after evolved_to_adm as calc_np"}, + Schedule -> {"in WeylScal4_Calculate as calc_np"}, Where -> Interior, ConditionalOnKeyword -> {"fd_order", fdOrder}, Shorthands -> shorthands, @@ -151,28 +154,29 @@ PsisCalc[fdOrder_, PD_] := (* Orthonormalize using Gram-Schmidt*) - omega11 -> va[ua] va[ub] g[la,lb], - va[ua] -> va[ua] / Sqrt[omega11], + wa[ua] -> va[ua], + omega11 -> wa[ua] wa[ub] g[la,lb], + ea[ua] -> wa[ua] / Sqrt[omega11], - omega12 -> va[ua] vb[ub] g[la,lb], - vb[ua] -> vb[ua] - omega12 va[ua], - omega22 -> vb[ua] vb[ub] g[la,lb], - vb[ua] -> vb[ua]/Sqrt[omega22], + omega12 -> ea[ua] vb[ub] g[la,lb], + wb[ua] -> vb[ua] - omega12 ea[ua], + omega22 -> wb[ua] wb[ub] g[la,lb], + eb[ua] -> wb[ua]/Sqrt[omega22], - omega13 -> va[ua] vc[ub] g[la,lb], - omega23 -> vb[ua] vc[ub] g[la,lb], - vc[ua] -> vc[ua] - omega13 va[ua] - omega23 vb[ua], - omega33 -> vc[ua] vc[ub] g[la,lb], - vc[ua] -> vc[ua]/Sqrt[omega33], + omega13 -> ea[ua] vc[ub] g[la,lb], + omega23 -> eb[ua] vc[ub] g[la,lb], + wc[ua] -> vc[ua] - omega13 ea[ua] - omega23 eb[ua], + omega33 -> wc[ua] wc[ub] g[la,lb], + ec[ua] -> wc[ua]/Sqrt[omega33], (* Create Spatial Portion of Null Tetrad *) isqrt2 -> 0.7071067811865475244, - ltet[ua] -> isqrt2 vb[ua], - n[ua] -> - isqrt2 vb[ua], - rm[ua] -> isqrt2 vc[ua], - im[ua] -> isqrt2 va[ua], - rmbar[ua] -> isqrt2 vc[ua], - imbar[ua] -> -isqrt2 va[ua], + ltet[ua] -> isqrt2 eb[ua], + n[ua] -> - isqrt2 eb[ua], + rm[ua] -> isqrt2 ec[ua], + im[ua] -> isqrt2 ea[ua], + rmbar[ua] -> isqrt2 ec[ua], + imbar[ua] -> -isqrt2 ea[ua], (* nn here is the projection of both l^a and n^a with u^a (the time-like unit vector normal to the hypersurface). We do NOT save the t component of the @@ -266,6 +270,29 @@ PsisCalc[fdOrder_, PD_] := } }; +(* Dummy calculation routine to fool Kranc into thinking that the Weyl scalars + are evolved quantities. This way we get code to register boundary conditions. + Unfortunately it also registers with MoL so we have to remove that code by hand. +*) +DummyCalc := +{ + Name -> "dummycalc", + Schedule -> {"in Nowhere_Nevertoberun"}, + Equations -> + { + dot[Psi4r] -> 0, + dot[Psi4i] -> 0 (*, + dot[Psi3r] -> 0, + dot[Psi3i] -> 0, + dot[Psi2r] -> 0, + dot[Psi2i] -> 0, + dot[Psi1r] -> 0, + dot[Psi1i] -> 0, + dot[Psi0r] -> 0, + dot[Psi0i] -> 0 *) + } +} + (**************************************************************************** Construct the thorn ****************************************************************************) @@ -285,7 +312,8 @@ keywordParameters = calculations = { PsisCalc["2nd", PDstandard2nd], - PsisCalc["4th", PDstandard4th] + PsisCalc["4th", PDstandard4th], + DummyCalc }; CreateKrancThornTT[groups, ".", "WeylScal4", |