From 1e938614d509070fdf2b80ede2fddc2c1589dea6 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sat, 27 Feb 2016 22:07:04 +0100 Subject: [PATCH] extend MatrixTools::apply_boundary_values() to complex numbers --- source/numerics/matrix_tools.cc | 6 +++--- source/numerics/matrix_tools.inst.in | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source/numerics/matrix_tools.cc b/source/numerics/matrix_tools.cc index a03a48fc6b..5c937072f5 100644 --- a/source/numerics/matrix_tools.cc +++ b/source/numerics/matrix_tools.cc @@ -1964,7 +1964,7 @@ namespace MatrixTools // there is no such thing number first_nonzero_diagonal_entry = 1; for (unsigned int i=0; isecond * matrix.diag_element(dof_number); right_hand_side(dof_number) = new_rhs; @@ -2076,7 +2076,7 @@ namespace MatrixTools "function, see the documentation.")); // correct right hand side - right_hand_side(row) -= p->value() / + right_hand_side(row) -= static_cast(p->value()) / diagonal_entry * new_rhs; // set matrix entry to zero diff --git a/source/numerics/matrix_tools.inst.in b/source/numerics/matrix_tools.inst.in index 0e7329057d..59073c0117 100644 --- a/source/numerics/matrix_tools.inst.in +++ b/source/numerics/matrix_tools.inst.in @@ -38,10 +38,20 @@ for (number: REAL_SCALARS) BlockVector &solution, BlockVector &right_hand_side, const bool eliminate_columns); - } +for (number: COMPLEX_SCALARS) + { + template + void MatrixTools::apply_boundary_values + (const std::map &boundary_values, + SparseMatrix &matrix, + Vector &solution, + Vector &right_hand_side, + const bool eliminate_columns); + } + for (scalar: REAL_SCALARS; deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension -- 2.39.5