diff options
author | goodale <goodale@50555cc7-fb31-491a-85db-9a2874240742> | 2000-03-29 07:42:18 +0000 |
---|---|---|
committer | goodale <goodale@50555cc7-fb31-491a-85db-9a2874240742> | 2000-03-29 07:42:18 +0000 |
commit | ed3cf91b28bead60b68fa95e0829ab8a7d68b64e (patch) | |
tree | 36aff42d1af9000e07722827eec1e698520aad7e /src | |
parent | 06b619c73980740e6ce2bce7ed7bbc6b6a72e002 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/InitSymBound.cc | 18 | ||||
-rw-r--r-- | src/WaveToy.cc | 33 |
2 files changed, 16 insertions, 35 deletions
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<cctk_lsh[2]; k++) - for (int j=0; j<cctk_lsh[1]; j++) - for (int i=0; i<cctk_lsh[0]; i++) - { - int index = CCTK_GFINDEX3D(cctkGH,i,j,k); - - phi_old[index] = phi[index]; - phi[index] = phi_new[index]; - } - } - - - + return; } /*@@ @@ -145,15 +129,15 @@ static void WaveToyC_Boundaries(CCTK_ARGUMENTS) sw[1]=1; sw[2]=1; - ierr = CartSymBCGroup(cctkGH,"wavetoycxx::scalartmps"); + ierr = CartSymBCGroup(cctkGH,"wavetoy::scalarevolve"); if (CCTK_Equals(bound,"flat")) { - ierr = FlatBCVar(cctkGH,sw,"wavetoycxx::phi_new"); + ierr = FlatBCVar(cctkGH,sw,"wavetoy::phi"); } else if (CCTK_Equals(bound,"radiation")) { - ierr = RadiativeBCVar(cctkGH,0,1,sw,"wavetoycxx::phi_new","wavetoy::phi"); + ierr = RadiativeBCVar(cctkGH,0,1,sw,"wavetoy::phi","wavetoy::phi"); } if (ierr < 0) @@ -161,8 +145,7 @@ static void WaveToyC_Boundaries(CCTK_ARGUMENTS) CCTK_WARN(0,"Boundary conditions not applied - giving up!"); } - - + return; } |