From dcbc086e361dc70e4e41fc41c455d25ccb7bdc0c Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Thu, 29 Oct 2009 07:53:58 +0000
Subject: [PATCH] Fixed a bug when using openmp parallelization for assemlbing
 matrices.

---
 AMDiS/src/DOFMatrix.cc            |  1 -
 AMDiS/src/Operator.cc             |  5 -----
 AMDiS/src/SecondOrderAssembler.cc | 10 +++++-----
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/AMDiS/src/DOFMatrix.cc b/AMDiS/src/DOFMatrix.cc
index bd60a0e2..a4a71ed5 100644
--- a/AMDiS/src/DOFMatrix.cc
+++ b/AMDiS/src/DOFMatrix.cc
@@ -18,7 +18,6 @@
 namespace AMDiS {
 
   using namespace mtl;
-  using boost::lexical_cast;
 
   DOFMatrix *DOFMatrix::traversePtr = NULL;
 
diff --git a/AMDiS/src/Operator.cc b/AMDiS/src/Operator.cc
index 97053258..c38dc53d 100644
--- a/AMDiS/src/Operator.cc
+++ b/AMDiS/src/Operator.cc
@@ -6,13 +6,8 @@
 #include "Quadrature.h"
 #include "OpenMP.h"
 
-#include "boost/lexical_cast.hpp"
-#include <fstream>
-
 namespace AMDiS {
 
-  using boost::lexical_cast;
-
   const Flag OperatorTerm::PW_CONST = 1;
   const Flag OperatorTerm::SYMMETRIC = 2;
 
diff --git a/AMDiS/src/SecondOrderAssembler.cc b/AMDiS/src/SecondOrderAssembler.cc
index 7ac17dc9..dd808cbd 100644
--- a/AMDiS/src/SecondOrderAssembler.cc
+++ b/AMDiS/src/SecondOrderAssembler.cc
@@ -188,13 +188,13 @@ namespace AMDiS {
 	tmpLALt[myRank][j] = new DimMat<double>(dim, NO_INIT);      
 
 #ifdef _OPENMP
-#pragma omp critical (dofIndexAccess)
+#pragma omp critical
 #endif
       {   
-      psiFast = updateFastQuadrature(psiFast, owner->getRowFESpace()->getBasisFcts(), 
-				     INIT_GRD_PHI);
-      phiFast = updateFastQuadrature(phiFast, owner->getRowFESpace()->getBasisFcts(), 
-				     INIT_GRD_PHI);
+        psiFast = updateFastQuadrature(psiFast, owner->getRowFESpace()->getBasisFcts(), 
+  				       INIT_GRD_PHI);
+        phiFast = updateFastQuadrature(phiFast, owner->getRowFESpace()->getBasisFcts(), 
+				       INIT_GRD_PHI);
       }
       firstCall = false;
     }
-- 
GitLab