]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix a few bugs introduced in the recent complex PETSc related pull-requests 2274/head
authorDenis Davydov <davydden@gmail.com>
Mon, 29 Feb 2016 17:11:59 +0000 (18:11 +0100)
committerDenis Davydov <davydden@gmail.com>
Mon, 29 Feb 2016 17:11:59 +0000 (18:11 +0100)
include/deal.II/numerics/matrix_tools.h
source/numerics/vector_tools_boundary.cc
tests/lac/block_matrices_04.cc

index 3d6f2b425498933050e921bd2027db1a73d54dc0..f4179c24a4d441583384c7621e0b5dbf05628408 100644 (file)
 
 #include <map>
 
+#ifdef DEAL_II_WITH_PETSC
+#  include <petscsys.h>
+#endif
+
 DEAL_II_NAMESPACE_OPEN
 
 
@@ -53,8 +57,6 @@ namespace hp
 
 
 #ifdef DEAL_II_WITH_PETSC
-#  include <petscsys.h>
-
 namespace PETScWrappers
 {
   class SparseMatrix;
index 51c782405ccd243b2cdd4e926f5091e76fe5585b..b90a3a73305bebd0399458b986ce64e18e68bce2 100644 (file)
@@ -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<types::global_dof_index,float> &,
+  const ComponentMask &);
+
 DEAL_II_NAMESPACE_CLOSE
index a510113d2fccf8bd57300b488e2fe387c6d44752..5f093fdda78a6456762c37211273a8f429221a22 100644 (file)
@@ -308,10 +308,10 @@ void LaplaceProblem<VectorType,Matrix,Sparsity>::assemble_system ()
     };
 
 
-  std::map<types::global_dof_index,double> boundary_values;
+  std::map<types::global_dof_index,typename VectorType::value_type> 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,

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.