]> https://gitweb.dealii.org/ - dealii.git/commitdiff
use std::vector for the prolongation matrix 3870/head
authorKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 30 Jan 2017 11:31:40 +0000 (12:31 +0100)
committerKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 30 Jan 2017 12:47:10 +0000 (13:47 +0100)
this remove implementation details from the setup code

include/deal.II/multigrid/mg_transfer_internal.h
source/multigrid/mg_transfer_matrix_free.cc

index 0f5f6c97ebd3c2d96ae63395676b2c0ba955f2d1..da35f8814cfe29b7ba8c5ac558424e7f2595cd72 100644 (file)
@@ -97,7 +97,7 @@ namespace internal
        * Holds the one-dimensional embedding (prolongation) matrix from mother
        * element to all the children.
        */
-      AlignedVector<VectorizedArray<Number> > prolongation_matrix_1d;
+      std::vector<Number> prolongation_matrix_1d;
 
     };
 
index 7bf82ed31b7715ae358c42eebd871b510966f6b2..ce5ea1cbbb95076e3571fd6e4a8296e0ae02f299 100644 (file)
@@ -115,8 +115,11 @@ void MGTransferMatrixFree<dim,Number>::build
   element_is_continuous    = elem_info.element_is_continuous;
   n_components             = elem_info.n_components;
   n_child_cell_dofs        = elem_info.n_child_cell_dofs;
-  prolongation_matrix_1d   = elem_info.prolongation_matrix_1d;
 
+  // duplicate and put into vectorized array
+  prolongation_matrix_1d.resize(elem_info.prolongation_matrix_1d.size());
+  for (unsigned int i=0; i<elem_info.prolongation_matrix_1d.size(); i++)
+    prolongation_matrix_1d[i] = elem_info.prolongation_matrix_1d[i];
 
   // reshuffle into aligned vector of vectorized arrays
   const unsigned int vec_size = VectorizedArray<Number>::n_array_elements;

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.