# define DEAL_VOLATILE
#endif
-
-/**
- * Have a namespace into which we declare some numeric constants, such
- * as pi. Unfortunately, these are not always available, on all systems
- * or depending on compiler flags, so we duplicate their declarations
- * here to make them unconditionally available to all other parts of the
- * library.
- *
- * The constants defined here are a subset of the <tt>M_XXX</tt> constants
- * sometimes declared in the system include file <tt>math.h</tt>, but without
- * the prefix <tt>M_</tt>.
- *
- * In addition to that, we declare <tt>invalid_unsigned_int</tt> to be the
- * largest unsigned integer representable; this value is widely used in
- * the library as a marker for an invalid index, an invalid size of an
- * array, and similar purposes.
- */
-namespace deal_II_numbers {
- /**
- * Representation of the
- * largest number that
- * can be put into an
- * unsigned integer. This
- * value is widely used
- * throughout the library
- * as a marker for an
- * invalid unsigned
- * integer value, such as
- * an invalid array
- * index, an invalid
- * array size, and the
- * like.
- */
- static const unsigned int
- invalid_unsigned_int = static_cast<unsigned int> (-1);
-
- /**
- * e
- */
- static const double E = 2.7182818284590452354;
-
- /**
- * log_2 e
- */
- static const double LOG2E = 1.4426950408889634074;
-
- /**
- * log_10 e
- */
- static const double LOG10E = 0.43429448190325182765;
-
- /**
- * log_e 2
- */
- static const double LN2 = 0.69314718055994530942;
-
- /**
- * log_e 10
- */
- static const double LN10 = 2.30258509299404568402;
-
- /**
- * pi
- */
- static const double PI = 3.14159265358979323846;
-
- /**
- * pi/2
- */
- static const double PI_2 = 1.57079632679489661923;
-
- /**
- * pi/4
- */
- static const double PI_4 = 0.78539816339744830962;
-
- /**
- * sqrt(2)
- */
- static const double SQRT2 = 1.41421356237309504880;
-
- /**
- * 1/sqrt(2)
- */
- static const double SQRT1_2 = 0.70710678118654752440;
-}
+#include <base/numbers.h>
#endif
/**
* Namespace for the declaration of universal constants. Since the
* availability in <tt>math.h</tt> is not always guaranteed, we put
- * them here.
+ * them here. Since this file is included by <tt>base/config.h</tt>,
+ * they are available to the whole library.
*
* The constants defined here are a subset of the <tt>M_XXX</tt> constants
* sometimes declared in the system include file <tt>math.h</tt>, but without
* largest unsigned integer representable; this value is widely used in
* the library as a marker for an invalid index, an invalid size of an
* array, and similar purposes.
- *
- * Most of the members of this namespace are defined in
- * <tt>base/config.h</tt>. Nevertheless, the inline functions are in
- * <tt>base/numbers.h</tt>.
*/
-namespace deal_II_numbers
-{
- /**
+namespace deal_II_numbers {
+ /**
+ * Representation of the
+ * largest number that
+ * can be put into an
+ * unsigned integer. This
+ * value is widely used
+ * throughout the library
+ * as a marker for an
+ * invalid unsigned
+ * integer value, such as
+ * an invalid array
+ * index, an invalid
+ * array size, and the
+ * like.
+ */
+ static const unsigned int
+ invalid_unsigned_int = static_cast<unsigned int> (-1);
+
+ /**
+ * e
+ */
+ static const double E = 2.7182818284590452354;
+
+ /**
+ * log_2 e
+ */
+ static const double LOG2E = 1.4426950408889634074;
+
+ /**
+ * log_10 e
+ */
+ static const double LOG10E = 0.43429448190325182765;
+
+ /**
+ * log_e 2
+ */
+ static const double LN2 = 0.69314718055994530942;
+
+ /**
+ * log_e 10
+ */
+ static const double LN10 = 2.30258509299404568402;
+
+ /**
+ * pi
+ */
+ static const double PI = 3.14159265358979323846;
+
+ /**
+ * pi/2
+ */
+ static const double PI_2 = 1.57079632679489661923;
+
+ /**
+ * pi/4
+ */
+ static const double PI_4 = 0.78539816339744830962;
+
+ /**
+ * sqrt(2)
+ */
+ static const double SQRT2 = 1.41421356237309504880;
+
+ /**
+ * 1/sqrt(2)
+ */
+ static const double SQRT1_2 = 0.70710678118654752440;
+
+ /**
* Return @p true if the given
* value is a finite floating point
* number, i.e. is neither plus or
* minus infinity nor NaN (not a
* number).
*/
-
- inline bool is_finite (const double x)
- {
-#ifdef DEAL_II_HAVE_ISFINITE
- return std::isfinite (x);
-#else
- // check against infinities. not
- // that if x is a NaN, then both
- // comparisons will be false
- return ((x >= std::numeric_limits<double>::min())
- &&
- (x <= std::numeric_limits<double>::max()));
-#endif
- }
+ bool is_finite (const double x);
}
#endif
--- /dev/null
+//---------------------------------------------------------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 2006 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+#include <base/config.h>
+#include <cmath>
+#include <limits>
+
+
+namespace deal_II_numbers
+{
+ bool is_finite (const double x)
+ {
+#ifdef DEAL_II_HAVE_ISFINITE
+ return std::isfinite (x);
+#else
+ // check against infinities. not
+ // that if x is a NaN, then both
+ // comparisons will be false
+ return ((x >= std::numeric_limits<double>::min())
+ &&
+ (x <= std::numeric_limits<double>::max()));
+#endif
+ }
+}
# define DEAL_VOLATILE
#endif
-
-namespace deal_II_numbers {
- /**
- * Representation of the
- * largest number that
- * can be put into an
- * unsigned integer. This
- * value is widely used
- * throughout the library
- * as a marker for an
- * invalid unsigned
- * integer value, such as
- * an invalid array
- * index, an invalid
- * array size, and the
- * like.
- */
- static const unsigned int
- invalid_unsigned_int = static_cast<unsigned int> (-1);
-
- /**
- * e
- */
- static const double E = 2.7182818284590452354;
-
- /**
- * log_2 e
- */
- static const double LOG2E = 1.4426950408889634074;
-
- /**
- * log_10 e
- */
- static const double LOG10E = 0.43429448190325182765;
-
- /**
- * log_e 2
- */
- static const double LN2 = 0.69314718055994530942;
-
- /**
- * log_e 10
- */
- static const double LN10 = 2.30258509299404568402;
-
- /**
- * pi
- */
- static const double PI = 3.14159265358979323846;
-
- /**
- * pi/2
- */
- static const double PI_2 = 1.57079632679489661923;
-
- /**
- * pi/4
- */
- static const double PI_4 = 0.78539816339744830962;
-
- /**
- * sqrt(2)
- */
- static const double SQRT2 = 1.41421356237309504880;
-
- /**
- * 1/sqrt(2)
- */
- static const double SQRT1_2 = 0.70710678118654752440;
-}
+#include <base/numbers.h>
#endif
])
#include <base/config.h>
-#include <base/numbers.h>
#include <base/table.h>
#include <base/smartpointer.h>
#include <lac/block_indices.h>
#include <base/config.h>
-#include <base/numbers.h>
#include <base/table.h>
#include <lac/exceptions.h>
#include <base/config.h>
-#include <base/numbers.h>
#include <base/subscriptor.h>
#include <base/smartpointer.h>
#include <lac/sparsity_pattern.h>
#include <base/config.h>
-#include <base/numbers.h>
#include <base/subscriptor.h>
#include <base/smartpointer.h>
#include <lac/exceptions.h>
#include <base/config.h>
-#include <base/numbers.h>
#include <base/exceptions.h>
#include <base/subscriptor.h>