From 3c2d0f490a034cc48e27fce313fcfbce4daf7fd8 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 12 Mar 2021 18:33:45 -0500 Subject: [PATCH] Rearrange some code. ZeroFunction inherits from ConstantFunction so it logically should be defined afterwards. --- include/deal.II/base/function.templates.h | 27 +++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/deal.II/base/function.templates.h b/include/deal.II/base/function.templates.h index 24933e819c..313ce62b63 100644 --- a/include/deal.II/base/function.templates.h +++ b/include/deal.II/base/function.templates.h @@ -317,18 +317,6 @@ Function::memory_consumption() const -//--------------------------------------------------------------------------- - -namespace Functions -{ - template - ZeroFunction::ZeroFunction( - const unsigned int n_components) - : ConstantFunction(RangeNumberType(), n_components) - {} - -} // namespace Functions - //--------------------------------------------------------------------------- namespace Functions @@ -341,6 +329,8 @@ namespace Functions , function_value_vector(n_components, value) {} + + template ConstantFunction::ConstantFunction( const std::vector &values) @@ -349,6 +339,7 @@ namespace Functions {} + template ConstantFunction::ConstantFunction( const Vector &values) @@ -361,6 +352,7 @@ namespace Functions } + template ConstantFunction::ConstantFunction( const RangeNumberType *begin_ptr, @@ -465,6 +457,7 @@ namespace Functions } + template void ConstantFunction::vector_gradient( @@ -479,6 +472,7 @@ namespace Functions } + template void ConstantFunction::gradient_list( @@ -494,6 +488,7 @@ namespace Functions } + template void ConstantFunction::vector_gradient_list( @@ -530,6 +525,14 @@ namespace Functions { return 0; } + + + + template + ZeroFunction::ZeroFunction( + const unsigned int n_components) + : ConstantFunction(RangeNumberType(), n_components) + {} } // namespace Functions //--------------------------------------------------------------------------- -- 2.39.5