From a773a514430f7f23a9d890b08bd34a09628d603f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Mon, 29 Feb 2016 18:11:59 +0100 Subject: [PATCH] fix a few bugs introduced in the recent complex PETSc related pull-requests --- include/deal.II/numerics/matrix_tools.h | 6 ++++-- source/numerics/vector_tools_boundary.cc | 9 +++++++++ tests/lac/block_matrices_04.cc | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/deal.II/numerics/matrix_tools.h b/include/deal.II/numerics/matrix_tools.h index 3d6f2b4254..f4179c24a4 100644 --- a/include/deal.II/numerics/matrix_tools.h +++ b/include/deal.II/numerics/matrix_tools.h @@ -26,6 +26,10 @@ #include +#ifdef DEAL_II_WITH_PETSC +# include +#endif + DEAL_II_NAMESPACE_OPEN @@ -53,8 +57,6 @@ namespace hp #ifdef DEAL_II_WITH_PETSC -# include - namespace PETScWrappers { class SparseMatrix; diff --git a/source/numerics/vector_tools_boundary.cc b/source/numerics/vector_tools_boundary.cc index 51c782405c..b90a3a7330 100644 --- a/source/numerics/vector_tools_boundary.cc +++ b/source/numerics/vector_tools_boundary.cc @@ -21,4 +21,13 @@ DEAL_II_NAMESPACE_OPEN // ---------------------------- explicit instantiations -------------------- #include "vector_tools_boundary.inst" +// extra instantiations to make unit tests pass: +template +void VectorTools::interpolate_boundary_values ( + const dealii::DoFHandler<2, 2> &, + const types::boundary_id, + const Function<2,float> &, + std::map &, + const ComponentMask &); + DEAL_II_NAMESPACE_CLOSE diff --git a/tests/lac/block_matrices_04.cc b/tests/lac/block_matrices_04.cc index a510113d2f..5f093fdda7 100644 --- a/tests/lac/block_matrices_04.cc +++ b/tests/lac/block_matrices_04.cc @@ -308,10 +308,10 @@ void LaplaceProblem::assemble_system () }; - std::map boundary_values; + std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, 0, - ZeroFunction<2>(), + ZeroFunction<2,typename VectorType::value_type>(), boundary_values); MatrixTools::apply_boundary_values (boundary_values, system_matrix, -- 2.39.5