]> https://gitweb.dealii.org/ - dealii.git/commitdiff
improve IncrementalFunction
authorDenis Davydov <davydden@gmail.com>
Tue, 30 Oct 2018 15:48:39 +0000 (16:48 +0100)
committerDenis Davydov <davydden@gmail.com>
Tue, 30 Oct 2018 15:49:54 +0000 (16:49 +0100)
include/deal.II/base/incremental_function.h
source/base/incremental_function.cc

index 0bce2c773c6f6630b01c710511759794b86db0b4..7ca4d13399f45f7e0f8f718f06e262fe963ef069 100644 (file)
@@ -68,11 +68,6 @@ namespace Functions
      */
     IncrementalFunction(Function<dim, RangeNumberType> &base);
 
-    /**
-     * Virtual destructor
-     */
-    virtual ~IncrementalFunction() = default;
-
     /**
      * Return the value of the function at the given point.
      *
index f5e23b1c40c2d4040ac91efc3b5ea0a06f5add5b..49bde1148c43165d6d59a91414343d4512ff1966 100644 (file)
@@ -14,6 +14,7 @@
 // ---------------------------------------------------------------------
 
 #include <deal.II/base/incremental_function.h>
+#include <deal.II/base/signaling_nan.h>
 
 #include <deal.II/lac/vector.h>
 
@@ -25,7 +26,7 @@ namespace Functions
   IncrementalFunction<dim, RangeNumberType>::IncrementalFunction(
     Function<dim, RangeNumberType> &base)
     : base(base)
-    , delta_t(time_type())
+    , delta_t(numbers::signaling_nan<time_type>())
     , values_old(base.n_components)
   {}
 
@@ -45,8 +46,9 @@ namespace Functions
 
   template <int dim, typename RangeNumberType>
   RangeNumberType
-  IncrementalFunction<dim, RangeNumberType>::value(const Point<dim> &p,
-                                                   unsigned int      comp) const
+  IncrementalFunction<dim, RangeNumberType>::value(
+    const Point<dim> & p,
+    const unsigned int comp) const
   {
     // Cache the time state of the base class in case it has been changed
     // within the user code. We reset the wrapped function to the original

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.