]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace PETSC_NULL
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 6 Apr 2017 23:03:54 +0000 (01:03 +0200)
committerDaniel Arndt <d.arndt@math.uni-goettingen.de>
Sat, 8 Apr 2017 18:43:54 +0000 (20:43 +0200)
include/deal.II/lac/petsc_vector_base.h
source/base/mpi.cc
source/lac/petsc_full_matrix.cc
source/lac/petsc_matrix_base.cc
source/lac/petsc_solver.cc
source/lac/slepc_solver.cc

index cf7dac42b421726e77ca351c73b2d395c77d2070..e52dd26678e06861be0d04c5791b41383b5e7e76 100644 (file)
@@ -1190,7 +1190,7 @@ namespace PETScWrappers
         PetscErrorCode ierr = VecGetOwnershipRange (vector, &begin, &end);
         AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-        Vec locally_stored_elements = PETSC_NULL;
+        Vec locally_stored_elements = nullptr;
         ierr = VecGhostGetLocalForm(vector, &locally_stored_elements);
         AssertThrow (ierr == 0, ExcPETScError(ierr));
 
index 2291631db9ca05d5e736851d1601ef1adca6b590..b2bd554b18f68c92a1113a710fe2bbc8c0cde749 100644 (file)
@@ -340,11 +340,11 @@ namespace Utilities
 #ifdef DEAL_II_WITH_PETSC
 #  ifdef DEAL_II_WITH_SLEPC
       // Initialize SLEPc (with PETSc):
-      ierr = SlepcInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
+      ierr = SlepcInitialize(&argc, &argv, nullptr, nullptr);
       AssertThrow (ierr == 0, SLEPcWrappers::SolverBase::ExcSLEPcError(ierr));
 #  else
       // or just initialize PETSc alone:
-      ierr = PetscInitialize(&argc, &argv, PETSC_NULL, PETSC_NULL);
+      ierr = PetscInitialize(&argc, &argv, nullptr, nullptr);
       AssertThrow (ierr == 0, ExcPETScError(ierr));
 #  endif
 #endif
index f47cf7db0e921161e6aafa4e18fecbea07c02b4d..a0938f0edc6c0b46d153db3cb5754c497be8607f 100644 (file)
@@ -56,7 +56,7 @@ namespace PETScWrappers
     // use the call sequence indicating only a maximal number of
     // elements per row for all rows globally
     const PetscErrorCode ierr = MatCreateSeqDense (PETSC_COMM_SELF, m, n,
-                                                   PETSC_NULL, &matrix);
+                                                   nullptr, &matrix);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
   }
 
index 4b0b53e89f18aebadb7c11fad33073a66ea00769..ac5c4b77db930cdaa7f902bb0a4b386aea2289d7 100644 (file)
@@ -161,7 +161,7 @@ namespace PETScWrappers
     const PetscErrorCode ierr = MatZeroRowsIS(matrix, index_set, new_diag_value);
 #else
     const PetscErrorCode ierr = MatZeroRowsIS(matrix, index_set, new_diag_value,
-                                              PETSC_NULL, PETSC_NULL);
+                                              nullptr, nullptr);
 #endif
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
index 1654a29d3d067adc1921bb0db078dcc908d07a30..7fad31b1f1682997e152490b700d23a92b9390fc 100644 (file)
@@ -110,7 +110,7 @@ namespace PETScWrappers
         // convergence
         ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
                                       reinterpret_cast<void *>(&solver_control),
-                                      PETSC_NULL);
+                                      nullptr);
         AssertThrow (ierr == 0, ExcPETScError(ierr));
       }
 
@@ -228,7 +228,7 @@ namespace PETScWrappers
     // convergence
     ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
                                   reinterpret_cast<void *>(&solver_control),
-                                  PETSC_NULL);
+                                  nullptr);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     // set the command line options provided
index 24481fb38a4eeac2168a2933ad108c53d5bc034d..1d1142fb11be1ceda99812b4edfd68fe36f1e734 100644 (file)
@@ -75,7 +75,7 @@ namespace SLEPcWrappers
   SolverBase::set_matrices (const PETScWrappers::MatrixBase &A)
   {
     // standard eigenspectrum problem
-    const PetscErrorCode ierr = EPSSetOperators (eps, A, PETSC_NULL);
+    const PetscErrorCode ierr = EPSSetOperators (eps, A, nullptr);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
 
@@ -231,8 +231,8 @@ namespace SLEPcWrappers
   {
     // get converged eigenpair
     const PetscErrorCode ierr = EPSGetEigenpair (eps, index,
-                                                 &eigenvalues, PETSC_NULL,
-                                                 eigenvectors, PETSC_NULL);
+                                                 &eigenvalues, nullptr,
+                                                 eigenvectors, nullptr);
     AssertThrow (ierr == 0, ExcSLEPcError(ierr));
   }
 

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.