/**
* Does the same as the function above but can treat non quadratic matrices.
*/
- template <typename MatrixType>
+ template <typename MatrixType, typename LocalType>
void
- distribute_local_to_global (const FullMatrix<double> &local_matrix,
+ distribute_local_to_global (const FullMatrix<LocalType> &local_matrix,
const std::vector<size_type> &row_indices,
const std::vector<size_type> &col_indices,
MatrixType &global_matrix) const;
template <typename MatrixType>
void
ConstraintMatrix::distribute_local_to_global (
- const FullMatrix<double> &local_matrix,
+ const FullMatrix<LocalType> &local_matrix,
const std::vector<size_type> &row_indices,
const std::vector<size_type> &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());
// 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<size_type> &cols = scratch_data->columns;
- std::vector<number> &vals = scratch_data->values;
+ std::vector<number> &vals = scratch_data->values;
cols.resize(n_actual_col_dofs);
vals.resize(n_actual_col_dofs);
const std::vector<ConstraintMatrix::size_type> &, \
MatrixType &) const
+#define COMPLEX_ONLY_MATRIX_FUNCTIONS(MatrixType) \
+ template void ConstraintMatrix::distribute_local_to_global<MatrixType > (\
+ const FullMatrix<std::complex<double> > &, \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ const std::vector<ConstraintMatrix::size_type> &, \
+ MatrixType &) const
+
ONLY_MATRIX_FUNCTIONS(SparseMatrix<float>);
ONLY_MATRIX_FUNCTIONS(SparseMatrix<double>);
ONLY_MATRIX_FUNCTIONS(MatrixBlock<SparseMatrix<float> >);