diff options
author | allen <allen@ff385933-4943-42dc-877b-ffc776028de6> | 2001-12-27 19:12:06 +0000 |
---|---|---|
committer | allen <allen@ff385933-4943-42dc-877b-ffc776028de6> | 2001-12-27 19:12:06 +0000 |
commit | c460c841badb0b1f8e349725806451cba5a0695d (patch) | |
tree | 16ac1130f52a8d5bcfe03a31c2fe5b272986b860 | |
parent | 25a70e7aa4ba7781bd547b0857117c6b99f97e27 (diff) |
Fixing some logic errors which meant that variables without storage were
being nanchecked
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/NaNChecker/trunk@21 ff385933-4943-42dc-877b-ffc776028de6
-rw-r--r-- | src/NaNCheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/NaNCheck.c b/src/NaNCheck.c index b413564..ba5fba4 100644 --- a/src/NaNCheck.c +++ b/src/NaNCheck.c @@ -177,8 +177,8 @@ int NaNChecker_CheckVarsForNaN (const cGH *GH, return (-1); } - if (action_if_found && (! CCTK_Equals (action_if_found, "just warn") || - ! CCTK_Equals (action_if_found, "terminate") || + if (action_if_found && (! CCTK_Equals (action_if_found, "just warn") && + ! CCTK_Equals (action_if_found, "terminate") && ! CCTK_Equals (action_if_found, "abort"))) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, @@ -537,7 +537,7 @@ static void CheckForNaN (int vindex, const char *optstring, void *_info) /* check if variable has storage assigned */ gindex = CCTK_GroupIndexFromVarI (vindex); - if (CCTK_QueryGroupStorageI (info->GH, gindex)) + if (CCTK_QueryGroupStorageI (info->GH, gindex)<=0) { CCTK_VWarn (3, __LINE__, __FILE__, CCTK_THORNSTRING, "CheckForNaN: Ignoring variable '%s' (no storage)", fullname); @@ -739,7 +739,7 @@ static void SetToNaN (int vindex, const char *optstring, void *_info) /* check if variable has storage assigned */ gindex = CCTK_GroupIndexFromVarI (vindex); - if (CCTK_QueryGroupStorageI (info->GH, gindex)) + if (CCTK_QueryGroupStorageI (info->GH, gindex)<=0) { CCTK_VWarn (3, __LINE__, __FILE__, CCTK_THORNSTRING, "SetToNaN: Ignoring variable '%s' (no storage)", fullname); |