On 05/11/2012 06:46 PM, schnetter@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.
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@astro.rit.edu wrote:
On 05/11/2012 06:46 PM, schnetter@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@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
users@lists.einsteintoolkit.org