From: kainan.wang Date: Mon, 15 Apr 2013 02:05:54 +0000 (+0000) Subject: Fix some warnings X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9613d86861e0cfd2448354dbe018fe8fc93f927;p=dealii-svn.git Fix some warnings git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29272 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/hp/dof_objects.h b/deal.II/include/deal.II/hp/dof_objects.h index da2d2b296b..8ea18fccf3 100644 --- a/deal.II/include/deal.II/hp/dof_objects.h +++ b/deal.II/include/deal.II/hp/dof_objects.h @@ -566,7 +566,7 @@ namespace internal ExcMessage ("No finite element collection is associated with " "this DoFHandler")); Assert (obj_index < dof_offsets.size(), - ExcIndexRange (obj_index, 0, dof_offsets.size())); + ExcIndexRange (obj_index, 0, static_cast(dof_offsets.size()))); Assert ((fe_index != dealii::hp::DoFHandler::default_fe_index), ExcMessage ("You need to specify a FE index when working " "with hp DoFHandlers")); diff --git a/deal.II/include/deal.II/lac/block_vector_base.h b/deal.II/include/deal.II/lac/block_vector_base.h index a5222ad5ea..81acc9db74 100644 --- a/deal.II/include/deal.II/lac/block_vector_base.h +++ b/deal.II/include/deal.II/lac/block_vector_base.h @@ -1836,7 +1836,7 @@ inline void BlockVectorBase::compress (::dealii::VectorOperation::values operation) { - for (size_type i=0; i(i, 0, rows)); + Assert (j(j, 0, cols)); if (rowset.size() > 0 && !rowset.is_element(i)) return; @@ -531,7 +531,7 @@ CompressedSimpleSparsityPattern::add_entries (const size_type row, ForwardIterator end, const bool indices_are_sorted) { - Assert (row < rows, ExcIndexRange (row, 0, rows)); + Assert (row < rows, ExcIndexRangeType (row, 0, rows)); if (rowset.size() > 0 && !rowset.is_element(row)) return; @@ -553,7 +553,7 @@ inline types::global_dof_index CompressedSimpleSparsityPattern::row_length (const size_type row) const { - Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows())); + Assert (row < n_rows(), ExcIndexRangeType (row, 0, n_rows())); if (rowset.size() > 0 && !rowset.is_element(row)) return 0; @@ -569,12 +569,12 @@ types::global_dof_index CompressedSimpleSparsityPattern::column_number (const size_type row, const size_type index) const { - Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows())); + Assert (row < n_rows(), ExcIndexRangeType (row, 0, n_rows())); Assert( rowset.size() == 0 || rowset.is_element(row), ExcInternalError()); const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row; Assert (index < lines[local_row].entries.size(), - ExcIndexRange (index, 0, lines[local_row].entries.size())); + ExcIndexRangeType (index, 0, lines[local_row].entries.size())); return lines[local_row].entries[index]; } @@ -584,7 +584,7 @@ inline CompressedSimpleSparsityPattern::row_iterator CompressedSimpleSparsityPattern::row_begin (const size_type row) const { - Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows())); + Assert (row < n_rows(), ExcIndexRangeType (row, 0, n_rows())); const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row; return lines[local_row].entries.begin(); } @@ -595,7 +595,7 @@ inline CompressedSimpleSparsityPattern::row_iterator CompressedSimpleSparsityPattern::row_end (const size_type row) const { - Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows())); + Assert (row < n_rows(), ExcIndexRangeType (row, 0, n_rows())); const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row; return lines[local_row].entries.end(); } diff --git a/deal.II/include/deal.II/lac/parallel_block_vector.h b/deal.II/include/deal.II/lac/parallel_block_vector.h index 9a33e935a7..c221a6858a 100644 --- a/deal.II/include/deal.II/lac/parallel_block_vector.h +++ b/deal.II/include/deal.II/lac/parallel_block_vector.h @@ -426,7 +426,7 @@ namespace parallel if (this->components.size() != this->n_blocks()) this->components.resize(this->n_blocks()); - for (size_type i=0; in_blocks(); ++i) + for (unsigned int i=0; in_blocks(); ++i) this->block(i).reinit(v.block(i), fast); } diff --git a/deal.II/include/deal.II/lac/trilinos_block_vector.h b/deal.II/include/deal.II/lac/trilinos_block_vector.h index e2a955d81f..53e8da5de4 100644 --- a/deal.II/include/deal.II/lac/trilinos_block_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_block_vector.h @@ -539,7 +539,7 @@ namespace TrilinosWrappers Assert (n_blocks() == v.n_blocks(), ExcDimensionMismatch(n_blocks(),v.n_blocks())); - for (size_type row=0; row inline Number &Vector::operator() (const size_type i) { - Assert (i(i,0,vec_size)); return val[i]; }