From 56b47f345083ed5702b25e9b509823904876c57f Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 20 Mar 2013 20:43:49 +0000 Subject: [PATCH] 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 --- deal.II/source/lac/trilinos_sparsity_pattern.cc | 4 ++-- tests/mpi/p4est_2d_dofhandler_03.cc | 2 +- tests/mpi/p4est_2d_dofhandler_04.cc | 2 +- tests/mpi/petsc_01.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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(); -- 2.39.5