From 4ef140c2df7c77fefeb6927b5bf882d855562165 Mon Sep 17 00:00:00 2001 From: allen Date: Sat, 4 Sep 1999 11:05:58 +0000 Subject: Removing initial data and setting of timestep from WaveToy, these jobs go to different thorns now git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF77/trunk@19 4451c3c6-1034-4891-99ea-21147727ccdf --- src/CheckParameters.F77 | 52 -------------------- src/InitialData.F77 | 126 ------------------------------------------------ src/WaveToy.F77 | 2 +- src/make.code.defn | 2 +- 4 files changed, 2 insertions(+), 180 deletions(-) delete mode 100644 src/CheckParameters.F77 delete mode 100644 src/InitialData.F77 (limited to 'src') diff --git a/src/CheckParameters.F77 b/src/CheckParameters.F77 deleted file mode 100644 index ccf9fbb..0000000 --- a/src/CheckParameters.F77 +++ /dev/null @@ -1,52 +0,0 @@ - /*@@ - @file CheckParameters.F77 - @date - @author Gabrielle Allen - @desc - Check parameters for the wave equation evolver - @enddesc - @@*/ - -#include "cctk.h" -#include "cctk_parameters.h" -#include "cctk_arguments.h" - - - /*@@ - @routine WaveToyF77_CheckParameters - @date - @author Gabrielle Allen - @desc - Check parameters for the wave equation evolver - @enddesc - @calls - @calledby - @history - - @endhistory - -@@*/ - - subroutine WaveToyF77_CheckParameters(CCTK_FARGUMENTS) - - implicit none - - DECLARE_CCTK_FARGUMENTS - DECLARE_CCTK_PARAMETERS - - INTEGER CCTK_Equals - - if (CCTK_Equals(initial_data,"box").eq.1) then - - if (CCTK_Equals(type, "box").eq.0) then - call CCTK_PARAMWARN("Must have a box grid with box initial data") - end if - - if (kx.eq.0 .or. ky.eq.0 .or. kz.eq.0) then - call CCTK_PARAMWARN("Cannot have zero kx,ky,kz for box initial data") - end if - - end if - - return - end diff --git a/src/InitialData.F77 b/src/InitialData.F77 deleted file mode 100644 index c435187..0000000 --- a/src/InitialData.F77 +++ /dev/null @@ -1,126 +0,0 @@ - /*@@ - @file InitialData.F77 - @date - @author Tom Goodale - @desc - Initial data for the 3D Wave Equation - @enddesc - @@*/ - -#include "cctk.h" -#include "cctk_parameters.h" -#include "cctk_arguments.h" - - - - /*@@ - @routine WaveToyF77_InitialData - @date - @author Tom Goodale - @desc - Set up initial data for the wave equation - @enddesc - @calls - @calledby - @history - - @endhistory - -@@*/ - - subroutine WaveToyF77_InitialData(CCTK_FARGUMENTS) - - implicit none - - DECLARE_CCTK_FARGUMENTS - DECLARE_CCTK_PARAMETERS - - INTEGER CCTK_Equals - - INTEGER i,j,k - CCTK_REAL dt,omega, pi - CCTK_REAL min_delta,dx,dy,dz - - pi = 4.0*atan(1.0) - -c Grid spacing shortcuts -c ---------------------- - dx = cctk_delta_space(1) - dy = cctk_delta_space(2) - dz = cctk_delta_space(3) - -c Calculate timestep -c ------------------ - min_delta = min(dx,dy,dz) - cctk_delta_time = dtfac*min_delta - dt = cctk_delta_time - - omega = sqrt(kx**2+ky**2+kz**2) - - if (CCTK_Equals(initial_data,"plane").eq.1) then - - do k=1,cctk_lsh(3) - do j=1,cctk_lsh(2) - do i=1,cctk_lsh(1) - - phi(i,j,k) = amplitude*cos(kx*x(i,j,k)+ky*y(i,j,k) - & +kz*z(i,j,k)+omega*cctk_time) - phi_old(i,j,k) = amplitude*cos(kx*x(i,j,k)+ky*y(i,j,k) - & +kz*z(i,j,k)+omega*(cctk_time-dt)) - - end do - end do - end do - - else if (CCTK_Equals(initial_data,"gaussian").eq.1) then - - do k=1,cctk_lsh(3) - do j=1,cctk_lsh(2) - do i=1,cctk_lsh(1) - - phi(i,j,k) = amplitude*exp( -(sqrt(x(i,j,k)**2 - & +y(i,j,k)**2+z(i,j,k)**2)-radius)**2/sigma**2) - phi_old(i,j,k) = amplitude*exp( -(sqrt(x(i,j,k)**2 - & +y(i,j,k)**2+z(i,j,k)**2)-radius-dt)**2/sigma**2) - - end do - end do - end do - - else if (CCTK_Equals(initial_data, "box").eq.1) then - -c Use kx,ky,kz as number of modes in each direction. - - do k=1,cctk_lsh(3) - do j=1,cctk_lsh(2) - do i=1,cctk_lsh(1) - - phi(i,j,k) = amplitude*sin(kx*(x(i,j,k)-0.5)*pi)* - $ sin(ky*(y(i,j,k)-0.5)*pi)* - $ sin(kz*(z(i,j,k)-0.5)*pi)* - $ cos(omega*cctk_time*pi) - - phi_old(i,j,k)= amplitude*sin(kx*(x(i,j,k)-0.5)*pi)* - $ sin(ky*(y(i,j,k)-0.5)*pi)* - $ sin(kz*(z(i,j,k)-0.5)*pi)* - $ cos(omega*(cctk_time-dt)*pi) - - - end do - end do - end do - - end if - -c Apply symmetry boundary conditions -c ---------------------------------- - call ApplySymmetry(cctkGH,"wavetoy::scalarevolve") - -c Synchronise -c ----------- - call CCTK_SyncGroup(cctkGH,"wavetoy::scalarevolve") - - return - end - - diff --git a/src/WaveToy.F77 b/src/WaveToy.F77 index 82f45b4..40636bb 100644 --- a/src/WaveToy.F77 +++ b/src/WaveToy.F77 @@ -47,7 +47,7 @@ c Set the stencil width if (CCTK_EQUALS(bound,"flat")) then call ApplyFlatBC(cctkGH,sw,"wavetoy::phi") else if (CCTK_Equals(bound,"radiation").eq.1) then - call ApplyRadiativeBC(cctkGH,1.0,sw,"wavetoy::phi","wavetoyf77::phi_old") + call ApplyRadiativeBC(cctkGH,1.0,sw,"wavetoy::phi","wavetoy::phi_old") end if return diff --git a/src/make.code.defn b/src/make.code.defn index 9ae50a6..c0dcc01 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = InitialData.F77 InitSymBound.F77 CheckParameters.F77 WaveToy.F77 Startup.c +SRCS = InitSymBound.F77 WaveToy.F77 Startup.c # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3