From 38b4563d7255203602f8996c94744d30f65c49d3 Mon Sep 17 00:00:00 2001 From: young Date: Thu, 13 Feb 2014 13:07:38 +0000 Subject: [PATCH] COMPLEX_ONLY_MATRIX_FUNCTION patch (03) by Denis Davydov. git-svn-id: https://svn.dealii.org/branches/branch_petscscalar_complex@32480 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/constraint_matrix.h | 4 ++-- deal.II/include/deal.II/lac/constraint_matrix.templates.h | 6 +++--- deal.II/source/lac/constraint_matrix.cc | 7 +++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/deal.II/include/deal.II/lac/constraint_matrix.h b/deal.II/include/deal.II/lac/constraint_matrix.h index 5dcfa922af..f548a69857 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.h @@ -922,9 +922,9 @@ public: /** * Does the same as the function above but can treat non quadratic matrices. */ - template + template void - distribute_local_to_global (const FullMatrix &local_matrix, + distribute_local_to_global (const FullMatrix &local_matrix, const std::vector &row_indices, const std::vector &col_indices, MatrixType &global_matrix) const; diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index 77ea578540..170058d026 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -2589,12 +2589,12 @@ ConstraintMatrix::distribute_local_to_global ( template void ConstraintMatrix::distribute_local_to_global ( - const FullMatrix &local_matrix, + const FullMatrix &local_matrix, const std::vector &row_indices, const std::vector &col_indices, MatrixType &global_matrix) const { - typedef double number; + typedef LocalType number; AssertDimension (local_matrix.m(), row_indices.size()); AssertDimension (local_matrix.n(), col_indices.size()); @@ -2618,7 +2618,7 @@ ConstraintMatrix::distribute_local_to_global ( // create arrays for the column data (indices and values) that will then be // written into the matrix. Shortcut for deal.II sparse matrix std::vector &cols = scratch_data->columns; - std::vector &vals = scratch_data->values; + std::vector &vals = scratch_data->values; cols.resize(n_actual_col_dofs); vals.resize(n_actual_col_dofs); diff --git a/deal.II/source/lac/constraint_matrix.cc b/deal.II/source/lac/constraint_matrix.cc index bb5041cb0b..1a59875b6a 100644 --- a/deal.II/source/lac/constraint_matrix.cc +++ b/deal.II/source/lac/constraint_matrix.cc @@ -1953,6 +1953,13 @@ BLOCK_SPARSITY_FUNCTIONS(TrilinosWrappers::BlockSparsityPattern); const std::vector &, \ MatrixType &) const +#define COMPLEX_ONLY_MATRIX_FUNCTIONS(MatrixType) \ + template void ConstraintMatrix::distribute_local_to_global (\ + const FullMatrix > &, \ + const std::vector &, \ + const std::vector &, \ + MatrixType &) const + ONLY_MATRIX_FUNCTIONS(SparseMatrix); ONLY_MATRIX_FUNCTIONS(SparseMatrix); ONLY_MATRIX_FUNCTIONS(MatrixBlock >); -- 2.39.5