diff options
author | yye00 <yye00@6a3ddf76-46e1-4315-99d9-bc56cac1ef84> | 2004-08-12 22:10:39 +0000 |
---|---|---|
committer | yye00 <yye00@6a3ddf76-46e1-4315-99d9-bc56cac1ef84> | 2004-08-12 22:10:39 +0000 |
commit | 613b81a13931e84ffdfedeeefed8f76c6dc8ed2d (patch) | |
tree | 6b58e46fc34cedcd801ee0ec2eabe82b36d26d6f | |
parent | 044a53f57a3e4cab8731de93bcffb935b4dd9dc4 (diff) |
assert fix
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDAnalyticBH/trunk@154 6a3ddf76-46e1-4315-99d9-bc56cac1ef84
-rw-r--r-- | src/Misner_points.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Misner_points.c b/src/Misner_points.c index a3f57c0..a64907c 100644 --- a/src/Misner_points.c +++ b/src/Misner_points.c @@ -18,7 +18,7 @@ #include <stdlib.h> #include <stdio.h> -#include <assert.h> + #include <math.h> #include "cctk.h" @@ -100,7 +100,8 @@ void Misner_init(int n, CCTK_REAL mu, int terms) int i; CCTK_REAL pi,ang; - assert((nbholes=n) < MAXBHOLES); + if (! ((nbholes=n) < MAXBHOLES)) + CCTK_VWarn (0, __LINE__, __FILE__,"IDAnalyticBH", "Number of black holes exceed maximum number of black holes"); pi = 4.0*atan(1.); @@ -225,7 +226,8 @@ static void fill_iso(struct bhole *b, int n) return; } b->isos = (struct bhole *)malloc(sizeof(struct bhole)*(nbholes-1)); - assert(b->isos != 0); + if (! (b->isos != 0)) + CCTK_VWarn (0, __LINE__, __FILE__,"IDAnalyticBH", "error in function fill_iso"); for(j=0, i=0;i<nbholes;i++) { if(i != b->i) { |