From 6a1a41976353f243e1236ba2fa8df09dbaf26784 Mon Sep 17 00:00:00 2001 From: ESeNonFossiIo Date: Tue, 19 Apr 2016 10:55:29 +0200 Subject: [PATCH] Remove nullptr --- source/lac/petsc_parallel_sparse_matrix.cc | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/lac/petsc_parallel_sparse_matrix.cc b/source/lac/petsc_parallel_sparse_matrix.cc index 237bf29268..c4d0c84eb5 100644 --- a/source/lac/petsc_parallel_sparse_matrix.cc +++ b/source/lac/petsc_parallel_sparse_matrix.cc @@ -898,25 +898,25 @@ namespace PETScWrappers #else PetscInt n_rows, n_cols, min, max, size; PetscErrorCode ierr; - IS *rows = nullptr; - IS *cols = nullptr; - IS *is = nullptr; + IS rows, cols; ierr = MatGetSize (matrix, &n_rows, &n_cols); AssertThrow (ierr == 0, ExcPETScError(ierr)); - ierr = MatGetOwnershipIS(matrix, rows, cols); + + ierr = MatGetOwnershipIS(matrix, &rows, &cols); AssertThrow (ierr == 0, ExcPETScError(ierr)); - ierr = ISGetMinMax(*rows, &min, &max); + + ierr = ISGetMinMax(rows, &min, &max); AssertThrow (ierr == 0, ExcPETScError(ierr)); - IndexSet locally_owned_domain_indices(n_rows); - locally_owned_domain_indices.add_range(min, max); + IndexSet indices(n_rows); + indices.add_range(min, max); - ierr = ISGetLocalSize(*is, &size); + ierr = ISGetLocalSize(rows, &size); AssertThrow (ierr == 0, ExcPETScError(ierr)); Assert(size==max-min+1, ExcMessage("PETSc is requiring non contiguous memory allocation.")); - return locally_owned_domain_indices; + return indices; #endif } @@ -928,25 +928,25 @@ namespace PETScWrappers #else PetscInt n_rows, n_cols, min, max, size; PetscErrorCode ierr; - IS *rows = nullptr; - IS *cols = nullptr; - IS *is = nullptr; + IS rows, cols; ierr = MatGetSize (matrix, &n_rows, &n_cols); AssertThrow (ierr == 0, ExcPETScError(ierr)); - ierr = MatGetOwnershipIS(matrix, rows, cols); + + ierr = MatGetOwnershipIS(matrix, &rows, &cols); AssertThrow (ierr == 0, ExcPETScError(ierr)); - ierr = ISGetMinMax(*cols, &min, &max); + + ierr = ISGetMinMax(cols, &min, &max); AssertThrow (ierr == 0, ExcPETScError(ierr)); - IndexSet locally_owned_range_indices(n_cols); - locally_owned_range_indices.add_range(min, max); + IndexSet indices(n_cols); + indices.add_range(min, max); - ierr = ISGetLocalSize(*is, &size); + ierr = ISGetLocalSize(cols, &size); AssertThrow (ierr == 0, ExcPETScError(ierr)); Assert(size==max-min+1, ExcMessage("PETSc is requiring non contiguous memory allocation.")); - return locally_owned_range_indices; + return indices; #endif } -- 2.39.5