From: Denis Davydov Date: Mon, 22 Feb 2016 12:45:39 +0000 (+0100) Subject: change instantiation of constraint matrix functions to allow complex-valued vectors X-Git-Tag: v8.5.0-rc1~1293^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a2483e9c8fad2824323fa3ad0c342c0351e6c41;p=dealii.git change instantiation of constraint matrix functions to allow complex-valued vectors --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 75e448c8c4..6bff97718f 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -38,6 +38,11 @@ inconvenience this causes.

    +
  1. Changed: ConstraintMatrix::distribute_local_to_global() now requires + matching data types. This is done to correctly handle complex-valued case. +
    + (Denis Davydov, 2016/02/22) +
diff --git a/source/lac/constraint_matrix.cc b/source/lac/constraint_matrix.cc index d105f489ab..214d602358 100644 --- a/source/lac/constraint_matrix.cc +++ b/source/lac/constraint_matrix.cc @@ -1222,17 +1222,18 @@ ConstraintMatrix::resolve_indices (std::vector &indices VectorType &condensed) const;\ template void ConstraintMatrix::condense(VectorType &vec) const;\ template void ConstraintMatrix:: \ - distribute_local_to_global (const Vector &, \ + distribute_local_to_global (const Vector &, \ const std::vector &, \ VectorType &, \ - const FullMatrix &) const + const FullMatrix &) const + #define PARALLEL_VECTOR_FUNCTIONS(VectorType) \ template void ConstraintMatrix:: \ - distribute_local_to_global (const Vector &, \ + distribute_local_to_global (const Vector &, \ const std::vector &, \ VectorType &, \ - const FullMatrix &) const + const FullMatrix &) const #ifdef DEAL_II_WITH_PETSC diff --git a/source/lac/constraint_matrix.inst.in b/source/lac/constraint_matrix.inst.in index 11418f93fa..78c03f8d5f 100644 --- a/source/lac/constraint_matrix.inst.in +++ b/source/lac/constraint_matrix.inst.in @@ -38,7 +38,7 @@ for (V: EXTERNAL_SEQUENTIAL_VECTORS) template void ConstraintMatrix::condense(const V&, V&) const; template void ConstraintMatrix::condense(V&vec) const; template void ConstraintMatrix::distribute_local_to_global ( - const Vector&, const std::vector &, V&, const FullMatrix&) const; + const Vector&, const std::vector &, V&, const FullMatrix&) const; template void ConstraintMatrix::set_zero(V&) const; } @@ -67,3 +67,9 @@ for (Vec : SERIAL_VECTORS) { template void ConstraintMatrix::distribute(Vec &) const; } + +for (S: COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) + { + template void ConstraintMatrix::distribute >(T &) const; + } +