diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-05 20:31:21 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-05 20:31:21 +0200 |
commit | 18951cd3b318e6fe063ceb9db0dc9587a750e8fd (patch) | |
tree | d4b6835f5f912834374f23c51073bb6385c3b3e0 /Tests | |
parent | 95d4c660d0e60000f872f205fcc5bb553b838ec1 (diff) |
Kranc.mt: Add some variables useful in several tests
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Kranc.mt | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/Tests/Kranc.mt b/Tests/Kranc.mt index dc324c1..ffba131 100644 --- a/Tests/Kranc.mt +++ b/Tests/Kranc.mt @@ -1,6 +1,36 @@ (* Mathematica Test File *) +$derivatives = { + PDstandard2nd[i_] -> StandardCenteredDifferenceOperator[1,1,i], + PDstandard2nd[i_, i_] -> StandardCenteredDifferenceOperator[2,1,i]}; + +PD = PDstandard2nd; + +$groups = {{"evolved_group", {phi, pi}}}; + +$initialSineCalc = { + Name -> "initial_sine", + Schedule -> {"AT initial"}, + Equations -> + { + phi -> Sin[2 Pi (x - t)], + pi -> -2 Pi Cos[2 Pi (x - t)] + }}; + +$evolveCalc = { + Name -> "calc_rhs", + Schedule -> {"IN MoL_CalcRHS"}, + Where -> Interior, + Equations -> + { + dot[phi] -> pi, + dot[pi] -> Euc[ui,uj] PD[phi,li,lj] + }}; + + + + (****************************************************************) (* CreateThorn *) (****************************************************************) @@ -21,12 +51,14 @@ Test[ statements if they don't contain grid functions, as this doesn't work with vectorisation. *) +(* The PD symbol is treated in a nonoptimal way by Kranc, and this + causes problems for the tests. This should be cleaned up. *) + Test[ Module[ {derivatives = { PDstandard2nd[i_] -> StandardCenteredDifferenceOperator[1,1,i], PDstandard2nd[i_, i_] -> StandardCenteredDifferenceOperator[2,1,i]}, - PD = PDstandard2nd, groups = {{"evolved_group", {phi, pi}}}, initialSineCalc = { Name -> "initial_sine", @@ -45,6 +77,8 @@ Test[ dot[phi] -> IfThen[alpha>0, pi, 2 pi], dot[pi] -> IfThen[alpha>0, Euc[ui,uj] PD[phi,li,lj], 2 Euc[ui,uj] PD[phi,li,lj]] }}}, + + (* PD = PDstandard2nd *) CreateKrancThornTT[ groups, "TestThorns", |