aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@c78560ca-4b45-4335-b268-5f3340f3cb52>1999-02-18 10:19:21 +0000
committerallen <allen@c78560ca-4b45-4335-b268-5f3340f3cb52>1999-02-18 10:19:21 +0000
commitb52cbc0263f316fb42ca0de7a6f631b4fd5a4f0a (patch)
tree6f86fc90449093a8b520ea8dcaac6e3f97b2743f
parente324b28ed17601a378e050d7a54867226851d981 (diff)
Removed WaveToy.F which had somehow committed itself in this directory
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@3 c78560ca-4b45-4335-b268-5f3340f3cb52
-rw-r--r--src/WaveToy.F192
1 files changed, 0 insertions, 192 deletions
diff --git a/src/WaveToy.F b/src/WaveToy.F
deleted file mode 100644
index f23ec94..0000000
--- a/src/WaveToy.F
+++ /dev/null
@@ -1,192 +0,0 @@
-#include "cctk.h"
-#include "declare_parameters.h"
-#include "declare_arguments.h"
-
- subroutine WaveToy_Boundaries(CCTK_FARGUMENTS)
-
- implicit none
-
- DECLARE_CCTK_FARGUMENTS
- DECLARE_PARAMETERS
-
- INTEGER CCTK_Equals
-
- WaveToy_bound = "none"
-
- if(.NOT.CCTK_Equals(WaveToy_Bound, "periodic") .and.
- & .NOT.CCTK_Equals(WaveToy_Bound,"none")) then
- scalar_field(1,:,:) = 0.0
- scalar_field(:,1,:) = 0.0
- scalar_field(:,:,1) = 0.0
-
- scalar_field(sh(1),:,:) = 0.0
- scalar_field(:,sh(2),:) = 0.0
- scalar_field(:,:,sh(3)) = 0.0
- end if
-
-c Should have a call to symmetry bounds here
-
- end subroutine WaveToy_boundaries
-
-
-
- subroutine WaveToy_evolution(CCTK_FARGUMENTS)
-
- implicit none
-
- DECLARE_CCTK_FARGUMENTS
- DECLARE_PARAMETERS
-
-c Declare local variables
- INTEGER :: i,j,k
- INTEGER :: istart, jstart, kstart, iend, jend, kend
- REAL :: dx,dy,dz
-
- dx = coarse_dx/levfac
- dy = coarse_dy/levfac
- dz = coarse_dz/levfac
-
- istart = 2
- jstart = 2
- kstart = 2
-
- iend = sh(1)-1
- jend = sh(2)-1
- kend = sh(3)-1
-
- do k = kstart, kend
- do j = jstart, jend
- do i = istart, iend
-
- scalar_field_tmp(i,j,k) =
- 1 2.0*(1.0 - (dt**2)*(1.0/dx**2 +
- 2 1.0/dy**2 +1.0/dz**2))*scalar_field(i,j,k) -
- 3 scalar_field_old(i,j,k) +
- 4 (dt**2) *
- 5 ((scalar_field(i+1,j,k)+scalar_field(i-1,j,k))/dx**2
- 6 +(scalar_field(i,j+1,k)+scalar_field(i,j-1,k))/dy**2
- 7 +(scalar_field(i,j,k+1)+scalar_field(i,j,k-1))/dz**2)
-
- end do
- end do
- end do
-
- scalar_field_old = scalar_field
- scalar_field = scalar_field_tmp
-
- call WaveToy_boundaries(CCTK_FARGUMENTS)
-
-c call CCTK_SyncGroup("scalarfields")
-
- end subroutine WaveToy_evolution
-
-
-
- subroutine WaveToy_init(CCTK_FARGUMENTS)
-
- implicit none
-
- DECLARE_CCTK_FARGUMENTS
- DECLARE_PARAMETERS
-
- REAL :: omega, pi, kx, ky, kz, radius, amplitude
-
- integer CCTK_Equals
-
- pi = 4.0*atan(1.0)
-
-c Set parameters manually for now
-c -------------------------------
- WaveToy_dtfac = 0.5
- WaveToy_kx = 2
- WaveToy_ky = 2
- WaveToy_kz = 2
- WaveToy_radius = 0.25
- WaveToy_amplitude = 1.0
- WaveToy_initialdata = "plane"
-
-c Calculate timestep
- dt = WaveToy_dtfac*coarse_dx/levfac
- time = 0
-
-c Shorthand
- kx = WaveToy_kx
- ky = WaveToy_ky
- kz = WaveToy_kz
- radius = WaveToy_radius
- amplitude = WaveToy_amplitude
-
- call WaveToy_boundaries(CCTK_FARGUMENTS)
-
-c call CCTK_SyncGroup("scalarfields")
-
- omega= sqrt(kx**2+ky**2+kz**2)
-
-c Initialise the scalar field. Can be plane waves, spherical waves
-c or waves in a box.
-
- if (CCTK_Equals(WaveToy_InitialData,"plane")) then
- scalar_field = amplitude*
- & cos(kx*x+ky*y+kz*z+omega*time)
- scalar_field_old = amplitude*
- & cos(kx*x+ky*y+kz*z+omega*(time-dt))
-
- else if (CCTK_Equals(WaveToy_initialdata,"spherical")) then
-
- scalar_field = amplitude*cos(kx*sqrt(x**2+y**2+z**2)+omega*time)
- scalar_field_old = amplitude*cos(kx*sqrt(x**2+y**2+z**2)+omega*(time-dt))
-
- else if (CCTK_Equals(WaveToy_InitialData, "box")) then
-
-c Only currently implemented for the "box" grid type.
-
-c if (CCTK_Equals(grid, "box")) then
-
-c Must have all the wavenumbers non-zero for this to work.
-
-c if (kx == 0) then
-c write(*,*) "Box mode selected. Setting kx to 1"
-c kx = 1
-c end if
-
-c if (ky == 0) then
-c write(*,*) "Box mode selected. Setting ky to 1"
-c ky = 1
-c end if
-
-c if (kz == 0) then
-c write(*,*) "Box mode selected. Setting kz to 1"
-c kz = 1
-c end if
-
-c Set up the initial data.
-c Use kx,ky,kz as number of modes in each direction.
-
-c scalar_field = amplitude*sin(kx*(x-0.5)*pi)*
-c $ sin(ky*(y-0.5)*pi)*
-c $ sin(kz*(z-0.5)*pi)*
-c $ cos(omega*time*pi)
-
-c scalar_field_old = amplitude*sin(kx*(x-0.5)*pi)*
-c $ sin(ky*(y-0.5)*pi)*
-c $ sin(kz*(z-0.5)*pi)*
-c $ cos(omega*(time-dt)*pi)
-c else
-c write(*,*) "WaveToy box mode selected, but grid not set to box"
-c STOP
-c end if
-
- else if (CCTK_Equals(WaveToy_InitialData,"tsgaussian")) then
-
- scalar_field = exp(-amplitude*(sqrt(x**2+y**2+z**2)-radius)**2)
- scalar_field_old = scalar_field
-
- else
-
- print *,"Unknown initialisation mode in WaveToy"
-c CCTK_Warning(GH,0,"Unknown initialisation mode in WaveToy")
-c CCTK_Stop(GH,0)
-
- end if
-
- end subroutine WaveToy_Init