From 648cc55af72fcf6eb92b670f12de78bdc47d76f9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 31 Dec 2023 17:07:33 -0700 Subject: [PATCH] Make a couple of functions 'private'. These functions were 'protected', but nothing ever derives from this class. The functions are only called from another class that is a 'friend', which means that these functions might as well be 'private'. --- include/deal.II/lac/trilinos_sparse_matrix.h | 48 ++++++++++---------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/include/deal.II/lac/trilinos_sparse_matrix.h b/include/deal.II/lac/trilinos_sparse_matrix.h index b74256504f..a653ef3068 100644 --- a/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_sparse_matrix.h @@ -1908,29 +1908,6 @@ namespace TrilinosWrappers protected: - /** - * For some matrix storage formats, in particular for the PETSc - * distributed blockmatrices, set and add operations on individual - * elements can not be freely mixed. Rather, one has to synchronize - * operations when one wants to switch from setting elements to adding to - * elements. BlockMatrixBase automatically synchronizes the access by - * calling this helper function for each block. This function ensures - * that the matrix is in a state that allows adding elements; if it - * previously already was in this state, the function does nothing. - */ - void - prepare_add(); - - /** - * Same as prepare_add() but prepare the matrix for setting elements if - * the representation of elements in this class requires such an - * operation. - */ - void - prepare_set(); - - - private: /** * Pointer to the user-supplied Epetra Trilinos mapping of the matrix @@ -1976,6 +1953,31 @@ namespace TrilinosWrappers */ bool compressed; + /** + * For some matrix storage formats, in particular for the PETSc + * distributed blockmatrices, set and add operations on individual + * elements can not be freely mixed. Rather, one has to synchronize + * operations when one wants to switch from setting elements to adding to + * elements. BlockMatrixBase automatically synchronizes the access by + * calling this helper function for each block. This function ensures + * that the matrix is in a state that allows adding elements; if it + * previously already was in this state, the function does nothing. + * + * This function is called from BlockMatrixBase. + */ + void + prepare_add(); + + /** + * Same as prepare_add() but prepare the matrix for setting elements if + * the representation of elements in this class requires such an + * operation. + * + * This function is called from BlockMatrixBase. + */ + void + prepare_set(); + // To allow calling protected prepare_add() and prepare_set(). friend class BlockMatrixBase; }; -- 2.39.5