From fe0d85d9ab0e0a556142ea3e03a0cb8e00877d58 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 29 Aug 2022 22:10:13 +0200 Subject: [PATCH] Extend comment --- include/deal.II/matrix_free/operators.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index ffba56a8c9..a1e7f8c3e2 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -2388,7 +2388,9 @@ namespace MatrixFreeOperators eval_vector.reinit(cell); // This function assumes that we have the same result on all // components, so we only need to go through the columns of one scalar - // component, which can then be broadcast to all components + // component, for which we have created a separate evaluator (attached + // to the first component, but the component does not matter because + // we only use the underlying integrals) for (unsigned int i = 0; i < eval.dofs_per_cell; ++i) { for (unsigned int j = 0; j < eval.dofs_per_cell; ++j) @@ -2397,6 +2399,9 @@ namespace MatrixFreeOperators do_operation_on_cell(eval, cell); + // We now pick up the value on the diagonal (row i) and broadcast + // it to a second evaluator for all vector components, which we + // will distribute to the result vector afterwards for (unsigned int c = 0; c < n_components; ++c) eval_vector .begin_dof_values()[i + c * eval_vector.dofs_per_component] = -- 2.39.5