Skip to content

Commit

Permalink
Add version of WaveCaKernel in script language (untested)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Mar 21, 2012
1 parent 74d42c4 commit a7128aa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Examples/WaveCaKernelScript.kranc
@@ -0,0 +1,24 @@
begin thorn WaveCaKernelScript

use cakernel

begin variables
phi pi
end variables

begin calculation initial_gaussian_calc scheduled at initial
phi = exp(-1*((t+x)/0.1)**2)
pi = -2*(t+x)/0.1**2 * exp(-1*((t+x)/0.1)**2)
end calculation

begin calculation calc_rhs scheduled at MoL_CalcRHS
D_t phi = pi
D_t pi = Euc^ij*D_ij phi
end calculation

begin calculation calc_bound_rhs scheduled at MoL_RHSBoundaries
D_t phi = 2*(t+x)/0.1**2 * exp(-1*((t+x)/0.1)**2)
D_t pi = -2/(exp((t+x)**2/0.1**2) * 0.1**2) + (4*(t+x)**2)/(exp((t+x)**2/0.1**2) * 0.1**4)
end calculation

end thorn

0 comments on commit a7128aa

Please sign in to comment.