]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make code compile again.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 27 Aug 2010 14:59:27 +0000 (14:59 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 27 Aug 2010 14:59:27 +0000 (14:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@21751 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/trilinos_sparse_matrix.cc
deal.II/lac/source/trilinos_sparsity_pattern.cc

index 7e6814ae9d6bc961416309557a81c61f55345d9b..ee526665debf271b8219779ec46ad9333d3350c5 100644 (file)
@@ -406,10 +406,10 @@ namespace TrilinosWrappers
 
     const unsigned int first_row = input_row_map.MinMyGID(),
       last_row = input_row_map.MaxMyGID()+1;
-    std::vector<int> n_entries_per_row(last_entry - first_entry);
+    std::vector<int> n_entries_per_row(last_row-first_row);
 
     for (unsigned int row=first_row; row<last_row; ++row)
-      n_entries_per_row[row-first_row] = sp.row_length(row);
+      n_entries_per_row[row-first_row] = sparsity_pattern.row_length(row);
 
                                  // The deal.II notation of a Sparsity
                                  // pattern corresponds to the Epetra
@@ -436,7 +436,7 @@ namespace TrilinosWrappers
                                   // # 4123 in the Sandia Bugzilla.
     std_cxx1x::shared_ptr<Epetra_CrsGraph> graph;
     if (input_row_map.Comm().NumProc() > 1)
-      graph.reset (new Epetra_CrsGraph (Copy, input_row_map, 
+      graph.reset (new Epetra_CrsGraph (Copy, input_row_map,
                                        &n_entries_per_row[0], true));
     else
       graph.reset (new Epetra_CrsGraph (Copy, input_row_map, input_col_map,
@@ -453,14 +453,14 @@ namespace TrilinosWrappers
 
     for (unsigned int row=first_row; row<last_row; ++row)
       {
-       const int row_length = sp.row_length(row);
+       const int row_length = sparsity_pattern.row_length(row);
        if (row_length == 0)
          continue;
 
        row_indices.resize (row_length, -1);
 
-       typename SparsityType::row_iterator col_num = sp.row_begin (row),
-         row_end = sp.row_end(row);
+       typename SparsityType::row_iterator col_num = sparsity_pattern.row_begin (row),
+         row_end = sparsity_pattern.row_end(row);
        for (unsigned int col = 0; col_num != row_end; ++col_num, ++col)
          row_indices[col] = *col_num;
 
index 43775e5aad0338e234d15ccbd20ca2621f8094d3..88ae0be57f2a7c34a5c6c7532cf4acebd81489f3 100644 (file)
@@ -293,7 +293,7 @@ namespace TrilinosWrappers
 
     const unsigned int first_row = input_row_map.MinMyGID(),
       last_row = input_row_map.MaxMyGID()+1;
-    std::vector<int> n_entries_per_row(last_entry - first_entry);
+    std::vector<int> n_entries_per_row(last_row - first_row);
 
     for (unsigned int row=first_row; row<last_row; ++row)
       n_entries_per_row[row-first_row] = sp.row_length(row);
@@ -346,7 +346,7 @@ namespace TrilinosWrappers
          for (unsigned int col = 0; col_num != row_end; ++col_num, ++col)
            row_indices[col] = *col_num;
 
-         graph->InsertGlobalIndices (1, static_cast<int*>(&row), row_length,
+         graph->InsertGlobalIndices (1, reinterpret_cast<int*>(&row), row_length,
                                      &row_indices[0]);
        }
 

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.