Correctness tests for ShiftedGaugeWave thorn

<<SimulationTools`

$SimulationPath={FileNameDrop[NotebookDirectory[],-4]};

Compare with Exact

runs={"sgw_a","sgw_b","sgw_c"};
einsteinexact="sgw_ee";

Check non-finite differenced variables are identical

vars={"alp.h5","dtalp.h5","betax.h5","betay.h5","betaz.h5","dtbetax.h5","dtbetay.h5","dtbetaz.h5","gxx.h5","gxy.h5","gxz.h5","gyy.h5","gyz.h5","gzz.h5"};

compare[var_]:=Module[{e,ee,eeu},
e=ReadGridFunction[runs[[1]],var,0];
ee=ReadGridFunction[einsteinexact,var,0];
Manipulate[Show[MapThread[ListLinePlot[Slab[#1,x,y],Joined->True,PlotStyle->#2,PlotRange->All]&,{{e,ee},{Red,Directive[Black,Dotted]}}]],{x,0,0.9,0.1},{y,0,0.9,0.1}]
]

compare/@vars

Check that Exact converges with time spacing to EinsteinExact at the appropriate order (4th)

fdvars = {"kxx.h5", "kxy.h5", "kxz.h5", "kyy.h5", "kyz.h5", "kzz.h5"};

comparefd[var_]:=Module[{a,b,c,ee,erra,errb,errc},
{a, b, c} = ReadGridFunction[#, var, 0] & /@ runs;
ee = ReadGridFunction[einsteinexact, var, 0];
erra = a - ee;
errb = b - ee;
errc = c - ee;
Manipulate[Show[MapThread[ListLinePlot[Slab[#1,x,y],Joined->True,PlotStyle->#2]&,{{erra,16errb,(16^2)errc},{Red,Directive[Black,Dotted],Directive[Blue,Dotted]}}],PlotRange->All],{x,0,0.9,0.1},{y,0,0.9,0.1}]
]

comparefd/@fdvars

Constraints