Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrum committed Jul 5, 2022
1 parent ae34268 commit 0579b4c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions include/deal.II/lac/sparse_matrix_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ namespace SparseMatrixTools
* u^{n} = u^{n-1} + \sum_{i} R_i^T A_i^{-1} R_i (f - A u^{n-1})
* @f]
* is performed to iterativly solve a system of type $Au=f$.
*
* @warning This is a collective call that needs to be executed by all
* processes in the communicator.
*/
template <typename SparseMatrixType,
typename SparsityPatternType,
Expand All @@ -102,6 +105,9 @@ namespace SparseMatrixTools
* to locally owned and ghost indices. As a consequence, the most
* typical usecase will be to pass in the set of locally owned DoFs and set
* of active or locally relevant DoFs.
*
* @warning This is a collective call that needs to be executed by all
* processes in the communicator.
*/
template <typename SparseMatrixType,
typename SparsityPatternType,
Expand All @@ -126,6 +132,9 @@ namespace SparseMatrixTools
* trivial, since 1) rows might be owned by different processes and 2) degrees
* of freedoms might be constrained, resulting in "missing" entries in the
* matrix.
*
* @warning This is a collective call that needs to be executed by all
* processes in the communicator.
*/
template <int dim,
int spacedim,
Expand Down Expand Up @@ -290,6 +299,8 @@ namespace SparseMatrixTools
if (index_set_1.size() != 0)
index_set_union.add_indices(index_set_1_cleared);

// TODO: actually only communicate remote rows as in the case of
// SparseMatrixTools::restrict_to_cells()
const auto locally_relevant_matrix_entries =
internal::extract_remote_rows<typename SparseMatrixType2::value_type>(
system_matrix,
Expand Down
4 changes: 3 additions & 1 deletion tests/lac/sparse_matrix_tools_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,22 @@ main(int argc, char *argv[])

MPILogInitAll all;

// SparseMatrix -> SparseMatrix
if (Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1)
test<2,
SparseMatrix<double>,
SparsityPattern,
SparseMatrix<double>,
SparsityPattern>();

// TrilinosWrappers::SparseMatrix -> SparseMatrix
test<2,
TrilinosWrappers::SparseMatrix,
TrilinosWrappers::SparsityPattern,
SparseMatrix<double>,
SparsityPattern>();


// TrilinosWrappers::SparseMatrix -> TrilinosWrappers::SparseMatrix
test<2,
TrilinosWrappers::SparseMatrix,
TrilinosWrappers::SparsityPattern,
Expand Down

0 comments on commit 0579b4c

Please sign in to comment.