aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorbzink <>2004-05-11 10:53:00 +0000
committerbzink <>2004-05-11 10:53:00 +0000
commit02151eddf45b4dd6fb747cccb12fbd20bcbab55c (patch)
tree3c0601c693a90d7dbccaf7d28b4beb9461395284 /Carpet
parent4a96e83584bf1bf1a2b14fbd6bde28ff89a293c9 (diff)
Replaced some time comparison asserts by a (hopefully) more robust choice.
- bzink darcs-hash:20040511105326-5b8bb-7120c4b070169b13fd49d63a783cce544482dc68.gz
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/ggf.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/ggf.cc b/Carpet/CarpetLib/src/ggf.cc
index c273551e9..b255343c8 100644
--- a/Carpet/CarpetLib/src/ggf.cc
+++ b/Carpet/CarpetLib/src/ggf.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/ggf.cc,v 1.41 2004/05/11 07:53:04 bzink Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/ggf.cc,v 1.42 2004/05/11 12:53:26 bzink Exp $
#include <assert.h>
#include <stdlib.h>
@@ -523,7 +523,8 @@ void ggf<D>::mg_restrict (comm_state<D>& state,
CCTK_REAL time)
{
// Require same times
- assert (t.get_time(rl,ml) == t.get_time(rl,ml-1));
+ assert (abs(t.get_time(rl,ml) - t.get_time(rl,ml-1))
+ <= 1.0e-8 * abs(t.get_time(rl,ml)));
const vector<int> tl2s(1,tl);
intercat (state,
tl ,rl,c,ml, &dh<D>::dboxes::recv_mg_coarse,
@@ -538,7 +539,8 @@ void ggf<D>::mg_prolongate (comm_state<D>& state,
CCTK_REAL time)
{
// Require same times
- assert (t.get_time(rl,ml) == t.get_time(rl,ml+1));
+ assert (abs(t.get_time(rl,ml) - t.get_time(rl,ml+1))
+ <= 1.0e-8 * abs(t.get_time(rl,ml)));
const vector<int> tl2s(1,tl);
intercat (state,
tl ,rl,c,ml, &dh<D>::dboxes::recv_mg_coarse,
@@ -553,7 +555,8 @@ void ggf<D>::ref_restrict (comm_state<D>& state,
CCTK_REAL time)
{
// Require same times
- // assert (t.get_time(rl,ml) == t.get_time(rl+1,ml));
+ assert (abs(t.get_time(rl,ml) - t.get_time(rl+1,ml))
+ <= 1.0e-8 * abs(t.get_time(rl,ml)));
if (transport_operator == op_none) return;
const vector<int> tl2s(1,tl);
intercat (state,