/*@@ @file InitialData.cc @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 char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusWave_IDScalarWaveCXX_InitialData_cc) inline CCTK_REAL square(CCTK_REAL val) { return val*val; } /*@@ @routine IDScalarWave_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. @endhistory @@*/ extern "C" void IDScalarWaveCXX_InitialData(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS DECLARE_CCTK_PARAMETERS CCTK_REAL dt = CCTK_DELTA_TIME; if(CCTK_Equals(initial_data, "plane")) { CCTK_REAL omega = sqrt(square(kx)+square(ky)+square(kz)); for(int k=0; k