From ed3cf91b28bead60b68fa95e0829ab8a7d68b64e Mon Sep 17 00:00:00 2001 From: goodale Date: Wed, 29 Mar 2000 07:42:18 +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/WaveToyCXX/trunk@22 50555cc7-fb31-491a-85db-9a2874240742 --- src/InitSymBound.cc | 18 ++++++++---------- src/WaveToy.cc | 33 ++++++++------------------------- 2 files changed, 16 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/InitSymBound.cc b/src/InitSymBound.cc index 585272b..17405af 100644 --- a/src/InitSymBound.cc +++ b/src/InitSymBound.cc @@ -28,18 +28,16 @@ extern "C" void WaveToyCXX_InitSymBound(CCTK_ARGUMENTS) { - DECLARE_CCTK_ARGUMENTS - - int sym[3]; + DECLARE_CCTK_ARGUMENTS + + 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,"wavetoycxx::phi_new"); - - + SetCartSymmetry(cctkGH, sym,"wavetoy::phi"); + return; } diff --git a/src/WaveToy.cc b/src/WaveToy.cc index 23843fc..978f1e8 100644 --- a/src/WaveToy.cc +++ b/src/WaveToy.cc @@ -77,8 +77,8 @@ extern "C" void WaveToyCXX_Evolution(CCTK_ARGUMENTS) { int index = CCTK_GFINDEX3D(cctkGH,i,j,k); - phi_new[index] = - factor*phi[index] - phi_old[index] + phi_n[index] = + factor*phi[index] - phi_p[index] + dt2 * ( ( val( phi, i+1,j ,k ) + val( phi, i-1,j ,k) )*dx2i +( val( phi, i ,j+1,k ) + val( phi, i ,j-1,k) )*dy2i @@ -91,30 +91,14 @@ extern "C" void WaveToyCXX_Evolution(CCTK_ARGUMENTS) // // Synchronize before applying boundary conditions // - CCTK_SyncGroup(cctkGH,"wavetoycxx::scalartmps"); + CCTK_SyncGroup(cctkGH,"wavetoy::scalarevolve"); // // Apply boundary conditions // WaveToyC_Boundaries(CCTK_PASS_CTOC); - // - // Update timeslices - // - { - for (int k=0; k