From: turcksin Date: Wed, 20 Mar 2013 20:43:49 +0000 (+0000) Subject: Fix a bug in trilinos_sparsity_pattern. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b67cdfc98e8d7181a50044ce76fc342c166c81d;p=dealii-svn.git Fix a bug in trilinos_sparsity_pattern. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28962 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/trilinos_sparsity_pattern.cc b/deal.II/source/lac/trilinos_sparsity_pattern.cc index b6826e4fa6..3a43219d58 100644 --- a/deal.II/source/lac/trilinos_sparsity_pattern.cc +++ b/deal.II/source/lac/trilinos_sparsity_pattern.cc @@ -531,8 +531,8 @@ namespace TrilinosWrappers graph->ExtractMyRowView(i, num_entries, indices); for (size_type j=0; j<(size_type)num_entries; ++j) { - if (static_cast(std::abs(static_cast(i-indices[j]))) > local_b) - local_b = std::abs(static_cast(i-indices[j])); + if (static_cast(std::abs(static_cast(i-indices[j]))) > local_b) + local_b = std::abs(static_cast(i-indices[j])); } } graph->Comm().MaxAll((TrilinosWrapper::types::int_type *)&local_b, &global_b, 1); diff --git a/tests/mpi/p4est_2d_dofhandler_03.cc b/tests/mpi/p4est_2d_dofhandler_03.cc index c11b4da763..27b3675fe3 100644 --- a/tests/mpi/p4est_2d_dofhandler_03.cc +++ b/tests/mpi/p4est_2d_dofhandler_03.cc @@ -103,7 +103,7 @@ void test() std::sort(local_dof_indices.begin(), local_dof_indices.end()); //macros are evil... - unsigned int invalid_dofindex = DoFHandler::invalid_dof_index; + types::global_dof_index invalid_dofindex = DoFHandler::invalid_dof_index; Assert((*local_dof_indices.rbegin())!=invalid_dofindex, ExcInternalError()); } diff --git a/tests/mpi/p4est_2d_dofhandler_04.cc b/tests/mpi/p4est_2d_dofhandler_04.cc index ed764c2ae8..1bd028cd35 100644 --- a/tests/mpi/p4est_2d_dofhandler_04.cc +++ b/tests/mpi/p4est_2d_dofhandler_04.cc @@ -106,7 +106,7 @@ void test() cell->get_dof_indices (local_dof_indices); for (std::vector::iterator it=local_dof_indices.begin(); it!= local_dof_indices.end(); ++it) { - unsigned int invalid_dofindex = DoFHandler::invalid_dof_index; + types::global_dof_index invalid_dofindex = DoFHandler::invalid_dof_index; Assert(*it!=invalid_dofindex, ExcInternalError()); control_dof_set.insert(*it); } diff --git a/tests/mpi/petsc_01.cc b/tests/mpi/petsc_01.cc index 6aa1515365..e517a6f371 100644 --- a/tests/mpi/petsc_01.cc +++ b/tests/mpi/petsc_01.cc @@ -55,7 +55,7 @@ void test() mat.compress(); - std::vector rows(1,1); + std::vector rows(1,1); mat.clear_rows(rows); // mat.write_ascii();