From: Daniel Arndt Date: Fri, 30 Dec 2016 00:07:47 +0000 (+0100) Subject: Fix compiling with complex-valued PETSc X-Git-Tag: v8.5.0-rc1~302^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3718%2Fhead;p=dealii.git Fix compiling with complex-valued PETSc --- diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 668e408a46..c653fc3c7d 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -819,7 +819,7 @@ namespace MatrixFreeOperators Base::vmult (LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { - dst = 0; + dst = Number(0.); vmult_add (dst, src); } @@ -922,7 +922,7 @@ namespace MatrixFreeOperators adjust_ghost_range_if_necessary(src); adjust_ghost_range_if_necessary(dst); - dst = 0; + dst = Number(0.); if (!have_interface_matrices) return; @@ -964,7 +964,7 @@ namespace MatrixFreeOperators adjust_ghost_range_if_necessary(src); adjust_ghost_range_if_necessary(dst); - dst = 0; + dst = Number(0.); if (!have_interface_matrices) return; @@ -995,7 +995,7 @@ namespace MatrixFreeOperators Base::Tvmult (LinearAlgebra::distributed::Vector &dst, const LinearAlgebra::distributed::Vector &src) const { - dst = 0; + dst = Number(0.); Tvmult_add (dst,src); } @@ -1125,7 +1125,7 @@ namespace MatrixFreeOperators LinearAlgebra::distributed::Vector ones; this->initialize_dof_vector(ones); this->initialize_dof_vector(inverse_diagonal_vector); - ones = 1.; + ones = Number(1.); apply_add(inverse_diagonal_vector, ones); this->set_constrained_entries_to_one(inverse_diagonal_vector); diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index f10b5e810b..a89258c0c4 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -1546,7 +1546,7 @@ namespace VectorTools ExcDimensionMismatch(fe.n_components(), rhs_function.n_components)); Assert (rhs_vector.size() == dof_handler.n_dofs(), ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs())); - rhs_vector = 0; + rhs_vector = typename VectorType::value_type(0.); UpdateFlags update_flags = UpdateFlags(update_values | update_quadrature_points | diff --git a/source/numerics/vector_tools_project.inst.in b/source/numerics/vector_tools_project.inst.in index 7c045dd3f5..b9c8f827f8 100644 --- a/source/numerics/vector_tools_project.inst.in +++ b/source/numerics/vector_tools_project.inst.in @@ -14,7 +14,7 @@ // --------------------------------------------------------------------- -for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) +for (VEC : REAL_SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension namespace VectorTools \{