From e8a463c5ed7bf9b1168ce0befdd6386358fa2df9 Mon Sep 17 00:00:00 2001 From: heister Date: Mon, 1 Apr 2013 23:30:37 +0000 Subject: [PATCH] fix some warnings git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29137 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/index_set.h | 2 +- .../include/deal.II/dofs/dof_accessor.templates.h | 12 ++++++++---- deal.II/source/lac/trilinos_sparsity_pattern.cc | 4 +++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/deal.II/include/deal.II/base/index_set.h b/deal.II/include/deal.II/base/index_set.h index 9a4a09006c..f382b0dbe1 100644 --- a/deal.II/include/deal.II/base/index_set.h +++ b/deal.II/include/deal.II/base/index_set.h @@ -1007,7 +1007,7 @@ IndexSet::fill_binary_vector (Vector &vector) const for (std::vector::iterator it = ranges.begin(); it != ranges.end(); ++it) - for (unsigned int i=it->begin; iend; ++i) + for (types::global_dof_index i=it->begin; iend; ++i) vector[i] = 1; } diff --git a/deal.II/include/deal.II/dofs/dof_accessor.templates.h b/deal.II/include/deal.II/dofs/dof_accessor.templates.h index 45a8ec9a70..7167e97d0d 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -1175,7 +1175,8 @@ namespace internal return; } else - pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1; + pointer += static_cast( + (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1); } } @@ -1263,7 +1264,8 @@ namespace internal if (this_fe_index == fe_index) return *(pointer + 1 + local_index); else - pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1; + pointer += static_cast( + (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1); } } @@ -1308,7 +1310,8 @@ namespace internal return counter; else { - pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1; + pointer += static_cast( + (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1); ++counter; } } @@ -1366,7 +1369,8 @@ namespace internal Assert (this_fe_index != numbers::invalid_dof_index, ExcInternalError()); - pointer += (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1; + pointer += static_cast( + (*dof_handler.finite_elements)[this_fe_index].dofs_per_vertex + 1); ++counter; } } diff --git a/deal.II/source/lac/trilinos_sparsity_pattern.cc b/deal.II/source/lac/trilinos_sparsity_pattern.cc index d7764cf939..3ad7872527 100644 --- a/deal.II/source/lac/trilinos_sparsity_pattern.cc +++ b/deal.II/source/lac/trilinos_sparsity_pattern.cc @@ -418,8 +418,10 @@ namespace TrilinosWrappers last_row = max_my_gid(input_row_map)+1; std::vector n_entries_per_row(last_row - first_row); + // Trilinos wants the row length as an int + // this is hopefully never going to be a problem. for (size_type row=first_row; row(sp.row_length(row)); if (input_row_map.Comm().NumProc() > 1) graph.reset(new Epetra_FECrsGraph(Copy, input_row_map, -- 2.39.5