From 38fc31f1f987a328225451cc87cee6882b46b588 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 3 Jul 2015 16:55:37 +0200 Subject: [PATCH] Bugfix: Compile fixes for Functions::Polynomial Change dealii::Vector to std::vector to not have to include vector.h in function_lib.h. This fixes a compilation error encountered with several compilers. Further, fix the corresponding test --- include/deal.II/base/function_lib.h | 6 +++--- source/base/function_lib.cc | 4 ++-- tests/base/functions_12.cc | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/deal.II/base/function_lib.h b/include/deal.II/base/function_lib.h index 4c023a689d..f0351c62bf 100644 --- a/include/deal.II/base/function_lib.h +++ b/include/deal.II/base/function_lib.h @@ -1280,8 +1280,8 @@ namespace Functions * $a_{i}\prod_{d=1}^{dim} x_{d}^{\alpha_{i,d}}$. The i-th element of the coefficients * vector contains the coefficient $a_{i}$ for the i-th monomial. */ - Polynomial (const Table<2,double> &exponents, - const Vector &coefficients); + Polynomial (const Table<2,double> &exponents, + const std::vector &coefficients); /** * Function value at one point. @@ -1313,7 +1313,7 @@ namespace Functions /** * The set of coefficients. */ - const Vector coefficients; + const std::vector coefficients; }; diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 3553ad153f..20fcd3f331 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2489,8 +2489,8 @@ namespace Functions template Polynomial:: - Polynomial(const Table<2,double> &exponents, - const Vector &coefficients) + Polynomial(const Table<2,double> &exponents, + const std::vector &coefficients) : Function (1), exponents (exponents), diff --git a/tests/base/functions_12.cc b/tests/base/functions_12.cc index 8c19144441..8cfbcf1f9e 100644 --- a/tests/base/functions_12.cc +++ b/tests/base/functions_12.cc @@ -30,12 +30,11 @@ void check() for (unsigned int d = 0; d < dim; ++d) exponents[i][d] = i + d; - Vector coeffs(n_mon); + std::vector coeffs(n_mon); for (unsigned int i = 0; i < n_mon; ++i) coeffs[i] = std::pow(-1,i)*(i+1); - - CustomFunctions::Polynomial poly(exponents,coeffs); + Functions::Polynomial poly(exponents, coeffs); Point p; for (unsigned int d=0; d