aboutsummaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-05 20:31:21 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-05 20:31:21 +0200
commit18951cd3b318e6fe063ceb9db0dc9587a750e8fd (patch)
treed4b6835f5f912834374f23c51073bb6385c3b3e0 /Tests
parent95d4c660d0e60000f872f205fcc5bb553b838ec1 (diff)
Kranc.mt: Add some variables useful in several tests
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Kranc.mt36
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",