]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rearrange some code.
authorDavid Wells <drwells@email.unc.edu>
Fri, 12 Mar 2021 23:33:45 +0000 (18:33 -0500)
committerDavid Wells <drwells@email.unc.edu>
Fri, 12 Mar 2021 23:43:59 +0000 (18:43 -0500)
ZeroFunction inherits from ConstantFunction so it logically should be defined
afterwards.

include/deal.II/base/function.templates.h

index 24933e819c716f51e59e5e2f92c4202d6dfbe108..313ce62b6326efc846c8d608e4a9d84420013340 100644 (file)
@@ -317,18 +317,6 @@ Function<dim, RangeNumberType>::memory_consumption() const
 
 
 
-//---------------------------------------------------------------------------
-
-namespace Functions
-{
-  template <int dim, typename RangeNumberType>
-  ZeroFunction<dim, RangeNumberType>::ZeroFunction(
-    const unsigned int n_components)
-    : ConstantFunction<dim, RangeNumberType>(RangeNumberType(), n_components)
-  {}
-
-} // namespace Functions
-
 //---------------------------------------------------------------------------
 
 namespace Functions
@@ -341,6 +329,8 @@ namespace Functions
     , function_value_vector(n_components, value)
   {}
 
+
+
   template <int dim, typename RangeNumberType>
   ConstantFunction<dim, RangeNumberType>::ConstantFunction(
     const std::vector<RangeNumberType> &values)
@@ -349,6 +339,7 @@ namespace Functions
   {}
 
 
+
   template <int dim, typename RangeNumberType>
   ConstantFunction<dim, RangeNumberType>::ConstantFunction(
     const Vector<RangeNumberType> &values)
@@ -361,6 +352,7 @@ namespace Functions
   }
 
 
+
   template <int dim, typename RangeNumberType>
   ConstantFunction<dim, RangeNumberType>::ConstantFunction(
     const RangeNumberType *begin_ptr,
@@ -465,6 +457,7 @@ namespace Functions
   }
 
 
+
   template <int dim, typename RangeNumberType>
   void
   ConstantFunction<dim, RangeNumberType>::vector_gradient(
@@ -479,6 +472,7 @@ namespace Functions
   }
 
 
+
   template <int dim, typename RangeNumberType>
   void
   ConstantFunction<dim, RangeNumberType>::gradient_list(
@@ -494,6 +488,7 @@ namespace Functions
   }
 
 
+
   template <int dim, typename RangeNumberType>
   void
   ConstantFunction<dim, RangeNumberType>::vector_gradient_list(
@@ -530,6 +525,14 @@ namespace Functions
   {
     return 0;
   }
+
+
+
+  template <int dim, typename RangeNumberType>
+  ZeroFunction<dim, RangeNumberType>::ZeroFunction(
+    const unsigned int n_components)
+    : ConstantFunction<dim, RangeNumberType>(RangeNumberType(), n_components)
+  {}
 } // namespace Functions
 
 //---------------------------------------------------------------------------

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.