]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
COMPLEX_ONLY_MATRIX_FUNCTION patch (03) by Denis Davydov.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Feb 2014 13:07:38 +0000 (13:07 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Feb 2014 13:07:38 +0000 (13:07 +0000)
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
deal.II/include/deal.II/lac/constraint_matrix.templates.h
deal.II/source/lac/constraint_matrix.cc

index 5dcfa922affcba6a319d6921ed7a7aff70d2b518..f548a69857a26d84c3640bf02fb1f3f92a4e581e 100644 (file)
@@ -922,9 +922,9 @@ public:
   /**
    * 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;
index 77ea5785408ff47d776186d00223314477b81e9a..170058d0261a7a24cff6b8ccac5259a19d467662 100644 (file)
@@ -2589,12 +2589,12 @@ ConstraintMatrix::distribute_local_to_global (
 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());
@@ -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<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);
 
index bb5041cb0bac3a9ccb7fc9ce60136fd3c5eff9e6..1a59875b6a0951e1321f6a202ad0539b99e145cc 100644 (file)
@@ -1953,6 +1953,13 @@ BLOCK_SPARSITY_FUNCTIONS(TrilinosWrappers::BlockSparsityPattern);
       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> >);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.