From: Denis Davydov Date: Sat, 27 Feb 2016 21:07:04 +0000 (+0100) Subject: extend MatrixTools::apply_boundary_values() to complex numbers X-Git-Tag: v8.5.0-rc1~1277^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e938614d509070fdf2b80ede2fddc2c1589dea6;p=dealii.git extend MatrixTools::apply_boundary_values() to complex numbers --- 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