]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MGTwoLevelTransfer: do not store identity matrix 11820/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 28 Feb 2021 06:30:14 +0000 (07:30 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 1 Mar 2021 11:55:28 +0000 (12:55 +0100)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 933f550cbc508f10cfc9ca380a9ced8cee010dd7..905c115b756e1f9edd8a0b4b5114a1963552303d 100644 (file)
@@ -1221,33 +1221,9 @@ namespace internal
       }
 
       // ------------- prolongation matrix (0) -> identity matrix --------------
-      {
-        AssertDimension(fe_fine.n_base_elements(), 1);
-        if (reference_cell == ReferenceCells::get_hypercube<dim>())
-          {
-            const auto fe = create_1D_fe(fe_fine.base_element(0));
-
-            transfer.schemes[0].prolongation_matrix_1d.resize(
-              fe->dofs_per_cell * fe->dofs_per_cell);
 
-            for (unsigned int i = 0; i < fe->dofs_per_cell; i++)
-              transfer.schemes[0]
-                .prolongation_matrix_1d[i + i * fe->dofs_per_cell] =
-                Number(1.0);
-          }
-        else
-          {
-            const unsigned int n_dofs_per_cell =
-              fe_fine.base_element(0).n_dofs_per_cell();
-
-            transfer.schemes[0].prolongation_matrix.resize(n_dofs_per_cell *
-                                                           n_dofs_per_cell);
-
-            for (unsigned int i = 0; i < n_dofs_per_cell; i++)
-              transfer.schemes[0].prolongation_matrix[i + i * n_dofs_per_cell] =
-                Number(1.0);
-          }
-      }
+      // nothing to do since for identity prolongation matrices a short-cut
+      // code path is used during prolongation/restriction
 
       // ----------------------- prolongation matrix (1) -----------------------
       {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.