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));
#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
// 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));
}
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));
// convergence
ierr = KSPSetConvergenceTest (solver_data->ksp, &convergence_test,
reinterpret_cast<void *>(&solver_control),
- PETSC_NULL);
+ nullptr);
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
// 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
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));
}
{
// get converged eigenpair
const PetscErrorCode ierr = EPSGetEigenpair (eps, index,
- &eigenvalues, PETSC_NULL,
- eigenvectors, PETSC_NULL);
+ &eigenvalues, nullptr,
+ eigenvectors, nullptr);
AssertThrow (ierr == 0, ExcSLEPcError(ierr));
}