diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-01-27 23:16:07 -0600 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-01-27 23:16:07 -0600 |
commit | 23b034dad89823a8cb7e2a92da92dedb5d0eb266 (patch) | |
tree | cbb676a063d7c76ff8e508b1b550907b8ab5eeed /Examples/EMScript.kranc | |
parent | a494bab4c18566131a50493d887790f2e18f5d7a (diff) |
EMScript.kranc: EM.m converted to new language
Diffstat (limited to 'Examples/EMScript.kranc')
-rw-r--r-- | Examples/EMScript.kranc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Examples/EMScript.kranc b/Examples/EMScript.kranc new file mode 100644 index 0000000..007d6d0 --- /dev/null +++ b/Examples/EMScript.kranc @@ -0,0 +1,35 @@ +begin thorn EMScript + +begin variables + El_i B_i CEl CB rho +end variables + +begin temporaries + sigma +end temporaries + +begin calculation EM_initial scheduled at initial + sigma = 1 + El1 = sigma*cos(2*PI*(x + y)) + El2 = -1*(1 - sigma)*cos(2*PI*x) - sigma*cos(2*PI*(x + y)) + El3 = 0 + B1 = 0 + B2 = 0 + B3 = (1 - sigma)*cos(2*PI*x) + sigma*cos(2*PI*(x + y)) +end calculation + +begin calculation EM_evol scheduled at MoL_CalcRHS + D_t El_a = Eps_abc * Euc^be * Euc^cf * D_e B_f + D_t B_a = -1*Eps_abc * Euc^be * Euc^cf * D_e El_f +end calculation + +begin calculation EM_constraints scheduled at analysis + CEl = D_b El_a * Euc^ab + CB = D_b B_a * Euc^ab +end calculation + +begin calculation EM_energy scheduled at analysis + rho = Euc^ab * El_a * El_b/2 + Euc^ab * B_a * B_b/2 +end calculation + +end thorn |