From ba26453a1afb01aab4ef94f36f2da8940b87f5c2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 4 Apr 2013 09:59:16 -0400 Subject: SimpleWave: Re-indent and re-arrange change (no functionality difference) --- Examples/SimpleWave.m | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) (limited to 'Examples') diff --git a/Examples/SimpleWave.m b/Examples/SimpleWave.m index 994defc..e0cca88 100644 --- a/Examples/SimpleWave.m +++ b/Examples/SimpleWave.m @@ -1,40 +1,35 @@ << "KrancThorn.m"; -groups = {{"evolved_group", {phi, pi}}}; - -derivatives = -{ - PDstandard2nd[i_] -> StandardCenteredDifferenceOperator[1,1,i], - PDstandard2nd[i_, i_] -> StandardCenteredDifferenceOperator[2,1,i] -}; +derivatives = { + PDstandard2nd[i_] -> StandardCenteredDifferenceOperator[1,1,i], + PDstandard2nd[i_, i_] -> StandardCenteredDifferenceOperator[2,1,i]}; PD = PDstandard2nd; -initialSineCalc = -{ - Name -> "initial_sine", - Schedule -> {"AT INITIAL"}, - Equations -> +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)] - } -}; + pi -> -2 Pi Cos[2 Pi (x - t)] + }}; -evolveCalc = -{ - Name -> "calc_rhs", - Schedule -> {"in MoL_CalcRHS"}, - Where -> Interior, +evolveCalc = { + Name -> "calc_rhs", + Schedule -> {"IN MoL_CalcRHS"}, + Where -> Interior, Equations -> { dot[phi] -> pi, dot[pi] -> Euc[ui,uj] PD[phi,li,lj] - } -}; + }}; -CreateKrancThornTT[groups, ".", +CreateKrancThornTT[ + groups, ".", "SimpleWave", - Calculations -> {initialSineCalc, evolveCalc}, PartialDerivatives -> derivatives, - DeclaredGroups -> {"evolved_group"}]; + DeclaredGroups -> {"evolved_group"}, + Calculations -> {initialSineCalc, evolveCalc}]; -- cgit v1.2.3