From b92cbd07f281f88b5ac566e62619deaa8e1ca138 Mon Sep 17 00:00:00 2001
From: Wenqing Wang <wenqing.wang@ufz.de>
Date: Mon, 24 Mar 2014 14:39:30 +0100
Subject: [PATCH] Change back the name of _d_nz and o_nz

---
 MathLib/LinAlg/PETSc/PETScMatrix.cpp        | 2 +-
 MathLib/LinAlg/PETSc/PETScMatrixOption.h    | 6 +++---
 Tests/MathLib/TestGlobalMatrixInterface.cpp | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/MathLib/LinAlg/PETSc/PETScMatrix.cpp b/MathLib/LinAlg/PETSc/PETScMatrix.cpp
index 1d6cbaa6858..9e70c395905 100644
--- a/MathLib/LinAlg/PETSc/PETScMatrix.cpp
+++ b/MathLib/LinAlg/PETSc/PETScMatrix.cpp
@@ -33,7 +33,7 @@ PETScMatrix::PETScMatrix (const PetscInt size, const PETScMatrixOption &mat_opt)
     MatSetFromOptions(_A);
 
     // for a dense matrix: MatSeqAIJSetPreallocation(_A, d_nz, PETSC_NULL);
-    MatMPIAIJSetPreallocation(_A, mat_opt._d_nnz, PETSC_NULL, mat_opt._o_nnz, PETSC_NULL);
+    MatMPIAIJSetPreallocation(_A, mat_opt._d_nz, PETSC_NULL, mat_opt._o_nz, PETSC_NULL);
 
     MatGetOwnershipRange(_A, &_start_rank, &_end_rank);
     MatGetSize(_A, &_size,  PETSC_NULL);
diff --git a/MathLib/LinAlg/PETSc/PETScMatrixOption.h b/MathLib/LinAlg/PETSc/PETScMatrixOption.h
index f9add25c2a6..1b56c139b89 100644
--- a/MathLib/LinAlg/PETSc/PETScMatrixOption.h
+++ b/MathLib/LinAlg/PETSc/PETScMatrixOption.h
@@ -24,7 +24,7 @@ namespace MathLib
 struct PETScMatrixOption
 {
     PETScMatrixOption() :  _is_global_size(true), _n_local_cols(PETSC_DECIDE),
-        _d_nnz(PETSC_DECIDE), _o_nnz(PETSC_DECIDE)
+        _d_nz(PETSC_DECIDE), _o_nz(PETSC_DECIDE)
     { }
 
     /*!
@@ -43,13 +43,13 @@ struct PETScMatrixOption
      \brief Number of nonzeros per row in DIAGONAL portion of local submatrix
            (same value is used for all local rows), the default is PETSC_DECIDE
     */
-    PetscInt _d_nnz;
+    PetscInt _d_nz;
 
     /*!
      \brief Number of nonzeros per row in the OFF-DIAGONAL portion of local submatrix
             (same value is used for all local rows), the default is PETSC_DECIDE
     */
-    PetscInt _o_nnz;
+    PetscInt _o_nz;
 };
 
 } // end namespace
diff --git a/Tests/MathLib/TestGlobalMatrixInterface.cpp b/Tests/MathLib/TestGlobalMatrixInterface.cpp
index a775af693aa..db3744da7e1 100644
--- a/Tests/MathLib/TestGlobalMatrixInterface.cpp
+++ b/Tests/MathLib/TestGlobalMatrixInterface.cpp
@@ -128,8 +128,8 @@ TEST(Math, CheckInterface_LisMatrix)
 TEST(Math, CheckInterface_PETScMatrix_Local_Size)
 {
     MathLib::PETScMatrixOption opt;
-    opt._d_nnz = 2;
-    opt._o_nnz = 0;
+    opt._d_nz = 2;
+    opt._o_nz = 0;
     opt._is_global_size = false;
     opt._n_local_cols = 2;
     MathLib::PETScMatrix A(2, opt);
@@ -142,8 +142,8 @@ TEST(Math, CheckInterface_PETScMatrix_Local_Size)
 TEST(Math, CheckInterface_PETScMatrix_Global_Size)
 {
     MathLib::PETScMatrixOption opt;
-    opt._d_nnz = 2;
-    opt._o_nnz = 0;
+    opt._d_nz = 2;
+    opt._o_nz = 0;
     MathLib::PETScMatrix A(6, opt);
 
     MathLib::PETScVector x(6);
-- 
GitLab