Skip to content

Commit 93a2181

Browse files
committed
PETSC_NULL -> NULL
1 parent b45e739 commit 93a2181

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/numerics/petsc_matrix.C

+13-13
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ void PetscMatrix<T>::init (const numeric_index_type m_in,
172172

173173
ierr = MatSetType(_mat, MATBAIJ); // Automatically chooses seqbaij or mpibaij
174174
LIBMESH_CHKERR(ierr);
175-
ierr = MatSeqBAIJSetPreallocation(_mat, blocksize, n_nz/blocksize, PETSC_NULL);
175+
ierr = MatSeqBAIJSetPreallocation(_mat, blocksize, n_nz/blocksize, NULL);
176176
LIBMESH_CHKERR(ierr);
177177
ierr = MatMPIBAIJSetPreallocation(_mat, blocksize,
178-
n_nz/blocksize, PETSC_NULL,
179-
n_oz/blocksize, PETSC_NULL);
178+
n_nz/blocksize, NULL,
179+
n_oz/blocksize, NULL);
180180
LIBMESH_CHKERR(ierr);
181181
}
182182
else
@@ -186,17 +186,17 @@ void PetscMatrix<T>::init (const numeric_index_type m_in,
186186
case AIJ:
187187
ierr = MatSetType(_mat, MATAIJ); // Automatically chooses seqaij or mpiaij
188188
LIBMESH_CHKERR(ierr);
189-
ierr = MatSeqAIJSetPreallocation(_mat, n_nz, PETSC_NULL);
189+
ierr = MatSeqAIJSetPreallocation(_mat, n_nz, NULL);
190190
LIBMESH_CHKERR(ierr);
191-
ierr = MatMPIAIJSetPreallocation(_mat, n_nz, PETSC_NULL, n_oz, PETSC_NULL);
191+
ierr = MatMPIAIJSetPreallocation(_mat, n_nz, NULL, n_oz, NULL);
192192
LIBMESH_CHKERR(ierr);
193193
break;
194194

195195
case HYPRE:
196196
#if !PETSC_VERSION_LESS_THAN(3,9,4) && LIBMESH_HAVE_PETSC_HYPRE
197197
ierr = MatSetType(_mat, MATHYPRE);
198198
LIBMESH_CHKERR(ierr);
199-
ierr = MatHYPRESetPreallocation(_mat, n_nz, PETSC_NULL, n_oz, PETSC_NULL);
199+
ierr = MatHYPRESetPreallocation(_mat, n_nz, NULL, n_oz, NULL);
200200
LIBMESH_CHKERR(ierr);
201201
#else
202202
libmesh_error_msg("PETSc 3.9.4 or higher with hypre is required for MatHypre");
@@ -514,7 +514,7 @@ void PetscMatrix<T>::zero_rows (std::vector<numeric_index_type> & rows, T diag_v
514514
ierr = MatZeroRows(_mat, rows.size(),
515515
numeric_petsc_cast(rows.data()), diag_value);
516516
else
517-
ierr = MatZeroRows(_mat, 0, PETSC_NULL, diag_value);
517+
ierr = MatZeroRows(_mat, 0, NULL, diag_value);
518518
#else
519519
// As of petsc-dev at the time of 3.1.0, MatZeroRows now takes two additional
520520
// optional arguments. The optional arguments (x,b) can be used to specify the
@@ -523,10 +523,10 @@ void PetscMatrix<T>::zero_rows (std::vector<numeric_index_type> & rows, T diag_v
523523
if (!rows.empty())
524524
ierr = MatZeroRows(_mat, cast_int<PetscInt>(rows.size()),
525525
numeric_petsc_cast(rows.data()), diag_value,
526-
PETSC_NULL, PETSC_NULL);
526+
NULL, NULL);
527527
else
528-
ierr = MatZeroRows(_mat, 0, PETSC_NULL, diag_value, PETSC_NULL,
529-
PETSC_NULL);
528+
ierr = MatZeroRows(_mat, 0, NULL, diag_value, NULL,
529+
NULL);
530530
#endif
531531

532532
LIBMESH_CHKERR(ierr);
@@ -939,7 +939,7 @@ void PetscMatrix<T>::get_transpose (SparseMatrix<T> & dest) const
939939
PetscErrorCode ierr;
940940
#if PETSC_VERSION_LESS_THAN(3,0,0)
941941
if (&petsc_dest == this)
942-
ierr = MatTranspose(_mat,PETSC_NULL);
942+
ierr = MatTranspose(_mat,NULL);
943943
else
944944
ierr = MatTranspose(_mat,&petsc_dest._mat);
945945
LIBMESH_CHKERR(ierr);
@@ -1017,7 +1017,7 @@ numeric_index_type PetscMatrix<T>::local_m () const
10171017

10181018
PetscInt m = 0;
10191019

1020-
auto ierr = MatGetLocalSize (_mat, &m, PETSC_NULL);
1020+
auto ierr = MatGetLocalSize (_mat, &m, NULL);
10211021
LIBMESH_CHKERR(ierr);
10221022

10231023
return static_cast<numeric_index_type>(m);
@@ -1044,7 +1044,7 @@ numeric_index_type PetscMatrix<T>::local_n () const
10441044

10451045
PetscInt n = 0;
10461046

1047-
auto ierr = MatGetLocalSize (_mat, PETSC_NULL, &n);
1047+
auto ierr = MatGetLocalSize (_mat, NULL, &n);
10481048
LIBMESH_CHKERR(ierr);
10491049

10501050
return static_cast<numeric_index_type>(n);

0 commit comments

Comments
 (0)