From 974c18885ebb7834ae0d8ade689c4d7e9f555b44 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 5 Feb 2021 17:25:12 -0700 Subject: [PATCH] Update SparsityPattern/SparseMatrix::copy_from() documentation. --- include/deal.II/lac/sparse_matrix.h | 8 ++++++-- include/deal.II/lac/sparsity_pattern.h | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index d49b7db9ff..2d61224122 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -973,8 +973,12 @@ public: /** * Copy the nonzero entries of a full matrix into this object. Previous - * content is deleted. Note that the underlying sparsity pattern must be - * appropriate to hold the nonzero entries of the full matrix. + * content is deleted. + * + * Note that the underlying sparsity pattern must be appropriate to + * hold the nonzero entries of the full matrix. This can be achieved + * using that version of SparsityPattern::copy_from() that takes a + * FullMatrix as argument. */ template void diff --git a/include/deal.II/lac/sparsity_pattern.h b/include/deal.II/lac/sparsity_pattern.h index 5d318174ad..e1fe0a6837 100644 --- a/include/deal.II/lac/sparsity_pattern.h +++ b/include/deal.II/lac/sparsity_pattern.h @@ -1138,6 +1138,13 @@ public: * * Previous content of this object is lost, and the sparsity pattern is in * compressed mode afterwards. + * + * Once you have built a sparsity pattern with this function, you + * probably want to attach a SparseMatrix object to it. The original + * `matrix` object can then be copied into this SparseMatrix object + * using the version of SparseMatrix::copy_from() that takes a + * FullMatrix object as argument. Through this procedure, you can + * convert a FullMatrix into a SparseMatrix. */ template void -- 2.39.5