]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merge from mainline.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Mar 2013 15:45:11 +0000 (15:45 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Mar 2013 15:45:11 +0000 (15:45 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28914 0785d39b-7218-0410-832d-ea1e28bc413d

1  2 
deal.II/include/deal.II/lac/petsc_matrix_base.h
deal.II/include/deal.II/lac/petsc_vector_base.h
deal.II/source/lac/petsc_matrix_base.cc
deal.II/source/lac/petsc_parallel_sparse_matrix.cc
deal.II/source/lac/petsc_parallel_vector.cc
deal.II/source/lac/petsc_vector_base.cc
deal.II/source/lac/slepc_solver.cc

index f273b38939309c7cb5f0ad2cd261b29b84b23472,0734e3492695e1f36dad78320fc4737c221684fe..e4a78f18f541ddcd87eaa46e105639d46558f6c8
@@@ -1830,13 -1803,10 +1817,10 @@@ namespace PETScWrapper
  
    inline
    bool
 -  MatrixBase::in_local_range (const unsigned int index) const
 +  MatrixBase::in_local_range (const size_type index) const
    {
- #ifdef PETSC_USE_64BIT_INDICES
      PetscInt begin, end;
- #else
-     int begin, end;
- #endif
      const int ierr = MatGetOwnershipRange (static_cast<const Mat &>(matrix),
                                             &begin, &end);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
index c64fdd67178b66452cdbdd59365b7f5f4b4320e3,5a5dbd0f588a78e9824e62de10e91857069cd1d0..473b5167dd7de00044c7d05979faae296566390f
@@@ -1153,14 -1123,9 +1131,9 @@@ namespace PETScWrapper
  
    inline
    bool
 -  VectorBase::in_local_range (const unsigned int index) const
 +  VectorBase::in_local_range (const size_type index) const
    {
- #ifdef PETSC_USE_64BIT_INDICES
      PetscInt begin, end;
- #else
-     int begin, end;
- #endif
      const int ierr = VecGetOwnershipRange (static_cast<const Vec &>(vector),
                                             &begin, &end);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
index 51bcfc706f05710b09f1e018f656654e1277dab4,036addb3394f3fd99bebd16715d9635b585130e6..b596ad07a56d8851b72dd559ea0a822b23aa72c5
@@@ -213,15 -214,11 +213,11 @@@ namespace PETScWrapper
  
  
    PetscScalar
 -  MatrixBase::el (const unsigned int i,
 -                  const unsigned int j) const
 +  MatrixBase::el (const size_type i,
 +                  const size_type j) const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     petsc_i = i, petsc_j = j;
+     PetscInt petsc_i = i, petsc_j = j;
      PetscScalar value;
  
      const int ierr
  
  
  
 -  unsigned int
 +  MatrixBase::size_type
    MatrixBase::m () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     n_rows, n_cols;
+     PetscInt n_rows, n_cols;
      int ierr = MatGetSize (matrix, &n_rows, &n_cols);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
  
  
  
  
 -  unsigned int
 +  MatrixBase::size_type 
    MatrixBase::n () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     n_rows, n_cols;
+     PetscInt n_rows, n_cols;
      int ierr = MatGetSize (matrix, &n_rows, &n_cols);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
  
  
  
  
 -  unsigned int
 +  MatrixBase::size_type 
    MatrixBase::local_size () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     n_rows, n_cols;
+     PetscInt n_rows, n_cols;
      int ierr = MatGetLocalSize (matrix, &n_rows, &n_cols);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
  
  
  
  
 -  std::pair<unsigned int, unsigned int>
 +  std::pair<MatrixBase::size_type, MatrixBase::size_type>
    MatrixBase::local_range () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     begin, end;
+     PetscInt begin, end;
      const int ierr = MatGetOwnershipRange (static_cast<const Mat &>(matrix),
                                             &begin, &end);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
index 8ec3b032a705c9d1d49f5a39d5d14a73332197f9,a734506e54477360286ee043a548d93a0f6fc923..1b902374e5998c2e8386d2b468edf23364190f3a
@@@ -356,17 -351,14 +351,14 @@@ namespace PETScWrapper
  
        // then count the elements in- and
        // out-of-window for the rows we own
- #ifdef PETSC_USE_64BIT_INDICES
        std::vector<PetscInt>
- #else
-       std::vector<int>
- #endif
        row_lengths_in_window (local_row_end - local_row_start),
                              row_lengths_out_of_window (local_row_end - local_row_start);
 -      for (unsigned int row = local_row_start; row<local_row_end; ++row)
 -        for (unsigned int c=0; c<sparsity_pattern.row_length(row); ++c)
 +      for (size_type row = local_row_start; row<local_row_end; ++row)
 +        for (size_type c=0; c<sparsity_pattern.row_length(row); ++c)
            {
 -            const unsigned int column = sparsity_pattern.column_number(row,c);
 +            const size_type column = sparsity_pattern.column_number(row,c);
  
              if ((column >= local_col_start) &&
                  (column < local_col_end))
            // have to somehow clumsily work around
            // the whole thing:
  #if DEAL_II_PETSC_VERSION_LT(2,2,1)
- #ifdef PETSC_USE_64BIT_INDICES
            std::vector<PetscInt>
- #else
-           std::vector<int>
- #endif
            row_entries;
            std::vector<PetscScalar> row_values;
 -          for (unsigned int i=0; i<sparsity_pattern.n_rows(); ++i)
 +          for (size_type i=0; i<sparsity_pattern.n_rows(); ++i)
              {
                row_entries.resize (sparsity_pattern.row_length(i));
                row_values.resize (sparsity_pattern.row_length(i), 0.0);
            // now copy over the information
            // from the sparsity pattern.
            {
- #ifdef PETSC_USE_64BIT_INDICES
-             PetscInt
- #else
-             int
- #endif
-             * ptr = & colnums_in_window[0];
+             PetscInt* ptr = & colnums_in_window[0];
  
 -            for (unsigned int i=local_row_start; i<local_row_end; ++i)
 +            for (size_type i=local_row_start; i<local_row_end; ++i)
                {
                  typename SparsityType::row_iterator
                  row_start = sparsity_pattern.row_begin(i),
              values (sparsity_pattern.max_entries_per_row(),
                      1.);
  
 -            for (unsigned int i=local_row_start; i<local_row_end; ++i)
 +            for (size_type i=local_row_start; i<local_row_end; ++i)
                {
- #ifdef PETSC_USE_64BIT_INDICES
-                 PetscInt
- #else
-                 int
- #endif
-                 petsc_i = i;
+                 PetscInt petsc_i = i;
                  MatSetValues (matrix, 1, &petsc_i,
                                sparsity_pattern.row_length(i),
                                &colnums_in_window[rowstart_in_window[i-local_row_start]],
index 5cd88bb7ea4d7e59085242b4ceaaca9c685ddaf3,8de2a942bb505ddad984aed1a01fa36a4f2c123b..a789aa034745982abc667716bbd1f16e0bebf40e
@@@ -263,15 -254,10 +254,10 @@@ namespace PETScWrapper
  
  
  
 -  unsigned int
 +  VectorBase::size_type 
    VectorBase::size () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     sz;
+     PetscInt sz;
      const int ierr = VecGetSize (vector, &sz);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
  
  
  
  
 -  unsigned int
 +  VectorBase::size_type 
    VectorBase::local_size () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     sz;
+     PetscInt sz;
      const int ierr = VecGetLocalSize (vector, &sz);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
  
  
  
  
 -  std::pair<unsigned int, unsigned int>
 +  std::pair<VectorBase::size_type, VectorBase::size_type>
    VectorBase::local_range () const
    {
- #ifdef PETSC_USE_64BIT_INDICES
-     PetscInt
- #else
-     int
- #endif
-     begin, end;
+     PetscInt begin, end;
      const int ierr = VecGetOwnershipRange (static_cast<const Vec &>(vector),
                                             &begin, &end);
      AssertThrow (ierr == 0, ExcPETScError(ierr));
Simple merge

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.