From 4cd7ffb38ece1af2397f059a66e74c8013d89da2 Mon Sep 17 00:00:00 2001 From: nivesh Date: Mon, 2 Apr 2018 14:02:25 +0200 Subject: [PATCH] assertions checking if pointers are null are moved inside loop --- source/lac/sparsity_tools.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index e26b02aea4..299e95ccec 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -203,9 +203,6 @@ namespace SparsityTools ZOLTAN_ID_PTR nextNborGID = nborGID; int *nextNborProc = nborProc; - Assert( nextNborGID != nullptr , ExcInternalError() ); - Assert( nextNborProc != nullptr , ExcInternalError() ); - //Loop through rows corresponding to indices in globalID implicitly for (SparsityPattern::size_type i=0; i < static_cast(num_obj); ++i) { @@ -215,6 +212,9 @@ namespace SparsityTools //Ignore diagonal entries. Not needed for partitioning. if ( i != col->column() ) { + Assert( nextNborGID != nullptr , ExcInternalError() ); + Assert( nextNborProc != nullptr , ExcInternalError() ); + *nextNborGID++ = col->column(); *nextNborProc++ = 0; //All the vertices on processor 0 } -- 2.39.5