From 58764b99c344e6db51e6a54bd2170607bb32c96d Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Wed, 26 Mar 2014 12:32:55 +0100 Subject: [PATCH] Revise documentation according to the more comments by Nori and Tom --- MathLib/LinAlg/PETSc/PETScMatrix.h | 15 +++++---------- Tests/MathLib/TestGlobalMatrixInterface.cpp | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/MathLib/LinAlg/PETSc/PETScMatrix.h b/MathLib/LinAlg/PETSc/PETScMatrix.h index 31fd60745d2..40eb50c94e5 100644 --- a/MathLib/LinAlg/PETSc/PETScMatrix.h +++ b/MathLib/LinAlg/PETSc/PETScMatrix.h @@ -27,7 +27,8 @@ namespace MathLib { /*! - \brief Wrapper class for PETSc matrix routines + \brief Wrapper class for PETSc matrix routines for a square matrix for + the system of linear equations. */ class PETScMatrix { @@ -43,7 +44,7 @@ class PETScMatrix /*! \brief Constructor for the user determined matrix partitioning with two options. - \param size The dimension of the matrix or the submatrix. + \param size The number of rows of the matrix or the local matrix. \param n_loc_cols Number of the columns of the rank. If it is -1, it is PETSC_DECIDE. \param is_global_size The flag of the type of vec_size, @@ -55,7 +56,7 @@ class PETScMatrix /*! \brief Constructor for the user determined partitioning with more options - \param size The dimension of the matrix or the submatrix. + \param size The number of rows of the matrix or the local matrix. \param mat_op The configuration information for creating a matrix. */ PETScMatrix(const PetscInt size, const PETScMatrixOption &mat_op = PETScMatrixOption() ); @@ -67,7 +68,7 @@ class PETScMatrix /*! \brief Config memory allocation and set the related member data. - Only called when an intance is created with the constructor + Only called after an intance is created with the constructor wthout PETScMatrixOption argument. \param mat_op The configuration information for creating a matrix. */ @@ -84,12 +85,6 @@ class PETScMatrix MatAssemblyEnd(_A, asm_type); } - /// Get the dimension. - PetscInt getDimension() const - { - return _size; - } - /// Get the number of rows. PetscInt getNRows() const { diff --git a/Tests/MathLib/TestGlobalMatrixInterface.cpp b/Tests/MathLib/TestGlobalMatrixInterface.cpp index 807f5dd1413..bae80573d6d 100644 --- a/Tests/MathLib/TestGlobalMatrixInterface.cpp +++ b/Tests/MathLib/TestGlobalMatrixInterface.cpp @@ -61,7 +61,7 @@ void checkGlobalMatrixInterfaceMPI(T_MATRIX &m, T_VECTOR &v) MPI_Comm_rank(PETSC_COMM_WORLD, &mrank); ASSERT_EQ(3u, msize); - ASSERT_EQ(6u, m.getDimension()); + ASSERT_EQ(6u, m.getNRows()); ASSERT_EQ(m.getRangeEnd()-m.getRangeBegin(), m.getNLocalRows()); int gathered_cols; -- GitLab