aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorallen <allen@4451c3c6-1034-4891-99ea-21147727ccdf>1999-07-29 16:38:11 +0000
committerallen <allen@4451c3c6-1034-4891-99ea-21147727ccdf>1999-07-29 16:38:11 +0000
commit4347cd9b24c30c77bb7a16944e8e049789404af8 (patch)
treeca91731ad80bf159a04934e0326ac92ae442e0a7 /src
parent22adce91cfeddd17ea4874eebbc1fcdc6c288f9e (diff)
You can now run with both WaveToyF77 and WaveToyF90 and compiled (!)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveToyF77/trunk@7 4451c3c6-1034-4891-99ea-21147727ccdf
Diffstat (limited to 'src')
-rw-r--r--src/CheckParameters.F52
-rw-r--r--src/InitSymBound.F773
-rw-r--r--src/InitialData.F126
-rw-r--r--src/InitialData.F774
-rw-r--r--src/WaveToy.F778
5 files changed, 7 insertions, 186 deletions
diff --git a/src/CheckParameters.F b/src/CheckParameters.F
deleted file mode 100644
index c2dec7e..0000000
--- a/src/CheckParameters.F
+++ /dev/null
@@ -1,52 +0,0 @@
- /*@@
- @file CheckParameters.F
- @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 WaveToy_CheckParameters
- @date
- @author Gabrielle Allen
- @desc
- Check parameters for the wave equation evolver
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-
- subroutine WaveToy_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/InitSymBound.F77 b/src/InitSymBound.F77
index 680323b..9ea3fd4 100644
--- a/src/InitSymBound.F77
+++ b/src/InitSymBound.F77
@@ -39,8 +39,7 @@
sym(2) = one
sym(3) = one
- call SetCartSymmetry(cctkGH, sym,'wavetoyf77::phi')
- call SetCartSymmetry(cctkGH, sym,'wavetoyf77::phi_old')
+ call SetCartSymmetry(cctkGH, sym,'wavetoy::phi')
return
end
diff --git a/src/InitialData.F b/src/InitialData.F
deleted file mode 100644
index b7dfffd..0000000
--- a/src/InitialData.F
+++ /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 WaveToy_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")) 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(i,j,k)-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::scalarfields")
-
-c Synchronise
-c -----------
- call CCTK_SyncGroup(cctkGH,"wavetoy::scalarfields")
-
- return
- end
-
-
diff --git a/src/InitialData.F77 b/src/InitialData.F77
index 6a3a61e..c435187 100644
--- a/src/InitialData.F77
+++ b/src/InitialData.F77
@@ -114,11 +114,11 @@ c Use kx,ky,kz as number of modes in each direction.
c Apply symmetry boundary conditions
c ----------------------------------
- call ApplySymmetry(cctkGH,"wavetoy::scalarfields")
+ call ApplySymmetry(cctkGH,"wavetoy::scalarevolve")
c Synchronise
c -----------
- call CCTK_SyncGroup(cctkGH,"wavetoy::scalarfields")
+ call CCTK_SyncGroup(cctkGH,"wavetoy::scalarevolve")
return
end
diff --git a/src/WaveToy.F77 b/src/WaveToy.F77
index 330fec0..c4ac4cb 100644
--- a/src/WaveToy.F77
+++ b/src/WaveToy.F77
@@ -42,12 +42,12 @@ c Set the stencil width
sw(2)=1
sw(3)=1
- call ApplySymmetry(cctkGH,"wavetoyf77::scalarfields")
+ call ApplySymmetry(cctkGH,"wavetoy::scalarevolve")
if (CCTK_EQUALS(bound,"flat")) then
- call ApplyFlatBC(cctkGH,sw,"wavetoyf77::phi")
+ call ApplyFlatBC(cctkGH,sw,"wavetoy::phi")
else if (CCTK_Equals(bound,"radiation").eq.1) then
- call ApplyRadiativeBC(cctkGH,1.0,sw,"wavetoyf77::phi","wavetoyf77::phi_old")
+ call ApplyRadiativeBC(cctkGH,1.0,sw,"wavetoy::phi","wavetoyf77::phi_old")
end if
return
@@ -134,7 +134,7 @@ c -------------------------
c Synchronize
c -----------
- call CCTK_SyncGroup(cctkGH,"wavetoyf77::scalarfields")
+ call CCTK_SyncGroup(cctkGH,"wavetoy::scalarevolve")
return
end