]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove code necessary to support PETSc versions prior to 2.2.1. Such old
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Mar 2013 20:48:01 +0000 (20:48 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Mar 2013 20:48:01 +0000 (20:48 +0000)
versions of PETSc have not been supported in a long time.

git-svn-id: https://svn.dealii.org/trunk@28916 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_parallel_sparse_matrix.cc

index a734506e54477360286ee043a548d93a0f6fc923..b90774a75f61640296493f8d477701565982dd66 100644 (file)
@@ -387,7 +387,7 @@ namespace PETScWrappers
       AssertThrow (ierr == 0, ExcPETScError(ierr));
 
 #else //PETSC_VERSION>=2.3.3
-      // new version to create the matrix. We
+      // create the matrix. We
       // do not set row length but set the
       // correct SparsityPattern later.
       int ierr;
@@ -422,34 +422,10 @@ namespace PETScWrappers
       // class.
       if (preset_nonzero_locations == true)
         {
-          // starting with petsc 2.2.1, there is
-          // a function
-          // MatMPIAIJSetPreallocationCSR that
+          // MatMPIAIJSetPreallocationCSR
           // can be used to allocate the sparsity
           // pattern of a matrix if it is already
-          // available. if we don't have this, we
-          // have to somehow clumsily work around
-          // the whole thing:
-#if DEAL_II_PETSC_VERSION_LT(2,2,1)
-          std::vector<PetscInt>
-
-          row_entries;
-          std::vector<PetscScalar> row_values;
-          for (unsigned int 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);
-              for (unsigned int j=0; j<sparsity_pattern.row_length(i); ++j)
-                row_entries[j] = sparsity_pattern.column_number (i,j);
-
-              const int int_row = i;
-              MatSetValues (matrix, 1, &int_row,
-                            sparsity_pattern.row_length(i), &row_entries[0],
-                            &row_values[0], INSERT_VALUES);
-            }
-
-          compress ();
-#else
+          // available:
 
           // first set up the column number
           // array for the rows to be stored
@@ -541,7 +517,6 @@ namespace PETScWrappers
 #endif // version <=2.3.3
           compress ();
 
-#endif
 
           // Tell PETSc that we are not
           // planning on adding new entries

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.