From c7a57ec2e13fa24ad80c633369e8f6055ea89c23 Mon Sep 17 00:00:00 2001 From: goodale Date: Wed, 29 Mar 2000 07:42:15 +0000 Subject: Changed to use timelevels - thanks for putting the rotation in PUGH Ed. Note that the no-boundary condition tests assumed that phi_new had zero at its boundaries. This is, or course, no longer true with timelevel rotation. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyC/trunk@40 90eea020-d82d-4da5-bf6e-4ee79ff7632f --- interface.ccl | 8 +-- schedule.ccl | 1 - src/InitSymBound.c | 15 +++-- src/WaveToy.c | 130 ++++++++++++++++++------------------------ test/test_wavetoyc/phi.dl | 4 +- test/test_wavetoyc/phi.xl | 92 +++++++++++++++--------------- test/test_wavetoyc/phi.yl | 92 +++++++++++++++--------------- test/test_wavetoyc/phi_max.tl | 6 +- test/test_wavetoyc/phi_min.tl | 2 +- test/test_wavetoyc/phi_nm1.tl | 10 ++-- test/test_wavetoyc/phi_nm2.tl | 4 +- 11 files changed, 170 insertions(+), 194 deletions(-) diff --git a/interface.ccl b/interface.ccl index b995880..c44b041 100644 --- a/interface.ccl +++ b/interface.ccl @@ -8,18 +8,12 @@ USES INCLUDE: Symmetry.h public: -cctk_real scalarevolve type = GF +cctk_real scalarevolve type = GF Timelevels=3 { phi - phi_old } "The evolved scalar field" -private: -cctk_real scalartmps type = GF -{ - phi_new -} "Temporary GF for WaveToy" diff --git a/schedule.ccl b/schedule.ccl index 81a5463..5dfc65c 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -16,7 +16,6 @@ schedule WaveToyC_InitSymBound at BASEGRID schedule WaveToyC_Evolution as WaveToy_Evolution at EVOL { LANG: C - STORAGE: scalartmps } "Evolution of 3D wave equation" diff --git a/src/InitSymBound.c b/src/InitSymBound.c index ae0c34b..018bf39 100644 --- a/src/InitSymBound.c +++ b/src/InitSymBound.c @@ -31,16 +31,15 @@ static char *rcsid = "$Header$"; void WaveToyC_InitSymBound(CCTK_ARGUMENTS) { - DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_ARGUMENTS - int sym[3]; + int sym[3]; - sym[0] = 1; - sym[1] = 1; - sym[2] = 1; + sym[0] = 1; + sym[1] = 1; + sym[2] = 1; - SetCartSymmetry(cctkGH, sym,"wavetoy::phi"); - SetCartSymmetry(cctkGH, sym,"wavetoyc::phi_new"); + SetCartSymmetry(cctkGH, sym,"wavetoy::phi"); - return; + return; } diff --git a/src/WaveToy.c b/src/WaveToy.c index 8a1c6d3..40c3b68 100644 --- a/src/WaveToy.c +++ b/src/WaveToy.c @@ -35,86 +35,72 @@ static void WaveToyC_Boundaries(CCTK_ARGUMENTS); void WaveToyC_Evolution(CCTK_ARGUMENTS) { - DECLARE_CCTK_ARGUMENTS - - int i,j,k; - int index; - int istart, jstart, kstart, iend, jend, kend; - CCTK_REAL dx,dy,dz,dt,dx2,dy2,dz2,dt2; - CCTK_REAL dx2i,dy2i,dz2i; - - /* Set up shorthands */ - dx = CCTK_DELTA_SPACE(0); - dy = CCTK_DELTA_SPACE(1); - dz = CCTK_DELTA_SPACE(2); - dt = CCTK_DELTA_TIME; + DECLARE_CCTK_ARGUMENTS - dx2=dx*dx; - dy2=dy*dy; - dz2=dz*dz; - dt2=dt*dt; - - dx2i = 1.0/dx2; - dy2i = 1.0/dy2; - dz2i = 1.0/dz2; - - istart = 1; - jstart = 1; - kstart = 1; + int i,j,k; + int index; + int istart, jstart, kstart, iend, jend, kend; + CCTK_REAL dx,dy,dz,dt,dx2,dy2,dz2,dt2; + CCTK_REAL dx2i,dy2i,dz2i; + + CCTK_REAL factor; + + /* Set up shorthands */ + dx = CCTK_DELTA_SPACE(0); + dy = CCTK_DELTA_SPACE(1); + dz = CCTK_DELTA_SPACE(2); + dt = CCTK_DELTA_TIME; - iend = cctk_lsh[0]-1; - jend = cctk_lsh[1]-1; - kend = cctk_lsh[2]-1; + dx2 = dx*dx; + dy2 = dy*dy; + dz2 = dz*dz; + dt2 = dt*dt; + + dx2i = 1.0/dx2; + dy2i = 1.0/dy2; + dz2i = 1.0/dz2; + + istart = 1; + jstart = 1; + kstart = 1; + + iend = cctk_lsh[0]-1; + jend = cctk_lsh[1]-1; + kend = cctk_lsh[2]-1; - /* Do the evolution */ + /* Do the evolution */ - for (k=kstart; k