]> https://gitweb.dealii.org/ - dealii.git/commitdiff
A couple of fixes to make things compile again in 64-bit mode after the change to...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 7 Dec 2013 16:30:01 +0000 (16:30 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 7 Dec 2013 16:30:01 +0000 (16:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@31917 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/full_matrix.h
deal.II/include/deal.II/lac/matrix_out.h

index 4829da893e996d972be0530bc4ddc25dcd323564..4be38349f07f487dcd8166cd125e1e7925c609ec 100644 (file)
@@ -446,10 +446,10 @@ public:
    *      rows and columns in the current object. In other words,
    *      the current object is not resized for this operation.
    */
-  template <typename MatrixType>
+  template <typename MatrixType, typename index_type>
   void extract_submatrix_from (const MatrixType &matrix,
-                               const std::vector<typename MatrixType::size_type> &row_index_set,
-                               const std::vector<typename MatrixType::size_type> &column_index_set);
+                               const std::vector<index_type> &row_index_set,
+                               const std::vector<index_type> &column_index_set);
 
   /**
    * Copy the elements of the current matrix object into a specified
@@ -463,10 +463,10 @@ public:
    *      rows and columns in the current object. In other words,
    *      the current object is not resized for this operation.
    */
-  template <typename MatrixType>
+  template <typename MatrixType, typename index_type>
   void
-  scatter_matrix_to (const std::vector<size_type> &row_index_set,
-                     const std::vector<size_type> &column_index_set,
+  scatter_matrix_to (const std::vector<index_type> &row_index_set,
+                     const std::vector<index_type> &column_index_set,
                      MatrixType &matrix) const;
 
   /**
@@ -1572,12 +1572,12 @@ FullMatrix<number>::copy_transposed (const MATRIX &M)
 
 
 template <typename number>
-template <typename MatrixType>
+template <typename MatrixType, typename index_type>
 inline
 void
 FullMatrix<number>::extract_submatrix_from (const MatrixType &matrix,
-                                            const std::vector<typename MatrixType::size_type> &row_index_set,
-                                            const std::vector<typename MatrixType::size_type> &column_index_set)
+                                            const std::vector<index_type> &row_index_set,
+                                            const std::vector<index_type> &column_index_set)
 {
   AssertDimension(row_index_set.size(), this->n_rows());
   AssertDimension(column_index_set.size(), this->n_cols());
@@ -1593,11 +1593,11 @@ FullMatrix<number>::extract_submatrix_from (const MatrixType &matrix,
 
 
 template <typename number>
-template <typename MatrixType>
+template <typename MatrixType, typename index_type>
 inline
 void
-FullMatrix<number>::scatter_matrix_to (const std::vector<size_type> &row_index_set,
-                                       const std::vector<size_type> &column_index_set,
+FullMatrix<number>::scatter_matrix_to (const std::vector<index_type> &row_index_set,
+                                       const std::vector<index_type> &column_index_set,
                                        MatrixType &matrix) const
 {
   AssertDimension(row_index_set.size(), this->n_rows());
index 55c84522178bb8fb9dc2f598a95e9426edcf07c2..9916e7a45cd05ef924f42a4b74a368369ee2708b 100644 (file)
@@ -372,9 +372,11 @@ MatrixOut::get_gridpoint_value (const Matrix   &matrix,
   double average = 0;
   size_type n_elements = 0;
   for (size_type row=i*options.block_size;
-       row < std::min(matrix.m(), (i+1)*options.block_size); ++row)
+       row < std::min(size_type(matrix.m()),
+                     size_type((i+1)*options.block_size)); ++row)
     for (size_type col=j*options.block_size;
-         col < std::min(matrix.m(), (j+1)*options.block_size); ++col, ++n_elements)
+         col < std::min(size_type(matrix.m()),
+                       size_type((j+1)*options.block_size)); ++col, ++n_elements)
       if (options.show_absolute_values == true)
         average += std::fabs(get_element (matrix, row, col));
       else

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.