diff options
author | jthorn <jthorn@6a3ddf76-46e1-4315-99d9-bc56cac1ef84> | 2003-03-24 13:31:01 +0000 |
---|---|---|
committer | jthorn <jthorn@6a3ddf76-46e1-4315-99d9-bc56cac1ef84> | 2003-03-24 13:31:01 +0000 |
commit | cb6d5b1e2cfd358471f5a3df47cc98b437eb49bb (patch) | |
tree | cc83cb0029ba14e0aee07a7255faf1f2dac8e6eb /src/Schwarzschild.c | |
parent | ceff4da9c00df3cf482cbbcfb2d447e9ee3eb7d0 (diff) |
Change from using memset() to using a new function
IDAnalyticBH_zero_CCTK_REAL_array() when setting a grid array to all zeros.
This is necessary because memset() gives all bits 0, but we want
floating point (CCTK_REAL) 0.0, which might be a different bit pattern.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDAnalyticBH/trunk@126 6a3ddf76-46e1-4315-99d9-bc56cac1ef84
Diffstat (limited to 'src/Schwarzschild.c')
-rw-r--r-- | src/Schwarzschild.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Schwarzschild.c b/src/Schwarzschild.c index 4fc33dd..a29d4b7 100644 --- a/src/Schwarzschild.c +++ b/src/Schwarzschild.c @@ -15,6 +15,8 @@ #include "cctk_Arguments.h" #include "cctk_Parameters.h" +#include "IDAnalyticBH.h" + static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusEinstein_IDAnalyticBH_Schwarzschild_c) @@ -113,10 +115,10 @@ void Schwarzschild(CCTK_ARGUMENTS) } /* time symmetric initial slice */ - memset (kxx, 0, npoints * sizeof (CCTK_REAL)); - memset (kxy, 0, npoints * sizeof (CCTK_REAL)); - memset (kxz, 0, npoints * sizeof (CCTK_REAL)); - memset (kyy, 0, npoints * sizeof (CCTK_REAL)); - memset (kyz, 0, npoints * sizeof (CCTK_REAL)); - memset (kzz, 0, npoints * sizeof (CCTK_REAL)); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kxx); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kxy); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kxz); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kyy); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kyz); + IDAnalyticBH_zero_CCTK_REAL_array(npoints, kzz); } |