From 3bb2d015f6ab46a9bc261daa8b4176961367ec89 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 19 Jul 2015 09:15:09 -0500 Subject: [PATCH] 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. --- source/fe/fe_system.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.39.5