From: guido Date: Sun, 2 Jul 2000 03:29:25 +0000 (+0000) Subject: accept lack of isnan X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3569e15f9f5f0f562eb00c1a1e8d53aaeb8993de;p=dealii-svn.git accept lack of isnan git-svn-id: https://svn.dealii.org/trunk@3117 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index fb1b0b93eb..f4a76f5a74 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -126,9 +126,9 @@ dnl Usage: DEAL_II_CHECK_ISNAN dnl AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl DEAL_II_CHECK_ISNAN_FLAG(debug, $CXXFLAGSG, - CXXFLAGSG="$CXXFLAGSG $deal_II_isnan_flag") + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG") DEAL_II_CHECK_ISNAN_FLAG(optimized, $CXXFLAGSO, - CXXFLAGSO="$CXXFLAGSO $deal_II_isnan_flag") + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO") ) @@ -154,6 +154,8 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl ], [ AC_MSG_RESULT("yes") + deal_II_isnan_flag="-DHAVE_ISNAN" + $3 ], [ dnl We need to define something. Unfortunately, this is system @@ -170,7 +172,7 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl isnan (d); ], [ - deal_II_isnan_flag=$testflag + deal_II_isnan_flag="-DHAVE_ISNAN $testflag" break; ], [ @@ -181,12 +183,12 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl dnl the library will not be compilable on this platform dnl without knowledge of the right flag if test "$deal_II_isnan_flag" = "" ; then - AC_MSG_RESULT(no. no such flag found. aborting) - exit 1 - fi + AC_MSG_RESULT(no.) + else - dnl we found something, lets us it - AC_MSG_RESULT(using $testflag) - $3 + dnl we found something, lets us it + AC_MSG_RESULT(using $testflag) + $3 + fi ]) ) diff --git a/deal.II/configure b/deal.II/configure index 4c13e769fe..e193de7123 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.28 +# From configure.in Revision: 1.29 @@ -1689,6 +1689,8 @@ if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; rm -rf conftest* echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_ISNAN" + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" else echo "configure: failed program was:" >&5 @@ -1699,7 +1701,7 @@ else for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSG $testflag" cat > conftest.$ac_ext < @@ -1711,10 +1713,10 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - deal_II_isnan_flag=$testflag + deal_II_isnan_flag="-DHAVE_ISNAN $testflag" break; else @@ -1728,22 +1730,22 @@ rm -f conftest* done if test "$deal_II_isnan_flag" = "" ; then - echo "$ac_t""no. no such flag found. aborting" 1>&6 - exit 1 - fi + echo "$ac_t""no." 1>&6 + else - echo "$ac_t""using $testflag" 1>&6 - CXXFLAGSG="$CXXFLAGSG $deal_II_isnan_flag" + echo "$ac_t""using $testflag" 1>&6 + CXXFLAGSG="$deal_II_isnan_flag $CXXFLAGSG" + fi fi rm -f conftest* echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:1743: checking whether isnan is declared with optimized flags" >&5 +echo "configure:1745: checking whether isnan is declared with optimized flags" >&5 CXXFLAGS=$CXXFLAGSO cat > conftest.$ac_ext < @@ -1755,10 +1757,12 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 + deal_II_isnan_flag="-DHAVE_ISNAN" + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" else echo "configure: failed program was:" >&5 @@ -1769,7 +1773,7 @@ else for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSO $testflag" cat > conftest.$ac_ext < @@ -1781,10 +1785,10 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - deal_II_isnan_flag=$testflag + deal_II_isnan_flag="-DHAVE_ISNAN $testflag" break; else @@ -1798,12 +1802,12 @@ rm -f conftest* done if test "$deal_II_isnan_flag" = "" ; then - echo "$ac_t""no. no such flag found. aborting" 1>&6 - exit 1 - fi + echo "$ac_t""no." 1>&6 + else - echo "$ac_t""using $testflag" 1>&6 - CXXFLAGSO="$CXXFLAGSO $deal_II_isnan_flag" + echo "$ac_t""using $testflag" 1>&6 + CXXFLAGSO="$deal_II_isnan_flag $CXXFLAGSO" + fi fi rm -f conftest* @@ -1827,16 +1831,16 @@ esac CXXFLAGS="$CXXFLAGSG" echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6 -echo "configure:1831: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:1835: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -1854,16 +1858,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:1858: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:1862: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 diff --git a/deal.II/lac/source/solver_control.cc b/deal.II/lac/source/solver_control.cc index e13abc3c85..60bc3787d5 100644 --- a/deal.II/lac/source/solver_control.cc +++ b/deal.II/lac/source/solver_control.cc @@ -66,8 +66,11 @@ SolverControl::check (const unsigned int step, if ((step >= maxsteps) || - (check_failure && ((check_value > failure_residual) || - isnan(check_value)))) + (check_failure && ((check_value > failure_residual) +#ifdef HAVE_ISNAN + || isnan(check_value) +#endif + ))) { if (_log_result) deallog << "Failure step " << step