@@ -172,11 +172,11 @@ void PetscMatrix<T>::init (const numeric_index_type m_in,
172
172
173
173
ierr = MatSetType (_mat , MATBAIJ ); // Automatically chooses seqbaij or mpibaij
174
174
LIBMESH_CHKERR (ierr );
175
- ierr = MatSeqBAIJSetPreallocation (_mat , blocksize , n_nz /blocksize , PETSC_NULL );
175
+ ierr = MatSeqBAIJSetPreallocation (_mat , blocksize , n_nz /blocksize , NULL );
176
176
LIBMESH_CHKERR (ierr );
177
177
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 );
180
180
LIBMESH_CHKERR (ierr );
181
181
}
182
182
else
@@ -186,17 +186,17 @@ void PetscMatrix<T>::init (const numeric_index_type m_in,
186
186
case AIJ :
187
187
ierr = MatSetType (_mat , MATAIJ ); // Automatically chooses seqaij or mpiaij
188
188
LIBMESH_CHKERR (ierr );
189
- ierr = MatSeqAIJSetPreallocation (_mat , n_nz , PETSC_NULL );
189
+ ierr = MatSeqAIJSetPreallocation (_mat , n_nz , NULL );
190
190
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 );
192
192
LIBMESH_CHKERR (ierr );
193
193
break ;
194
194
195
195
case HYPRE :
196
196
#if !PETSC_VERSION_LESS_THAN (3 ,9 ,4 ) && LIBMESH_HAVE_PETSC_HYPRE
197
197
ierr = MatSetType (_mat , MATHYPRE );
198
198
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 );
200
200
LIBMESH_CHKERR (ierr );
201
201
#else
202
202
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
514
514
ierr = MatZeroRows (_mat , rows .size (),
515
515
numeric_petsc_cast (rows .data ()), diag_value );
516
516
else
517
- ierr = MatZeroRows (_mat , 0 , PETSC_NULL , diag_value );
517
+ ierr = MatZeroRows (_mat , 0 , NULL , diag_value );
518
518
#else
519
519
// As of petsc-dev at the time of 3.1.0, MatZeroRows now takes two additional
520
520
// 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
523
523
if (!rows .empty ())
524
524
ierr = MatZeroRows (_mat , cast_int < PetscInt > (rows .size ()),
525
525
numeric_petsc_cast (rows .data ()), diag_value ,
526
- PETSC_NULL , PETSC_NULL );
526
+ NULL , NULL );
527
527
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 );
530
530
#endif
531
531
532
532
LIBMESH_CHKERR (ierr );
@@ -939,7 +939,7 @@ void PetscMatrix<T>::get_transpose (SparseMatrix<T> & dest) const
939
939
PetscErrorCode ierr ;
940
940
#if PETSC_VERSION_LESS_THAN (3 ,0 ,0 )
941
941
if (& petsc_dest == this )
942
- ierr = MatTranspose (_mat ,PETSC_NULL );
942
+ ierr = MatTranspose (_mat ,NULL );
943
943
else
944
944
ierr = MatTranspose (_mat ,& petsc_dest ._mat );
945
945
LIBMESH_CHKERR (ierr );
@@ -1017,7 +1017,7 @@ numeric_index_type PetscMatrix<T>::local_m () const
1017
1017
1018
1018
PetscInt m = 0 ;
1019
1019
1020
- auto ierr = MatGetLocalSize (_mat , & m , PETSC_NULL );
1020
+ auto ierr = MatGetLocalSize (_mat , & m , NULL );
1021
1021
LIBMESH_CHKERR (ierr );
1022
1022
1023
1023
return static_cast < numeric_index_type > (m );
@@ -1044,7 +1044,7 @@ numeric_index_type PetscMatrix<T>::local_n () const
1044
1044
1045
1045
PetscInt n = 0 ;
1046
1046
1047
- auto ierr = MatGetLocalSize (_mat , PETSC_NULL , & n );
1047
+ auto ierr = MatGetLocalSize (_mat , NULL , & n );
1048
1048
LIBMESH_CHKERR (ierr );
1049
1049
1050
1050
return static_cast < numeric_index_type > (n );
0 commit comments