[cig-commits] r5086 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Oct 25 07:05:55 PDT 2006
Author: willic3
Date: 2006-10-25 07:05:55 -0700 (Wed, 25 Oct 2006)
New Revision: 5086
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/rtsafe.f
Log:
Put in return for case where root-finding algorithm finds the exact
root (to machine precision) during function evaluation. Original
algorithm did not seem to detect this case and took many more iterations
to converge.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/rtsafe.f
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/rtsafe.f 2006-10-25 04:58:34 UTC (rev 5085)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/libpylith3d/rtsafe.f 2006-10-25 14:05:55 UTC (rev 5086)
@@ -105,6 +105,12 @@
endif
if(abs(dx).lt.xacc) return
call func(rtsafe,f,df,rpar,nrpar,ipar,nipar)
+c
+c... put this in because original code didn't seem to deal with the
+c case where the current value is already the root to machine
+c precision.
+c
+ if(f.eq.0.0d0) return
if(f.lt.0.0d0) then
xl=rtsafe
else
More information about the cig-commits
mailing list