]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some bugs in the tutorial steps.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Apr 2013 20:25:20 +0000 (20:25 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Apr 2013 20:25:20 +0000 (20:25 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29416 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-21/step-21.cc
deal.II/examples/step-26/step-26.cc
deal.II/source/lac/trilinos_precondition.cc

index bbddc8de03e990f6a50de88bfffe901c50ca7efe..23297051f4984558278e52f1d79e154af363fd65 100644 (file)
@@ -477,7 +477,7 @@ namespace Step21
   void InverseMatrix<Matrix>::vmult (Vector<double>       &dst,
                                      const Vector<double> &src) const
   {
-    SolverControl solver_control (std::max(src.size(), static_cast<std::size_t> 200),
+    SolverControl solver_control (std::max(src.size(), static_cast<std::size_t> (200)),
                                   1e-8*src.l2_norm());
     SolverCG<>    cg (solver_control);
 
index a4528ae9633cd4e8ab23e6233064029993d7e3bb..9ab3078723f8f28cdbb4f2baab209279d008e731 100644 (file)
@@ -426,7 +426,7 @@ start_time_iteration:
           BoundaryValues<dim> boundary_values_function;
           boundary_values_function.set_time(time);
 
-          std::map<unsigned int, double> boundary_values;
+          std::map<types::global_dof_index, double> boundary_values;
           VectorTools::interpolate_boundary_values(dof_handler,
                                                    0,
                                                    boundary_values_function,
index 2d26d5c0753de7de1cc5eb39484a639bdadc6afb..544e309cd923c8f48f4da586abfc37ebb90d8cfc 100644 (file)
@@ -39,11 +39,21 @@ namespace TrilinosWrappers
     {
       return vector.GlobalLength();
     }
+
+    int gid(const Epetra_Map &map, unsigned int i)
+    {
+      return map.GID(i);
+    }
 #else
     long long int global_length (const Epetra_MultiVector &vector)
     {
       return vector.GlobalLength64();
     }
+
+    long long int gid(const Epetra_Map &map, dealii::types::global_dof_index i)
+    {
+      return map.GID64(i);
+    }
 #endif
   }
 
@@ -617,7 +627,7 @@ namespace TrilinosWrappers
           for (size_type row=0; row<my_size; ++row)
             {
               TrilinosWrappers::types::int_type global_row_id = 
-                constant_modes_are_global ? domain_map.GID(row) : row;
+                constant_modes_are_global ? gid(domain_map,row) : row;
               distributed_constant_modes[d][row] =
                 additional_data.constant_modes[d][global_row_id];
             }

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.