[Carpet] Bugzilla Bug 118
Ian Hinder
hinder at gravity.psu.edu
Wed May 14 02:42:00 CEST 2008
Erik Schnetter wrote:
> On May 2, 2008, at 17:50:53, Ian Hinder wrote:
>
>> Ian Hinder wrote:
>>
>>> The eps with which the times are being compared in CarpetLib is 1e-12,
>>> but the two times here are different by 1.36e-12, so the error is
>>> triggered. I am rerunning with a larger eps value to make sure nothing
>>> else is wrong. This happens at t = 586.500 - I don't know why Carpet is
>>> saying 2736.
>>
>> The run with the larger eps value passed the point at which the old run
>> crashed.
>
>
> Ian,
>
> I found the source of the problem. This comparison expects an absolute
> accuracy of 1e-12, which is obviously wrong, it should requite 1e-12 as
> relative accuracy. Burkhard Zink just came across a similar error in
> Carpet. I expect to push corrections soon.
I just had a similar problem with the following code. Is it the same
problem? This is in Evolve.cc, line 374. It asserts on the comparison
with eps.
// Advance times
cctkGH->cctk_time
= (global_time
- delta_time / maxtimereflevelfact
+ delta_time * mglevelfact / timereflevelfact);
CCTK_REAL const carpet_time = cctkGH->cctk_time / delta_time;
for (int m=0; m<maps; ++m) {
vtt.at(m)->advance_time (reflevel, mglevel);
CCTK_REAL const eps = 1.0e-12;
static_assert (abs(0.1) > 0,
"Function CarpetLib::abs has wrong
signature");
CCTK_REAL const level_time =
vtt.at(m)->get_time (reflevel, mglevel);
assert (abs (level_time - carpet_time) < eps);
vtt.at(m)->set_time (reflevel, mglevel, carpet_time);
}
>
> -erik
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> developers mailing list
> developers at lists.carpetcode.org
> http://lists.carpetcode.org/listinfo/developers
--
Ian Hinder
hinder at gravity.psu.edu
http://www.gravity.psu.edu/~hinder
More information about the developers
mailing list