]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix locks.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 May 2013 18:43:56 +0000 (18:43 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 May 2013 18:43:56 +0000 (18:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@29576 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_q_base.cc
deal.II/source/fe/fe_system.cc

index 9705535b4014e37bcedc71a75f038b100b7cc4d4..0e106d7c2e9379eeb123db729b2583c3feeacd96 100644 (file)
@@ -1019,8 +1019,8 @@ FE_Q_Base<POLY,dim,spacedim>
   Assert (child<GeometryInfo<dim>::n_children(refinement_case),
           ExcIndexRange(child,0,GeometryInfo<dim>::n_children(refinement_case)));
 
-  // needs initialization?
-  Threads::Mutex::ScopedLock(this->mutex);
+  // initialization upon first request
+  Threads::Mutex::ScopedLock lock(this->mutex);
   if (this->prolongation[refinement_case-1][child].n() == 0)
     {
       // distinguish q/q_dg0 case: only treat Q dofs first
@@ -1188,8 +1188,8 @@ FE_Q_Base<POLY,dim,spacedim>
   Assert (child<GeometryInfo<dim>::n_children(refinement_case),
           ExcIndexRange(child,0,GeometryInfo<dim>::n_children(refinement_case)));
 
-  // needs initialization?
-  Threads::Mutex::ScopedLock(this->mutex);
+  // initialization upon first request
+  Threads::Mutex::ScopedLock lock(this->mutex);
   if (this->restriction[refinement_case-1][child].n() == 0)
     {
       FullMatrix<double> &restriction =
index c3ecf565909a313eb87c5153f0760b1da5e3c161..76c79d2b8ef0e0385af5514e83487953e4e70afb 100644 (file)
@@ -603,8 +603,8 @@ FESystem<dim,spacedim>
   Assert (child<GeometryInfo<dim>::n_children(refinement_case),
           ExcIndexRange(child,0,GeometryInfo<dim>::n_children(refinement_case)));
 
-  // needs initialization?
-  Threads::Mutex::ScopedLock(this->mutex);
+  // initialization upon first request
+  Threads::Mutex::ScopedLock lock(this->mutex);
   if (this->restriction[refinement_case-1][child].n() == 0)
     {
       // Check if some of the matrices of the base elements are void.
@@ -685,8 +685,8 @@ FESystem<dim,spacedim>
   Assert (child<GeometryInfo<dim>::n_children(refinement_case),
           ExcIndexRange(child,0,GeometryInfo<dim>::n_children(refinement_case)));
 
-  // needs initialization?
-  Threads::Mutex::ScopedLock(this->mutex);
+  // initialization upon first request
+  Threads::Mutex::ScopedLock lock(this->mutex);
   if (this->prolongation[refinement_case-1][child].n() == 0)
     {
       // Check if some of the matrices of the base elements are void.

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.