/*@@ @file InitialData.c @date @author Werner Benger @desc Initial data for the 3D Wave Equation Derived from Tom Goodale @enddesc @version $Id$ @@*/ #include #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusWave_IDScalarWaveC_InitialData_c) #define SQR(val) ((val) * (val)) void IDScalarWaveC_InitialData(CCTK_ARGUMENTS); /*@@ @routine IDScalarWaveC_InitialData @date @author Tom Goodale @desc Set up initial data for the wave equation @enddesc @history @hdate Mon Oct 11 11:48:03 1999 @hauthor Werner Benger @hdesc Converted to C++ @hdate Mon Oct 11 11:48:20 1999 @hauthor Tom Goodale @hdesc Added the rest of the initial data. @hdate Thu Feb 17 09:22:01 2000 @hauthor Tom Goodale @hdesc Converted to C @endhistory @@*/ void IDScalarWaveC_InitialData(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS int i,j,k; CCTK_REAL dt; CCTK_REAL omega; int vindex; CCTK_REAL X, Y, Z, R; CCTK_REAL pi; dt = CCTK_DELTA_TIME; if(CCTK_Equals(initial_data, "plane")) { omega = sqrt(SQR(kx)+SQR(ky)+SQR(kz)); for(k=0; k