]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update the documentation of some PETScWrappers::MatrixBase member variables. 5674/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 23 Dec 2017 16:20:52 +0000 (09:20 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 24 Dec 2017 21:54:10 +0000 (14:54 -0700)
include/deal.II/lac/petsc_matrix_base.h

index befee04f5b35bef6e3fc368f5e91aead21f8a8cd..72cb897e305f04636d4845f4d444285ce81dbb6c 100644 (file)
@@ -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<PetscInt> column_indices;
+    mutable std::vector<PetscInt> 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<PetscScalar> column_values;
+    mutable std::vector<PetscScalar> column_values;
 
 
     /**

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.