From 119873b3265d6389d6d9b0efc882fd09a73f4cdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Fritze?= <rene.fritze@wwu.de>
Date: Wed, 30 Mar 2022 14:23:44 +0200
Subject: [PATCH] [tests] fix build for integrands_{laplace,product}

---
 dune/gdt/test/integrands/integrands_laplace.cc | 13 ++++++++-----
 dune/gdt/test/integrands/integrands_product.cc | 14 +++++++++-----
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/dune/gdt/test/integrands/integrands_laplace.cc b/dune/gdt/test/integrands/integrands_laplace.cc
index 09f106231..69b164f1a 100644
--- a/dune/gdt/test/integrands/integrands_laplace.cc
+++ b/dune/gdt/test/integrands/integrands_laplace.cc
@@ -119,11 +119,14 @@ struct LaplaceIntegrandTest : public IntegrandTest<G>
     // std::string grid_name = XT::Common::Typename<G>::value();
     const auto space = make_continuous_lagrange_space<1>(grid_view, /*polorder=*/2);
     const auto n = space.mapper().size();
-    MatrixType stiffness_matrix(n, n, make_element_sparsity_pattern(space, space, grid_view));
-    MatrixOperator<GV, 1> laplace_operator(grid_view, space, space, stiffness_matrix);
-    laplace_operator.append(LocalElementIntegralBilinearForm<E, 1>(integrand));
-    laplace_operator.assemble(true);
-    const auto mat_data_ptr = XT::Common::serialize_rowwise(stiffness_matrix);
+    BilinearForm<GV, 1> laplace_form(grid_view);
+    laplace_form += LocalElementIntegralBilinearForm<E, 1>(integrand);
+    auto laplace_op = laplace_form.template with<MatrixType>(space, space);
+    auto walker = XT::Grid::make_walker(grid_view);
+    walker.append(laplace_op);
+    walker.walk(DXTC_TEST_CONFIG_GET("setup.use_tbb", true));
+
+    const auto mat_data_ptr = XT::Common::serialize_rowwise(laplace_op.matrix());
     const auto min_entry = *std::min_element(mat_data_ptr.begin(), mat_data_ptr.begin() + n * n);
     const auto max_entry = *std::max_element(mat_data_ptr.begin(), mat_data_ptr.begin() + n * n);
     const auto square_sum = std::accumulate(
diff --git a/dune/gdt/test/integrands/integrands_product.cc b/dune/gdt/test/integrands/integrands_product.cc
index 7e8c743e9..a2e40a8c7 100644
--- a/dune/gdt/test/integrands/integrands_product.cc
+++ b/dune/gdt/test/integrands/integrands_product.cc
@@ -110,11 +110,15 @@ struct ProductIntegrandTest : public IntegrandTest<G>
     const auto& grid_view = grid_provider_->leaf_view();
     const auto space = make_continuous_lagrange_space<1>(grid_view, /*polorder=*/2);
     const auto n = space.mapper().size();
-    MatrixType mass_matrix(n, n, make_element_sparsity_pattern(space, space, grid_view));
-    MatrixOperator<GV, 1> product_operator(grid_view, space, space, mass_matrix);
-    product_operator.append(LocalElementIntegralBilinearForm<E, 1>(integrand));
-    product_operator.assemble(true);
-    const auto mat_data_ptr = XT::Common::serialize_rowwise(mass_matrix);
+
+    BilinearForm<GV, 1> product_form(grid_view);
+    product_form += LocalElementIntegralBilinearForm<E, 1>(integrand);
+    auto product_op = product_form.template with<MatrixType>(space, space);
+    auto walker = XT::Grid::make_walker(grid_view);
+    walker.append(product_op);
+    walker.walk(DXTC_TEST_CONFIG_GET("setup.use_tbb", true));
+
+    const auto mat_data_ptr = XT::Common::serialize_rowwise(product_op.matrix());
     const auto min_entry = *std::min_element(mat_data_ptr.begin(), mat_data_ptr.begin() + n * n);
     const auto max_entry = *std::max_element(mat_data_ptr.begin(), mat_data_ptr.begin() + n * n);
     const auto square_sum = std::accumulate(
-- 
GitLab