From: turcksin Date: Tue, 30 Apr 2013 20:25:20 +0000 (+0000) Subject: Fix some bugs in the tutorial steps. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22e63a1d70bfb6478feaae13c4e50d808f1ddbb6;p=dealii-svn.git Fix some bugs in the tutorial steps. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29416 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index bbddc8de03..23297051f4 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -477,7 +477,7 @@ namespace Step21 void InverseMatrix::vmult (Vector &dst, const Vector &src) const { - SolverControl solver_control (std::max(src.size(), static_cast 200), + SolverControl solver_control (std::max(src.size(), static_cast (200)), 1e-8*src.l2_norm()); SolverCG<> cg (solver_control); diff --git a/deal.II/examples/step-26/step-26.cc b/deal.II/examples/step-26/step-26.cc index a4528ae963..9ab3078723 100644 --- a/deal.II/examples/step-26/step-26.cc +++ b/deal.II/examples/step-26/step-26.cc @@ -426,7 +426,7 @@ start_time_iteration: BoundaryValues boundary_values_function; boundary_values_function.set_time(time); - std::map boundary_values; + std::map boundary_values; VectorTools::interpolate_boundary_values(dof_handler, 0, boundary_values_function, diff --git a/deal.II/source/lac/trilinos_precondition.cc b/deal.II/source/lac/trilinos_precondition.cc index 2d26d5c075..544e309cd9 100644 --- a/deal.II/source/lac/trilinos_precondition.cc +++ b/deal.II/source/lac/trilinos_precondition.cc @@ -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