[Users] [Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 319)

Erik Schnetter schnetter at cct.lsu.edu
Sat May 12 15:20:58 CDT 2012


Thanks!

The real problem lies in multi-argument functions such as max or sign.
Fortran requires that all arguments have the same type, so sign(-1.d0,
dpress(i)) works only in double precision. abs(1.0d0 - flatten) works
for all precisions, although (if flatten has single precision) the
calculation would be performed in double precision -- unintended, but
not a compiler error.

-erik

On Sat, May 12, 2012 at 12:34 PM, Bruno C. Mundim <bcmsma at astro.rit.edu> wrote:
> On 05/11/2012 06:46 PM, schnetter at cct.lsu.edu wrote:
>> @@ -478,7 +480,7 @@
>>        end do
>>         else  !!$ Really implement C&W, page 197; which requires stencil 4.
>>        do i = 4, nx - 3
>> -         s=sign(1.d0, -dpress(i))
>> +         s=sign(one, -dpress(i))
>>           flatten = max(tilde_flatten(i), tilde_flatten(i+s))
>>           if (abs(1.d0 - flatten)>  0.d0) then
>>              trivial_rp(i-1) = .false.
> Hi Erik,
>
> you missed the line above: if (abs(1.d0 - flatten)>  0.d0) then
>
> Cheers,
> Bruno.
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/


More information about the Users mailing list