From dcd957187ea30fef99168a6a7a3bdcf863bca709 Mon Sep 17 00:00:00 2001 From: "kainan.wang" Date: Sun, 7 Apr 2013 19:16:32 +0000 Subject: [PATCH] Fix several long long warnings git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29214 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/base/index_set.h | 5 ++--- deal.II/include/deal.II/base/partitioner.h | 2 +- deal.II/include/deal.II/dofs/block_info.h | 2 +- deal.II/include/deal.II/lac/constraint_matrix.h | 8 ++++---- deal.II/include/deal.II/lac/sparsity_pattern.h | 14 +++++++------- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/deal.II/include/deal.II/base/index_set.h b/deal.II/include/deal.II/base/index_set.h index ef1c16bb18..ba0baba909 100644 --- a/deal.II/include/deal.II/base/index_set.h +++ b/deal.II/include/deal.II/base/index_set.h @@ -15,7 +15,6 @@ #include #include #include - #include #include @@ -172,7 +171,7 @@ public: * a member of this index set, i.e. if * is_element(global_index) is false. */ - unsigned int index_within_set (const types::global_dof_index global_index) const; + types::global_dof_index index_within_set (const types::global_dof_index global_index) const; /** * Each index set can be @@ -918,7 +917,7 @@ IndexSet::nth_index_in_set (const unsigned int n) const inline -unsigned int +types::global_dof_index IndexSet::index_within_set (const types::global_dof_index n) const { // to make this call thread-safe, compress() diff --git a/deal.II/include/deal.II/base/partitioner.h b/deal.II/include/deal.II/base/partitioner.h index 353ac2d5ac..d02546a8af 100644 --- a/deal.II/include/deal.II/base/partitioner.h +++ b/deal.II/include/deal.II/base/partitioner.h @@ -448,7 +448,7 @@ namespace Utilities return static_cast(global_index - local_range_data.first); else if (is_ghost_entry (global_index)) return (local_size() + - ghost_indices_data.index_within_set (global_index)); + static_cast(ghost_indices_data.index_within_set (global_index))); else // should only end up here in // optimized mode, when we use this diff --git a/deal.II/include/deal.II/dofs/block_info.h b/deal.II/include/deal.II/dofs/block_info.h index ccd162ac03..3a922d192d 100644 --- a/deal.II/include/deal.II/dofs/block_info.h +++ b/deal.II/include/deal.II/dofs/block_info.h @@ -261,7 +261,7 @@ BlockInfo::level (const unsigned int l) const inline types::global_dof_index BlockInfo::renumber (const unsigned int i) const { - AssertIndexRange(i, local_renumbering.size()); + AssertIndexRange(i, static_cast(local_renumbering.size())); return local_renumbering[i]; } diff --git a/deal.II/include/deal.II/lac/constraint_matrix.h b/deal.II/include/deal.II/lac/constraint_matrix.h index cbd11d0ce6..ec12f55c94 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.h @@ -1465,7 +1465,7 @@ public: * @ingroup Exceptions */ DeclException4 (ExcEntryAlreadyExists, - int, int, double, double, + size_type, size_type, double, double, << "The entry for the indices " << arg1 << " and " << arg2 << " already exists, but the values " << arg3 << " (old) and " << arg4 << " (new) differ " @@ -1486,7 +1486,7 @@ public: * @ingroup Exceptions */ DeclException1 (ExcDoFIsConstrainedFromBothObjects, - int, + size_type, << "Degree of freedom " << arg1 << " is constrained from both object in a merge operation."); /** @@ -1495,7 +1495,7 @@ public: * @ingroup Exceptions */ DeclException1 (ExcDoFIsConstrainedToConstrainedDoF, - int, + size_type, << "In the given argument a degree of freedom is constrained " << "to another DoF with number " << arg1 << ", which however is constrained by this object. This is not" @@ -1506,7 +1506,7 @@ public: * @ingroup Exceptions */ DeclException1 (ExcRowNotStoredHere, - int, + size_type, << "The index set given to this constraint matrix indicates " << "constraints for degree of freedom " << arg1 << " should not be stored by this object, but a constraint " diff --git a/deal.II/include/deal.II/lac/sparsity_pattern.h b/deal.II/include/deal.II/lac/sparsity_pattern.h index 0d0daa7930..aad75b9c46 100644 --- a/deal.II/include/deal.II/lac/sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/sparsity_pattern.h @@ -1670,7 +1670,7 @@ inline SparsityPattern::iterator SparsityPattern::begin (const size_type r) const { - Assert (r(r,0,n_rows())); return iterator(this, rowstart[r]); } @@ -1681,7 +1681,7 @@ inline SparsityPattern::iterator SparsityPattern::end (const size_type r) const { - Assert (r(r,0,n_rows())); return iterator(this, rowstart[r+1]); } @@ -1692,7 +1692,7 @@ inline SparsityPattern::row_iterator SparsityPattern::row_begin (const size_type r) const { - Assert (r(r,0,n_rows())); return &colnums[rowstart[r]]; } @@ -1702,7 +1702,7 @@ inline SparsityPattern::row_iterator SparsityPattern::row_end (const size_type r) const { - Assert (r(r,0,n_rows())); return &colnums[rowstart[r+1]]; } @@ -1769,7 +1769,7 @@ inline SparsityPattern::size_type SparsityPattern::row_length (const size_type row) const { - Assert(row(row,0,rows)); return rowstart[row+1]-rowstart[row]; } @@ -1780,8 +1780,8 @@ SparsityPattern::size_type SparsityPattern::column_number (const size_type row, const size_type index) const { - Assert(row(row,0,rows)); + Assert(index(index,0,row_length(row))); return colnums[rowstart[row]+index]; } -- 2.39.5