From b728565aaa12282846d658d7837b32511cd23cee Mon Sep 17 00:00:00 2001 From: werner Date: Mon, 11 Oct 1999 08:37:23 +0000 Subject: WaveToy Initial data in C++ (only gaussian initial data here for easyness) git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/IDScalarWaveCXX/trunk@2 7ec00dc9-1e7a-42ad-bf73-a299ee168e72 --- src/InitialData.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/make.code.defn | 9 +++++++ 2 files changed, 82 insertions(+) create mode 100644 src/InitialData.cc create mode 100644 src/make.code.defn (limited to 'src') diff --git a/src/InitialData.cc b/src/InitialData.cc new file mode 100644 index 0000000..c8d790d --- /dev/null +++ b/src/InitialData.cc @@ -0,0 +1,73 @@ + /*@@ + @file InitialData.cc + @date + @author Werner Benger + @desc + Initial data for the 3D Wave Equation + Derived from Tom Goodale + @enddesc + @@*/ + +#include "cctk.h" +#include "cctk_Flesh.h" +#include "cctk_parameters.h" +#include "cctk_Groups.h" +#include "cctk_arguments.h" +#include "cctk_Comm.h" + +#include "CactusBase/CartGrid3D/src/Symmetry.h" + +#include + +inline double sqr(double val) +{ + return val*val; +} + + + /*@@ + @routine IDScalarWave_InitialData + @date + @author Tom Goodale + @desc + Set up initial data for the wave equation + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ + +extern "C" void IDScalarWaveCXX_InitialData(CCTK_CARGUMENTS) +{ + DECLARE_CCTK_CARGUMENTS + DECLARE_CCTK_PARAMETERS + + for(int k=0; k