From: heister Date: Tue, 5 Mar 2013 18:42:53 +0000 (+0000) Subject: fix some size_type errors in the petsc wrappers X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab21c30a605435d99981046efd08588961d9343a;p=dealii-svn.git fix some size_type errors in the petsc wrappers git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28740 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/petsc_matrix_base.h b/deal.II/include/deal.II/lac/petsc_matrix_base.h index e6042bcfd5..f3c7f5200d 100644 --- a/deal.II/include/deal.II/lac/petsc_matrix_base.h +++ b/deal.II/include/deal.II/lac/petsc_matrix_base.h @@ -64,6 +64,11 @@ namespace PETScWrappers class Accessor { public: + /** + * Declare type for container size. + */ + typedef types::global_dof_index size_type; + /** * Constructor. Since we use * accessors only for read @@ -183,7 +188,7 @@ namespace PETScWrappers * Declare type for container size. */ typedef types::global_dof_index size_type; - + /** * Constructor. Create an iterator * into the matrix @p matrix for the @@ -296,6 +301,11 @@ namespace PETScWrappers * class. */ typedef MatrixIterators::const_iterator const_iterator; + + /** + * Declare type for container size. + */ + typedef types::global_dof_index size_type; /** * Declare a typedef in analogy to all @@ -1337,7 +1347,7 @@ namespace PETScWrappers inline - size_type + const_iterator::Accessor::size_type const_iterator::Accessor::row() const { Assert (a_row < matrix->m(), ExcBeyondEndOfMatrix()); @@ -1346,7 +1356,7 @@ namespace PETScWrappers inline - size_type + const_iterator::Accessor::size_type const_iterator::Accessor::column() const { Assert (a_row < matrix->m(), ExcBeyondEndOfMatrix()); @@ -1355,7 +1365,7 @@ namespace PETScWrappers inline - size_type + const_iterator::Accessor::size_type const_iterator::Accessor::index() const { Assert (a_row < matrix->m(), ExcBeyondEndOfMatrix()); diff --git a/deal.II/include/deal.II/lac/petsc_parallel_block_sparse_matrix.h b/deal.II/include/deal.II/lac/petsc_parallel_block_sparse_matrix.h index 4e50f1735e..2e61b89187 100644 --- a/deal.II/include/deal.II/lac/petsc_parallel_block_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/petsc_parallel_block_sparse_matrix.h @@ -62,11 +62,6 @@ namespace PETScWrappers class BlockSparseMatrix : public BlockMatrixBase { public: - /** - * Declare type for container size. - */ - typedef types::global_dof_index size_type; - /** * Typedef the base class for simpler * access to its own typedefs. diff --git a/deal.II/include/deal.II/lac/petsc_vector_base.h b/deal.II/include/deal.II/lac/petsc_vector_base.h index e3cc5e4ec6..2e00dc1c06 100644 --- a/deal.II/include/deal.II/lac/petsc_vector_base.h +++ b/deal.II/include/deal.II/lac/petsc_vector_base.h @@ -77,7 +77,13 @@ namespace PETScWrappers */ class VectorReference { - private: + public: + /** + * Declare type for container size. + */ + typedef types::global_dof_index size_type; + + private: /** * Constructor. It is made private so * as to only allow the actual vector @@ -86,12 +92,9 @@ namespace PETScWrappers VectorReference (const VectorBase &vector, const size_type index); - public: - /** - * Declare type for container size. - */ - typedef types::global_dof_index size_type; + public: + /** * This looks like a copy operator, * but does something different than