From cfb991e5372736605fb06ab28b4382d97046f688 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 23 Dec 2017 09:20:52 -0700 Subject: [PATCH] Update the documentation of some PETScWrappers::MatrixBase member variables. --- include/deal.II/lac/petsc_matrix_base.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/petsc_matrix_base.h b/include/deal.II/lac/petsc_matrix_base.h index befee04f5b..72cb897e30 100644 --- a/include/deal.II/lac/petsc_matrix_base.h +++ b/include/deal.II/lac/petsc_matrix_base.h @@ -960,15 +960,27 @@ namespace PETScWrappers * An internal array of integer values that is used to store the column * indices when adding/inserting local data into the (large) sparse * matrix. + * + * This variable does not store any "state" of the matrix + * object. Rather, it is only used as a temporary buffer by some + * of the member functions of this class. As with all @p mutable + * member variables, the use of this variable is not thread-safe + * unless guarded by a mutex. However, since PETSc matrix + * operations are not thread-safe anyway, there is no need to + * attempt to make things thread-safe, and so there is no mutex + * associated with this variable. */ - std::vector column_indices; + mutable std::vector column_indices; /** * An internal array of double values that is used to store the column * indices when adding/inserting local data into the (large) sparse * matrix. + * + * The same comment as for the @p column_indices variable above + * applies. */ - std::vector column_values; + mutable std::vector column_values; /** -- 2.39.5