From: Wolfgang Bangerth Date: Sun, 19 Jul 2015 14:15:09 +0000 (-0500) Subject: Clone the base elements of FESystem in parallel. X-Git-Tag: v8.4.0-rc2~743^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb2d015f6ab46a9bc261daa8b4176961367ec89;p=dealii.git Clone the base elements of FESystem in parallel. In the constructor of FESystem, we clone the base elements, which requires constructing new finite element objects -- an expensive task. This patch does this in parallel for the base elements. --- diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index e460f80e0b..3cffc168ef 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -1849,6 +1849,13 @@ void FESystem::initialize (const std::vector0) this->base_to_block_indices.push_back( multiplicities[i] ); + std::vector*> > clone_base_elements; + + for (unsigned int i=0; i0) + clone_base_elements.push_back (Threads::new_task (&FiniteElement::clone, + *fes[i])); + unsigned int ind=0; for (unsigned int i=0; i::initialize (const std::vector > - (fes[i]->clone()), + (clone_base_elements[ind].return_value()), multiplicities[i]); ++ind; }