From a530b34fbf8d9a71ea3e3e00c869a1b7146031af Mon Sep 17 00:00:00 2001
From: Simon Praetorius <simon.praetorius@tu-dresden.de>
Date: Sun, 17 Feb 2013 22:41:55 +0000
Subject: [PATCH] AMDiS now compiles with -pedantic

---
 AMDiS/src/AMDiS.cc                            |  7 +-
 AMDiS/src/AdaptInfo.h                         |  4 +-
 AMDiS/src/AdaptInstationary.cc                |  6 +-
 AMDiS/src/AdaptStationary.cc                  |  6 +-
 AMDiS/src/Assembler.cc                        |  8 ---
 AMDiS/src/BasisFunction.cc                    |  2 -
 AMDiS/src/BoundaryObject.cc                   |  4 +-
 AMDiS/src/CoarseningManager2d.cc              |  2 +-
 AMDiS/src/CoarseningManager3d.cc              |  8 ++-
 AMDiS/src/ComponentTraverseInfo.cc            |  4 +-
 AMDiS/src/ComponentTraverseInfo.h             |  2 +-
 AMDiS/src/CouplingIterationInterface.cc       | 18 ++---
 AMDiS/src/DOFAdmin.cc                         | 16 ++---
 AMDiS/src/DOFContainer.h                      |  2 +-
 AMDiS/src/DOFMatrix.cc                        | 16 +----
 AMDiS/src/DOFVector.cc                        | 16 ++---
 AMDiS/src/DOFVector.h                         |  9 +--
 AMDiS/src/DOFVector.hh                        | 67 +++++--------------
 AMDiS/src/Debug.cc                            | 12 +---
 AMDiS/src/DirichletBC.cc                      |  4 +-
 AMDiS/src/DualTraverse.cc                     |  4 +-
 AMDiS/src/ElInfo1d.cc                         |  6 +-
 AMDiS/src/ElInfo2d.cc                         |  4 +-
 AMDiS/src/ElInfo3d.cc                         |  4 +-
 AMDiS/src/Element.cc                          | 10 ++-
 AMDiS/src/ElementDofIterator.cc               |  2 +-
 AMDiS/src/FirstOrderAssembler.cc              |  4 +-
 AMDiS/src/Global.cc                           |  5 +-
 AMDiS/src/Global.h                            | 12 +++-
 AMDiS/src/Initfile.cc                         |  4 +-
 AMDiS/src/Lagrange.cc                         | 36 +++-------
 AMDiS/src/Line.h                              |  4 +-
 AMDiS/src/MacroElement.cc                     |  2 -
 AMDiS/src/Marker.cc                           |  6 +-
 AMDiS/src/MatrixVector.h                      |  2 +-
 AMDiS/src/Mesh.cc                             | 30 ++++-----
 AMDiS/src/Mesh.h                              |  2 +-
 AMDiS/src/MeshStructure.cc                    | 23 ++++---
 AMDiS/src/MeshStructure_ED.h                  |  2 +-
 AMDiS/src/OEMSolver.h                         |  6 +-
 AMDiS/src/OperatorTerm.hh                     |  4 +-
 AMDiS/src/PeriodicBC.cc                       |  4 +-
 AMDiS/src/ProblemImplicit.cc                  |  6 --
 AMDiS/src/ProblemInstat.cc                    |  2 +
 AMDiS/src/ProblemStat.cc                      | 45 ++-----------
 AMDiS/src/QPsiPhi.cc                          | 16 ++---
 AMDiS/src/Quadrature.cc                       | 10 +--
 AMDiS/src/RCNeighbourList.cc                  |  4 +-
 AMDiS/src/Recovery.cc                         | 16 ++---
 AMDiS/src/RefinementManager.cc                |  8 +--
 AMDiS/src/RefinementManager2d.cc              |  9 +--
 AMDiS/src/RefinementManager3d.cc              | 12 ++--
 AMDiS/src/RobinBC.cc                          |  2 +-
 AMDiS/src/SecondOrderTerm.cc                  |  6 +-
 AMDiS/src/StandardProblemIteration.cc         |  6 +-
 AMDiS/src/SubAssembler.cc                     |  4 +-
 AMDiS/src/SubAssembler.hh                     | 12 ++--
 AMDiS/src/SystemVector.h                      |  4 +-
 AMDiS/src/Tetrahedron.cc                      |  2 +-
 AMDiS/src/Tetrahedron.h                       | 14 ++--
 AMDiS/src/Traverse.cc                         | 32 ++++-----
 AMDiS/src/Traverse.h                          |  2 +-
 AMDiS/src/Triangle.cc                         |  2 +-
 AMDiS/src/Triangle.h                          | 12 ++--
 AMDiS/src/UmfPackSolver.h                     |  6 +-
 AMDiS/src/VertexVector.cc                     |  2 -
 AMDiS/src/VertexVector.h                      |  2 +-
 AMDiS/src/ZeroOrderAssembler.cc               |  4 --
 AMDiS/src/compositeFEM/CFE_Integration.cc     |  4 --
 .../src/compositeFEM/CFE_NormAndErrorFcts.cc  | 26 +++----
 AMDiS/src/compositeFEM/CompositeFEMMethods.cc |  2 -
 AMDiS/src/compositeFEM/ElementLevelSet.cc     |  9 ++-
 AMDiS/src/compositeFEM/ElementLevelSet.h      |  2 -
 AMDiS/src/compositeFEM/PenaltyOperator.cc     |  4 --
 AMDiS/src/est/Estimator.cc                    | 10 +--
 AMDiS/src/est/RecoveryEstimator.cc            |  4 --
 AMDiS/src/est/ResidualEstimator.cc            |  6 +-
 AMDiS/src/est/SimpleResidualEstimator.cc      | 10 ---
 AMDiS/src/io/ArhReader.cc                     |  2 -
 AMDiS/src/io/ArhWriter.cc                     |  2 -
 AMDiS/src/io/DataCollector.hh                 | 14 ----
 AMDiS/src/io/DofWriter.cc                     |  2 -
 AMDiS/src/io/FileWriter.hh                    |  4 --
 AMDiS/src/io/MacroInfo.cc                     | 22 +++---
 AMDiS/src/io/MacroReader.cc                   |  4 --
 AMDiS/src/io/PovrayWriter.h                   |  2 +-
 AMDiS/src/io/Spreadsheet.cc                   |  2 -
 AMDiS/src/io/VtkVectorWriter.h                | 11 ++-
 AMDiS/src/io/VtkWriter.cc                     |  2 -
 AMDiS/src/reinit/ElementLevelSet.cc           | 10 +--
 AMDiS/src/reinit/ElementLevelSet.h            |  2 -
 AMDiS/src/reinit/HL_SignedDistTraverse.cc     |  2 -
 .../reinit/VelocityExtFromVelocityField.cc    |  2 -
 .../src/reinit/VelocityExtFromVelocityField.h |  2 -
 AMDiS/src/time/RosenbrockAdaptInstationary.cc |  6 +-
 AMDiS/src/time/RosenbrockStationary.cc        |  2 -
 96 files changed, 264 insertions(+), 535 deletions(-)

diff --git a/AMDiS/src/AMDiS.cc b/AMDiS/src/AMDiS.cc
index c6abffe5..8193e591 100644
--- a/AMDiS/src/AMDiS.cc
+++ b/AMDiS/src/AMDiS.cc
@@ -27,8 +27,6 @@ namespace AMDiS {
 
   void init(int argc, char **argv, std::string initFileName)
   {
-    FUNCNAME("AMDiS::init()");
-
 #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
 #ifdef HAVE_PARALLEL_MTL4
     mtl_environment = new mtl::par::environment(argc, argv);
@@ -113,9 +111,8 @@ namespace AMDiS {
 
   void init(std::string initFileName)
   {
-    FUNCNAME("AMDiS::init()");
-
 #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
+    FUNCNAME("AMDiS::init()");
     ERROR_EXIT("Does not work in parallel!\n");
 #endif
 
@@ -125,8 +122,6 @@ namespace AMDiS {
 
   void finalize()
   {
-    FUNCNAME("AMDiS::finalize()");
-
 #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
     MeshDistributor::globalMeshDistributor->exitParallelization();
     delete MeshDistributor::globalMeshDistributor;
diff --git a/AMDiS/src/AdaptInfo.h b/AMDiS/src/AdaptInfo.h
index 50e88f7a..0c43a289 100644
--- a/AMDiS/src/AdaptInfo.h
+++ b/AMDiS/src/AdaptInfo.h
@@ -413,7 +413,7 @@ namespace AMDiS {
     /// Returns \ref est_sum.
     inline double getEstSum(int index) 
     { 
-      FUNCNAME("AdaptInfo::getEstSum()");
+      FUNCNAME_DBG("AdaptInfo::getEstSum()");
 
       TEST_EXIT_DBG(static_cast<unsigned int>(index) < scalContents.size())
 	("Wrong index for adaptInfo!\n");
@@ -430,7 +430,7 @@ namespace AMDiS {
     /// Returns \ref est_max.
     inline double getEstMax(int index) 
     { 
-      FUNCNAME("AdaptInfo::getEstSum()");
+      FUNCNAME_DBG("AdaptInfo::getEstSum()");
 
       TEST_EXIT_DBG(static_cast<unsigned int>(index) < scalContents.size())
 	("Wrong index for adaptInfo!\n");
diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc
index 0f7be765..585df9c9 100644
--- a/AMDiS/src/AdaptInstationary.cc
+++ b/AMDiS/src/AdaptInstationary.cc
@@ -55,7 +55,6 @@ namespace AMDiS {
       breakWhenStable(0),
       dbgMode(false)
   {
-    FUNCNAME("AdaptInstationary::AdaptInstationary()");
 
     initConstructor(&problemStat, &info, &initialInfo, initialTimestampSet);
   }
@@ -66,6 +65,7 @@ namespace AMDiS {
 					  AdaptInfo *initialInfo,
 					  time_t initialTimestampSet)
   {
+    FUNCNAME("AdaptInstationary::initConstructor()");
     initialize(name);
 
     fixedTimestep = (info->getMinTimestep() == info->getMaxTimestep());
@@ -360,8 +360,6 @@ namespace AMDiS {
 
   void AdaptInstationary::initialize(std::string aName)
   {
-    FUNCNAME("AdaptInstationary::initialize()");
-
     strategy = 0;
     timeDelta1 = 0.7071;
     timeDelta2 = 1.4142;
@@ -382,8 +380,6 @@ namespace AMDiS {
 
   void AdaptInstationary::serialize(std::ostream &out)
   {
-    FUNCNAME("AdaptInstationary::serialize()");
-
     problemIteration->serialize(out);
     adaptInfo->serialize(out);
     if (problemTime)
diff --git a/AMDiS/src/AdaptStationary.cc b/AMDiS/src/AdaptStationary.cc
index 151b5575..98f5a61f 100644
--- a/AMDiS/src/AdaptStationary.cc
+++ b/AMDiS/src/AdaptStationary.cc
@@ -50,8 +50,6 @@ namespace AMDiS {
 
   int AdaptStationary::adapt()
   {
-    FUNCNAME("AdaptStationary::adapt()");
-
 #if HAVE_PARALLEL_DOMAIN_AMDIS
     MeshDistributor::globalMeshDistributor->initParallelization(); 
 #endif
@@ -92,9 +90,7 @@ namespace AMDiS {
 
 
   void AdaptStationary::initialize()
-  {
-    FUNCNAME("AdaptStationary::initialize()");
-  
+  {  
     Parameters::get(name + "->info", info);
   }
 
diff --git a/AMDiS/src/Assembler.cc b/AMDiS/src/Assembler.cc
index 6ac1078e..85c339fe 100644
--- a/AMDiS/src/Assembler.cc
+++ b/AMDiS/src/Assembler.cc
@@ -49,8 +49,6 @@ namespace AMDiS {
 					 ElementMatrix& userMat,
 					 double factor)
   {
-    FUNCNAME("Assembler::calculateElementMatrix()");
-
     if (remember && (factor != 1.0 || operat->uhOld))
       rememberElMat = true;
 
@@ -94,8 +92,6 @@ namespace AMDiS {
 					 ElementMatrix& userMat,
 					 double factor)
   {
-    FUNCNAME("Assembler::calculateElementMatrix()");
-
     if (remember && (factor != 1.0 || operat->uhOld))
       rememberElMat = true;
   
@@ -200,8 +196,6 @@ namespace AMDiS {
 					 ElementVector& userVec,
 					 double factor)
   {
-    FUNCNAME("Assembler::calculateElementVector()");
-
     if (remember && factor != 1.0)
       rememberElVec = true;
 
@@ -308,8 +302,6 @@ namespace AMDiS {
 
   void Assembler::matVecAssemble(const ElInfo *elInfo, ElementVector& vec)
   {
-    FUNCNAME("Assembler::matVecAssemble()");
-
     Element *el = elInfo->getElement(); 
     ElementVector uhOldLoc(operat->uhOld->getFeSpace() == rowFeSpace ? 
 			   nRow : nCol);
diff --git a/AMDiS/src/BasisFunction.cc b/AMDiS/src/BasisFunction.cc
index 049b49d2..3149792b 100644
--- a/AMDiS/src/BasisFunction.cc
+++ b/AMDiS/src/BasisFunction.cc
@@ -31,8 +31,6 @@ namespace AMDiS {
       degree(degree_), 
       dim(dim_)
   {
-    FUNCNAME("BasisFunction::BasisFunction()");
-
     nDOF = new DimVec<int>(dim, DEFAULT_VALUE, -1);
     dow = Global::getGeo(WORLD);
   }
diff --git a/AMDiS/src/BoundaryObject.cc b/AMDiS/src/BoundaryObject.cc
index 7bc1615a..2f8d933f 100644
--- a/AMDiS/src/BoundaryObject.cc
+++ b/AMDiS/src/BoundaryObject.cc
@@ -61,9 +61,11 @@ namespace AMDiS {
 
       if (obj0.subObj == EDGE) {	
 	int el0_v0 = obj0.el->getVertexOfEdge(obj0.ithObj, 0);
-	int el0_v1 = obj0.el->getVertexOfEdge(obj0.ithObj, 1);
 	int el1_v0 = obj0.el->getVertexOfEdge(obj1.ithObj, 0);
+#if DEBUG != 0
+	int el0_v1 = obj0.el->getVertexOfEdge(obj0.ithObj, 1);
 	int el1_v1 = obj0.el->getVertexOfEdge(obj1.ithObj, 1);
+#endif
 
 	const BasisFunction *basFcts = feSpace->getBasisFcts();
 	int nBasFcts = basFcts->getNumber();
diff --git a/AMDiS/src/CoarseningManager2d.cc b/AMDiS/src/CoarseningManager2d.cc
index f3419ca6..9e15da44 100644
--- a/AMDiS/src/CoarseningManager2d.cc
+++ b/AMDiS/src/CoarseningManager2d.cc
@@ -31,7 +31,7 @@ namespace AMDiS {
 
   void CoarseningManager2d::coarsenTriangle(Triangle *el)
   {
-    FUNCNAME("CoarseningManager2d::coarseTriangle()");
+    FUNCNAME_DBG("CoarseningManager2d::coarseTriangle()");
 
     Triangle *child[2];
     child[0] = dynamic_cast<Triangle*>(const_cast<Element*>(el->getChild(0)));
diff --git a/AMDiS/src/CoarseningManager3d.cc b/AMDiS/src/CoarseningManager3d.cc
index 1af3db93..914ed3e0 100644
--- a/AMDiS/src/CoarseningManager3d.cc
+++ b/AMDiS/src/CoarseningManager3d.cc
@@ -25,7 +25,9 @@ namespace AMDiS {
 
   void CoarseningManager3d::coarsenFunction(ElInfo *elInfo)
   {
-    FUNCNAME("CoarseningManager3d::coarsenFunction()");
+#if HAVE_PARALLEL_DOMAIN_AMDIS
+    FUNCNAME_DBG("CoarseningManager3d::coarsenFunction()");
+#endif
 
     Tetrahedron *el = 
       dynamic_cast<Tetrahedron*>(const_cast<Element*>(elInfo->getElement()));
@@ -284,7 +286,7 @@ namespace AMDiS {
 					    RCNeighbourList &coarsenList, 
 					    int *n_neigh)
   {
-    FUNCNAME("CoarseningManager3d::getCoarsenPatch()");
+    FUNCNAME_DBG("CoarseningManager3d::getCoarsenPatch()");
 
     static unsigned char next_el[6][2] = {{3,2},
 					  {1,3},
@@ -429,7 +431,7 @@ namespace AMDiS {
 					 int n_neigh, 
 					 int bound)
   {
-    FUNCNAME("CoarseningManager3d::coarsenPatch()");
+    FUNCNAME_DBG("CoarseningManager3d::coarsenPatch()");
 
     Tetrahedron *el = 
       dynamic_cast<Tetrahedron*>(const_cast<Element*>(coarsenList.getElement(0)));
diff --git a/AMDiS/src/ComponentTraverseInfo.cc b/AMDiS/src/ComponentTraverseInfo.cc
index 99f96cf4..a5545173 100644
--- a/AMDiS/src/ComponentTraverseInfo.cc
+++ b/AMDiS/src/ComponentTraverseInfo.cc
@@ -63,7 +63,7 @@ namespace AMDiS {
   
   const FiniteElemSpace* ComponentTraverseInfo::getRowFeSpace(int row)
   {
-    FUNCNAME("ComponentTraverseInfo::getRowFeSpace()");
+    FUNCNAME_DBG("ComponentTraverseInfo::getRowFeSpace()");
     
     TEST_EXIT_DBG(row < nComponents)("No component traverse info for this row!\n");
     TEST_EXIT_DBG(matrixComponents[row][row].getRowFeSpace() ==
@@ -76,7 +76,7 @@ namespace AMDiS {
 
   const FiniteElemSpace* ComponentTraverseInfo::getNonRowFeSpace(int row)
   {
-    FUNCNAME("ComponentTraverseInfo::getNonRowFeSpace()");
+    FUNCNAME_DBG("ComponentTraverseInfo::getNonRowFeSpace()");
 
     TEST_EXIT_DBG(row < nComponents)("No component traverse info for this row!\n");
     
diff --git a/AMDiS/src/ComponentTraverseInfo.h b/AMDiS/src/ComponentTraverseInfo.h
index 63fc773d..43485543 100644
--- a/AMDiS/src/ComponentTraverseInfo.h
+++ b/AMDiS/src/ComponentTraverseInfo.h
@@ -78,7 +78,7 @@ namespace AMDiS {
     
     const FiniteElemSpace *getAuxFeSpace() 
     {
-      FUNCNAME("SingleComponentInfo::getAuxFeSpace()");
+      FUNCNAME_DBG("SingleComponentInfo::getAuxFeSpace()");
 
       TEST_EXIT_DBG(auxFeSpaces.size() <= 1)("More than one aux FE space!\n");
 
diff --git a/AMDiS/src/CouplingIterationInterface.cc b/AMDiS/src/CouplingIterationInterface.cc
index 4ee302b6..ab2f68b6 100644
--- a/AMDiS/src/CouplingIterationInterface.cc
+++ b/AMDiS/src/CouplingIterationInterface.cc
@@ -36,7 +36,7 @@ namespace AMDiS {
 
     problems.insert(pos, probIter);
     solveProblem.insert(pos2, true);
-  };
+  }
 
 
   /// Called before each adaption loop iteration.
@@ -51,7 +51,7 @@ namespace AMDiS {
       adaptInfo->getTimestepNumber() + 1,
       nTimesteps);
     MSG("==================================================\n");
-  };
+  }
 
 
   /** \brief
@@ -60,7 +60,7 @@ namespace AMDiS {
     * e.g. in timestep adaption loops of timestep adaptive strategies.
     */
   Flag CouplingIterationInterface::oneIteration(AdaptInfo *adaptInfo, Flag toDo)
-  { FUNCNAME("CouplingIterationInterface::oneIteration()");
+  {
     Flag flag = 0;
 
     for (size_t i = 0; i < problems.size(); ++i) {
@@ -72,7 +72,7 @@ namespace AMDiS {
     }
 
     return flag;
-  };
+  }
 
 
   /// Called after each adaption loop iteration.
@@ -82,7 +82,7 @@ namespace AMDiS {
     MSG("end of iteration number: %d\n", 
       adaptInfo->getTimestepNumber() + 1);
     MSG("==================================================\n");
-  };
+  }
 
 
   /// Returns number of managed problems
@@ -92,7 +92,7 @@ namespace AMDiS {
     for (size_t i = 0; i < problems.size(); ++i)
       num += problems[i]->getNumProblems();
     return num;
-  };
+  }
 
 
   /** \brief
@@ -116,7 +116,7 @@ namespace AMDiS {
     if (probIter == NULL)
       throw(std::runtime_error("Problem not found. Should not happen, since number is in range."));
     return probIter;
-  };
+  }
 
 
   /// Returns the name of the problem.
@@ -126,7 +126,7 @@ namespace AMDiS {
       throw(std::runtime_error("Problem number out of range."));
 
     return problems[number]->getName();
-  };
+  }
 
 
   void CouplingIterationInterface::setSolveProblem(std::string name, bool flag)
@@ -137,6 +137,6 @@ namespace AMDiS {
         break;
       }
     }
-  };
+  }
 
 } // namespace AMDiS
diff --git a/AMDiS/src/DOFAdmin.cc b/AMDiS/src/DOFAdmin.cc
index c19e885c..7ce8c2fd 100644
--- a/AMDiS/src/DOFAdmin.cc
+++ b/AMDiS/src/DOFAdmin.cc
@@ -106,7 +106,7 @@ namespace AMDiS {
 
   void DOFAdmin::freeDofIndex(int dof) 
   {    
-    FUNCNAME("DOFAdmin::freeDofIndex()");
+    FUNCNAME_DBG("DOFAdmin::freeDofIndex()");
 
     TEST_EXIT_DBG(usedCount > 0)("No DOFs in use!\n");
     TEST_EXIT_DBG(dof >= 0 && dof < size)("Invalid DOF index %d!\n", dof);
@@ -135,7 +135,7 @@ namespace AMDiS {
 
   int DOFAdmin::getDOFIndex()
   {
-    FUNCNAME("DOFAdmin::getDOFIndex()");
+    FUNCNAME_DBG("DOFAdmin::getDOFIndex()");
     int dof = 0;
 
     // if there is a hole
@@ -174,9 +174,7 @@ namespace AMDiS {
 
 
   void DOFAdmin::enlargeDofLists(int minsize)
-  {
-    FUNCNAME("DOFAdmin::enlargeDofLists()");
-  
+  {  
     int old = size;
     if (minsize > 0)
       if (old > minsize) 
@@ -235,7 +233,7 @@ namespace AMDiS {
 
   void DOFAdmin::addDOFContainer(DOFContainer* cont)
   {
-    FUNCNAME("DOFAdmin::addDOFContainer()");
+    FUNCNAME_DBG("DOFAdmin::addDOFContainer()");
 
     TEST_EXIT_DBG(cont)("no container\n");
 
@@ -262,7 +260,7 @@ namespace AMDiS {
 
   void DOFAdmin::compress(std::vector<DegreeOfFreedom> &newDofIndex)
   {
-    FUNCNAME("DOFAdmin::compress()");
+    FUNCNAME_DBG("DOFAdmin::compress()");
 
     // nothing to do ?
     if (size < 1 || usedCount < 1 || holeCount < 1) 
@@ -321,7 +319,7 @@ namespace AMDiS {
 
   void DOFAdmin::setNumberOfDofs(int i, int v) 
   { 
-    FUNCNAME("DOFAdmin::setNumberOfDOFs()");
+    FUNCNAME_DBG("DOFAdmin::setNumberOfDOFs()");
 
     TEST_EXIT_DBG(0 <= i && 4 > i)("Should not happen!\n");
 
@@ -331,7 +329,7 @@ namespace AMDiS {
 
   void DOFAdmin::setNumberOfPreDofs(int i, int v) 
   { 
-    FUNCNAME("DOFAdmin::setNumberOfPreDOFs()");
+    FUNCNAME_DBG("DOFAdmin::setNumberOfPreDOFs()");
 
     TEST_EXIT_DBG(0 <= i && 4 > i)("Should not happen!\n"); 
 
diff --git a/AMDiS/src/DOFContainer.h b/AMDiS/src/DOFContainer.h
index a504d091..4ff18098 100644
--- a/AMDiS/src/DOFContainer.h
+++ b/AMDiS/src/DOFContainer.h
@@ -53,7 +53,7 @@ namespace AMDiS {
      */
     virtual void compressDofContainer(int size, std::vector<DegreeOfFreedom> &newDOF)
     {
-      FUNCNAME("DOFContainer::compressDofContainer()");
+      FUNCNAME_DBG("DOFContainer::compressDofContainer()");
 
       for (int i = 0; i < size; i++) {
 	int j = newDOF[operator[](i)];
diff --git a/AMDiS/src/DOFMatrix.cc b/AMDiS/src/DOFMatrix.cc
index 792dfce8..efe26cbc 100644
--- a/AMDiS/src/DOFMatrix.cc
+++ b/AMDiS/src/DOFMatrix.cc
@@ -88,8 +88,6 @@ namespace AMDiS {
 
   DOFMatrix::~DOFMatrix()
   {
-    FUNCNAME("DOFMatrix::~DOFMatrix()");
-
     if (rowFeSpace && rowFeSpace->getAdmin())
       (const_cast<DOFAdmin*>(rowFeSpace->getAdmin()))->removeDOFIndexed(this);
     if (boundaryManager) 
@@ -101,8 +99,6 @@ namespace AMDiS {
 
   void DOFMatrix::print() const
   {
-    FUNCNAME("DOFMatrix::print()");
-
     if (inserter) 
       inserter->print();
   }
@@ -110,8 +106,6 @@ namespace AMDiS {
 
   bool DOFMatrix::symmetric()
   {
-    FUNCNAME("DOFMatrix::symmetric()");
-
     double tol = 1e-5;
 
     using mtl::tag::major; using mtl::tag::nz; using mtl::begin; using mtl::end;
@@ -177,7 +171,7 @@ namespace AMDiS {
 				   ElInfo* rowElInfo,
 				   ElInfo* colElInfo)
   {
-    FUNCNAME("DOFMatrix::addElementMatrix()");
+    FUNCNAME_DBG("DOFMatrix::addElementMatrix()");
 
     TEST_EXIT_DBG(inserter)("DOFMatrix is not in insertion mode\n");
     TEST_EXIT_DBG(rowFeSpace)("Have now rowFeSpace!\n");
@@ -298,8 +292,6 @@ namespace AMDiS {
 			   ElInfo *elInfo, 
 			   const BoundaryType *bound)
   {
-    FUNCNAME("DOFMatrix::assemble()");
-
     set_to_zero(elementMatrix);
 
     std::vector<Operator*>::iterator it = operators.begin();
@@ -322,7 +314,7 @@ namespace AMDiS {
 			   const BoundaryType *bound,
 			   Operator *op)
   {
-    FUNCNAME("DOFMatrix::assemble()");
+    FUNCNAME_DBG("DOFMatrix::assemble()");
     
     TEST_EXIT_DBG(op)("No operator!\n");
     
@@ -341,8 +333,6 @@ namespace AMDiS {
 			   ElInfo *smallElInfo, ElInfo *largeElInfo,
 			   const BoundaryType *bound, Operator *op)
   {
-    FUNCNAME("DOFMatrix::assemble()");
-
     if (!op && operators.size() == 0)
       return;
 
@@ -530,8 +520,6 @@ namespace AMDiS {
 
   void DOFMatrix::clearDirichletRows()
   {      
-    FUNCNAME("DOFMatrix::clearDirichletRows()");
-
     // Do the following only in sequential code. In parallel mode, the specific
     // solver method must care about dirichlet boundary conditions.
     inserter_type &ins = *inserter;  
diff --git a/AMDiS/src/DOFVector.cc b/AMDiS/src/DOFVector.cc
index 50825ea6..03435cfe 100644
--- a/AMDiS/src/DOFVector.cc
+++ b/AMDiS/src/DOFVector.cc
@@ -70,9 +70,7 @@ namespace AMDiS {
   template<>
   double DOFVector<double>::evalAtPoint(WorldVector<double> &p,
 					ElInfo *oldElInfo) const
-  {
-    FUNCNAME("DOFVector<double>::evalAtCoords()");
-  
+  {  
     Mesh *mesh = feSpace->getMesh();
     const BasisFunction *basFcts = feSpace->getBasisFcts();
   
@@ -120,9 +118,7 @@ namespace AMDiS {
   template<>
   WorldVector<double> DOFVector<WorldVector<double> >::evalAtPoint(WorldVector<double> &p, 
 								   ElInfo *oldElInfo) const
-  {
-    FUNCNAME("DOFVector<double>::evalAtCoords()");
-  
+  {  
     Mesh *mesh = feSpace->getMesh();
     const BasisFunction *basFcts = feSpace->getBasisFcts();
   
@@ -384,7 +380,6 @@ namespace AMDiS {
   template<>
   void DOFVector<double>::interpol(DOFVector<double> *source, double factor) 
   {
-    FUNCNAME("DOFVector<double>::interpol()");
 
     const FiniteElemSpace *sourceFeSpace = source->getFeSpace();
     const BasisFunction *basisFcts = feSpace->getBasisFcts();
@@ -468,6 +463,7 @@ namespace AMDiS {
   void DOFVector<WorldVector<double> >::interpol(DOFVector<WorldVector<double> > *v, 
 						 double factor) 
   {
+    FUNCNAME("DOFVector<WorldVector<double> >::interpol()");
     WorldVector<double> nul(DEFAULT_VALUE,0.0);
 
     this->set(nul);
@@ -514,7 +510,7 @@ namespace AMDiS {
   template<>
   WorldVector<DOFVector<double>*> *DOFVector<double>::getGradient(WorldVector<DOFVector<double>*> *grad) const
   {
-    FUNCNAME("DOFVector<double>::getGradient()");
+    FUNCNAME_DBG("DOFVector<double>::getGradient()");
 
     Mesh *mesh = feSpace->getMesh();
     int dim = mesh->getDim();
@@ -619,7 +615,7 @@ namespace AMDiS {
   WorldVector<DOFVector<double>*> *transform(DOFVector<WorldVector<double> > *vec,
 					     WorldVector<DOFVector<double>*> *res)
   {
-    FUNCNAME("DOFVector<double>::transform()");
+    FUNCNAME_DBG("DOFVector<double>::transform()");
 
     TEST_EXIT_DBG(vec)("no vector\n");
 
@@ -649,8 +645,6 @@ namespace AMDiS {
 				       const BoundaryType *bound, 
 				       Operator *op)
   {
-    FUNCNAME("DOFVector::assemble()");
-
     if (!(op || this->operators.size())) 
       return;
 
diff --git a/AMDiS/src/DOFVector.h b/AMDiS/src/DOFVector.h
index a141c5c8..5b82c344 100644
--- a/AMDiS/src/DOFVector.h
+++ b/AMDiS/src/DOFVector.h
@@ -424,7 +424,7 @@ namespace AMDiS {
     /// Resizes \ref vec to n
     inline void resize(int n) 
     { 
-      FUNCNAME("DOFVector<T>::resize()");
+      FUNCNAME_DBG("DOFVector<T>::resize()");
       TEST_EXIT_DBG(n >= 0)("Can't resize DOFVector to negative size\n"); 
       vec.resize(n);
     } 
@@ -432,7 +432,7 @@ namespace AMDiS {
     /// Resizes \ref vec to n and inits new values with init
     inline void resize(int n, T init) 
     { 
-      FUNCNAME("DOFVector<T>::resize()");
+      FUNCNAME_DBG("DOFVector<T>::resize()");
       TEST_EXIT_DBG(n >= 0)("Can't resize DOFVector to negative size\n"); 
       vec.resize(n, init);
     } 
@@ -440,7 +440,7 @@ namespace AMDiS {
     /// Returns \ref vec[i]
     inline const T& operator[](DegreeOfFreedom i) const 
     {
-      FUNCNAME("DOFVector<T>::operator[]");
+      FUNCNAME_DBG("DOFVector<T>::operator[]");
       TEST_EXIT_DBG(i >= 0 && i < static_cast<int>(vec.size()))
 	("Illegal vector index %d.\n", i);
       return vec[i];
@@ -449,7 +449,7 @@ namespace AMDiS {
     /// Returns \ref vec[i]
     inline T& operator[](DegreeOfFreedom i) 
     {
-      FUNCNAME("DOFVector<T>::operator[]");
+      FUNCNAME_DBG("DOFVector<T>::operator[]");
 
       TEST_EXIT_DBG(i >= 0 && i < static_cast<int>(vec.size())) 
  	("Illegal vector index %d.\n", i); 
@@ -848,6 +848,7 @@ namespace AMDiS {
   template<typename T>
   inline void checkFeSpace(const FiniteElemSpace* feSpace, const std::vector<T>& vec)
   {
+    FUNCNAME_DBG("checkFeSpace()");
     TEST_EXIT_DBG(feSpace)("feSpace is NULL\n");
     TEST_EXIT_DBG(feSpace->getAdmin())("admin is NULL\n");
     TEST_EXIT_DBG(static_cast<int>(vec.size()) >= feSpace->getAdmin()->getUsedSize())
diff --git a/AMDiS/src/DOFVector.hh b/AMDiS/src/DOFVector.hh
index fc964550..63c500b5 100644
--- a/AMDiS/src/DOFVector.hh
+++ b/AMDiS/src/DOFVector.hh
@@ -139,8 +139,6 @@ namespace AMDiS {
 					  ElInfo *elInfo,
 					  bool add)
   {
-    FUNCNAME("DOFVector::addElementVector()");
-
     std::vector<DegreeOfFreedom> indices(nBasFcts);
     feSpace->getBasisFcts()->getLocalIndices(elInfo->getElement(), 
 					     feSpace->getAdmin(),
@@ -164,8 +162,6 @@ namespace AMDiS {
   template<typename T>
   double DOFVector<T>::nrm2() const
   {
-    FUNCNAME("DOFVector<T>::nrm2()");
-
     checkFeSpace(this->feSpace, vec);
 
     double nrm = 0.0;
@@ -186,8 +182,6 @@ namespace AMDiS {
   template<typename T>
   double DOFVector<T>::squareNrm2() const
   {
-    FUNCNAME("DOFVector<T>::nrm2()");
-
     checkFeSpace(this->feSpace, vec);
     
     double nrm = 0.0;
@@ -208,8 +202,6 @@ namespace AMDiS {
   template<typename T>
   T DOFVector<T>::asum() const
   {
-    FUNCNAME("DOFVector<T>::asum()");
-
     checkFeSpace(this->feSpace, vec);
 
     double nrm = 0.0;
@@ -230,8 +222,6 @@ namespace AMDiS {
   template<typename T>
   T DOFVector<T>::sum() const
   {
-    FUNCNAME("DOFVector<T>::sum()");
-
     checkFeSpace(this->feSpace, vec);
 
     double nrm = 0.0;    
@@ -252,8 +242,6 @@ namespace AMDiS {
   template<typename T>
   void DOFVector<T>::set(T alpha)
   {
-    FUNCNAME("DOFVector<T>::set()");
-
     checkFeSpace(this->feSpace, vec);
 
     Iterator vecIterator(dynamic_cast<DOFIndexed<T>*>(this), USED_DOFS);
@@ -265,7 +253,7 @@ namespace AMDiS {
   template<typename T>
   void DOFVector<T>::copy(const DOFVector<T>& x)
   {
-    FUNCNAME("DOFVector<T>::copy()");
+    FUNCNAME_DBG("DOFVector<T>::copy()");
 
     checkFeSpace(this->feSpace, vec);
 
@@ -285,9 +273,7 @@ namespace AMDiS {
 
   template<typename T>
   T DOFVector<T>::min() const
-  {
-    FUNCNAME("DOFVector<T>::min()");
-    
+  {    
     checkFeSpace(this->feSpace, vec);
 
     T m;    
@@ -306,9 +292,7 @@ namespace AMDiS {
 
   template<typename T>
   T DOFVector<T>::max() const 
-  {
-    FUNCNAME("DOFVector<T>::max()");
-    
+  {    
     checkFeSpace(this->feSpace, vec);
 
     T m;    
@@ -334,9 +318,7 @@ namespace AMDiS {
 
   template<typename T>
   T DOFVector<T>::average() const
-  {
-    FUNCNAME("DOFVector<T>::average()");
-    
+  {    
     checkFeSpace(this->feSpace, vec);
 
     int count = 0;
@@ -496,8 +478,6 @@ namespace AMDiS {
   template<typename T>
   double DOFVector<T>::Int(int meshLevel, Quadrature* q) const
   {
-    FUNCNAME("DOFVector::Int()");
-
     Mesh* mesh = this->feSpace->getMesh();
 
     if (!q) {
@@ -813,9 +793,7 @@ namespace AMDiS {
   
   template<typename T>
   double DOFVector<T>::L1Norm(Quadrature* q) const
-  {
-    FUNCNAME("DOFVector::L1Norm()");
-  
+  {  
     Mesh* mesh = this->feSpace->getMesh();
 
     if (!q) {
@@ -856,8 +834,6 @@ namespace AMDiS {
   template<typename T>
   double DOFVector<T>::L2NormSquare(Quadrature* q) const
   {
-    FUNCNAME("DOFVector::L2NormSquare()");
-
     Mesh* mesh = this->feSpace->getMesh();
 
     if (!q) {
@@ -898,8 +874,6 @@ namespace AMDiS {
   template<typename T>  
   double DOFVector<T>::H1NormSquare(Quadrature *q) const
   {
-    FUNCNAME("DOFVector::H1NormSquare()");
-
     Mesh* mesh = this->feSpace->getMesh();
 
     if (!q) {
@@ -952,8 +926,6 @@ namespace AMDiS {
 					    ElInfo *oldElInfo, 
 					    bool useOldElInfo) const
   { 
-    FUNCNAME("DOFVector::getDofIdxAtPoint()");
-
     Mesh *mesh = this->feSpace->getMesh();
     const BasisFunction *basFcts = this->feSpace->getBasisFcts();
 
@@ -1067,7 +1039,7 @@ namespace AMDiS {
   template<typename T>
   const DOFVector<T>& operator*=(DOFVector<T>& x, T scal)
   {
-    FUNCNAME("DOFVector<T>::operator*=(DOFVector<T>& x, T scal)");
+    FUNCNAME_DBG("DOFVector<T>::operator*=(DOFVector<T>& x, T scal)");
 
     TEST_EXIT_DBG(x.getFeSpace() && x.getFeSpace()->getAdmin())
       ("pointer is NULL: %8X, %8X\n", x.getFeSpace(), x.getFeSpace()->getAdmin());
@@ -1084,7 +1056,7 @@ namespace AMDiS {
   template<typename T>
   const DOFVector<T>& operator+=(DOFVector<T>& x, const DOFVector<T>& y)
   {
-    FUNCNAME("DOFVector<T>::operator+=(DOFVector<T>& x, const DOFVector<T>& y)");
+    FUNCNAME_DBG("DOFVector<T>::operator+=(DOFVector<T>& x, const DOFVector<T>& y)");
     
     TEST_EXIT_DBG(x.getFeSpace() && y.getFeSpace())
       ("feSpace is NULL: %8X, %8X\n", x.getFeSpace(), y.getFeSpace());
@@ -1107,7 +1079,7 @@ namespace AMDiS {
   template<typename T>
   const DOFVector<T>& operator-=(DOFVector<T>& x, const DOFVector<T>& y)
   {
-    FUNCNAME("DOFVector<T>::operator-=(DOFVector<T>& x, const DOFVector<T>& y)");
+    FUNCNAME_DBG("DOFVector<T>::operator-=(DOFVector<T>& x, const DOFVector<T>& y)");
 
     TEST_EXIT_DBG(x.getFeSpace() && y.getFeSpace())
       ("feSpace is NULL: %8X, %8X\n", x.getFeSpace(), y.getFeSpace());
@@ -1130,7 +1102,7 @@ namespace AMDiS {
   template<typename T>
   const DOFVector<T>& operator*=(DOFVector<T>& x, const DOFVector<T>& y)
   {
-    FUNCNAME("DOFVector<T>::operator*=(DOFVector<T>& x, const DOFVector<T>& y)");
+    FUNCNAME_DBG("DOFVector<T>::operator*=(DOFVector<T>& x, const DOFVector<T>& y)");
     
     TEST_EXIT_DBG(x.getFeSpace() && y.getFeSpace())
       ("feSpace is NULL: %8X, %8X\n", x.getFeSpace(), y.getFeSpace());
@@ -1365,7 +1337,7 @@ namespace AMDiS {
   void DOFVectorBase<T>::getLocalVector(const Element *el, 
 					mtl::dense_vector<T>& d) const
   {
-    FUNCNAME("DOFVectorBase<T>::getLocalVector()");
+    FUNCNAME_DBG("DOFVectorBase<T>::getLocalVector()");
 
     TEST_EXIT_DBG(feSpace->getMesh() == el->getMesh())
       ("Element is defined on a different mesh than the DOF vector!\n");
@@ -1385,7 +1357,7 @@ namespace AMDiS {
 				     const FastQuadrature *quadFast,
 				     mtl::dense_vector<T>& vecAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getVecAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getVecAtQPs()");
     
     TEST_EXIT_DBG(quad || quadFast)
       ("Neither quad nor quadFast defined!\n");
@@ -1426,7 +1398,7 @@ namespace AMDiS {
 					  const FastQuadrature *quadFast,
 					  mtl::dense_vector<T>& vecAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getVecAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getVecAtQPs()");
  
     TEST_EXIT_DBG(quad || quadFast)("neither quad nor quadFast defined\n");
     TEST_EXIT_DBG(!(quad && quadFast) || quad == quadFast->getQuadrature())
@@ -1466,7 +1438,7 @@ namespace AMDiS {
 				     const FastQuadrature *quadFast,
 				     mtl::dense_vector<typename GradientType<T>::type> &grdAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getGrdAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getGrdAtQPs()");
 
     TEST_EXIT_DBG(quad || quadFast)("neither quad nor quadFast defined\n");
     TEST_EXIT_DBG(!(quad && quadFast) || quad == quadFast->getQuadrature())
@@ -1532,7 +1504,7 @@ namespace AMDiS {
 				     const FastQuadrature *quadFast,
 				     mtl::dense_vector<typename GradientType<T>::type> &grdAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getGrdAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getGrdAtQPs()");
 
     TEST_EXIT_DBG(quad || quadFast)("neither quad nor quadFast defined\n");
     TEST_EXIT_DBG(!(quad && quadFast) || quad == quadFast->getQuadrature())
@@ -1593,7 +1565,7 @@ namespace AMDiS {
 					    int comp,
 					    mtl::dense_vector<T> &derivativeAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getGrdAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getGrdAtQPs()");
 
     TEST_EXIT_DBG(quad || quadFast)("neither quad nor quadFast defined\n");
     TEST_EXIT_DBG(!(quad && quadFast) || quad == quadFast->getQuadrature())
@@ -1655,7 +1627,7 @@ namespace AMDiS {
 					    int comp,
 					    mtl::dense_vector<T> &derivativeAtQPs) const
   {
-    FUNCNAME("DOFVector<T>::getGrdAtQPs()");
+    FUNCNAME_DBG("DOFVector<T>::getGrdAtQPs()");
 
     TEST_EXIT_DBG(quad || quadFast)("neither quad nor quadFast defined\n");
     TEST_EXIT_DBG(!(quad && quadFast) || quad == quadFast->getQuadrature())
@@ -1741,8 +1713,6 @@ namespace AMDiS {
   template<typename T>
   double DOFVector<T>::DoubleWell(Quadrature* q) const
   {
-    FUNCNAME("DOFVector::DoubleWell()");
-
     Mesh* mesh = this->feSpace->getMesh();
 
     if (!q) {
@@ -1784,7 +1754,7 @@ namespace AMDiS {
   DOFVector<typename GradientType<T>::type>*
   DOFVector<T>::getGradient(DOFVector<typename GradientType<T>::type> *grad) const
   {
-    FUNCNAME("DOFVector<T>::getGradient()");
+    FUNCNAME_DBG("DOFVector<T>::getGradient()");
     const FiniteElemSpace *feSpace = DOFVector<T>::feSpace;
 
     // define result vector
@@ -1869,7 +1839,6 @@ namespace AMDiS {
   DOFVector<typename GradientType<T>::type>*
   DOFVector<T>::getRecoveryGradient(DOFVector<typename GradientType<T>::type> *grad) const
   {
-    FUNCNAME("DOFVector<T>::getRecoveryGradient()");
     const FiniteElemSpace *feSpace = DOFVector<T>::feSpace;
     int dim = DOFVector<T>::dim;
 
@@ -1942,7 +1911,7 @@ namespace AMDiS {
   std::vector<DOFVector<double>*> *transform(DOFVector<typename GradientType<T>::type> *vec,
 					     std::vector<DOFVector<double>*> *res)
   {
-    FUNCNAME("DOFVector<T>::transform()");
+    FUNCNAME_DBG("DOFVector<T>::transform()");
 
     TEST_EXIT_DBG(vec)("no vector\n");
 
diff --git a/AMDiS/src/Debug.cc b/AMDiS/src/Debug.cc
index c884eee0..9ae45a1a 100644
--- a/AMDiS/src/Debug.cc
+++ b/AMDiS/src/Debug.cc
@@ -92,8 +92,6 @@ namespace AMDiS {
 
     void writeElementIndexMesh(Mesh *mesh, std::string filename, int level)
     {
-      FUNCNAME("debug::writeElementIndexMesh()");
-
       std::map<int, double> vec;    
       TraverseStack stack;
       ElInfo *elInfo = 
@@ -159,8 +157,6 @@ namespace AMDiS {
 
     void colorMeshByMacroIndex(Mesh *mesh, std::string filename)
     {
-      FUNCNAME("debug::colorMeshByMacroIndex()");
-
       std::map<int, double> vec;    
       TraverseStack stack;
       ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL);
@@ -194,9 +190,7 @@ namespace AMDiS {
     
     bool colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Mesh *mesh, 
 					  int elIndex)
-    {
-      FUNCNAME("debug::colorDofVectorByLocalElementDofs()");
-      
+    {      
       TraverseStack stack;
       ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL);
       while (elInfo) {
@@ -439,8 +433,6 @@ namespace AMDiS {
     void getAllDofs(const FiniteElemSpace *feSpace, 
 		    std::set<const DegreeOfFreedom*>& dofs)
     {
-      FUNCNAME("getAllDofs()");
-
       ElementDofIterator elDofIter(feSpace);
       TraverseStack stack;
       ElInfo *elInfo = stack.traverseFirst(feSpace->getMesh(), -1, Mesh::CALL_LEAF_EL);
@@ -546,8 +538,6 @@ namespace AMDiS {
 
     void writeCoordsFile(const FiniteElemSpace* feSpace, std::string filename)
     {
-      FUNCNAME("debug::writeCoordsFile()");
-
       DOFVector<WorldVector<double> > coords(feSpace, "tmp");
       feSpace->getMesh()->getDofIndexCoords(coords);
 
diff --git a/AMDiS/src/DirichletBC.cc b/AMDiS/src/DirichletBC.cc
index cdf0befa..83a010d3 100644
--- a/AMDiS/src/DirichletBC.cc
+++ b/AMDiS/src/DirichletBC.cc
@@ -46,7 +46,7 @@ namespace AMDiS {
 					  const BoundaryType* localBound,
 					  int nBasFcts)
   {
-    FUNCNAME("DirichletBC::fillBoundaryCondition()");
+    FUNCNAME_DBG("DirichletBC::fillBoundaryCondition()");
     TEST_EXIT_DBG(matrix->getRowFeSpace() == rowFeSpace)("invalid row fe space\n");
   }
 
@@ -84,8 +84,6 @@ namespace AMDiS {
 
   void DirichletBC::initVector(DOFVectorBase<double>* vec)
   {
-    FUNCNAME("DirichletBC::initVector()");
-
     if (dynamic_cast<DOFVector<double>*>(vec))
       dynamic_cast<DOFVector<double>*>(vec)->getDirichletValues().clear();
   }
diff --git a/AMDiS/src/DualTraverse.cc b/AMDiS/src/DualTraverse.cc
index 28289844..ee154181 100644
--- a/AMDiS/src/DualTraverse.cc
+++ b/AMDiS/src/DualTraverse.cc
@@ -27,6 +27,7 @@ namespace AMDiS {
 				   ElInfo **elInfoSmall,
 				   ElInfo **elInfoLarge)
   {
+    FUNCNAME("DualTraverse::traverseFirst()");
     // replace CALL_EL_LEVEL by CALL_MG_LEVEL (covers whole domain)
     if (flag1.isSet(Mesh::CALL_EL_LEVEL)) {
       flag1 &= ~Mesh::CALL_EL_LEVEL;
@@ -106,6 +107,7 @@ namespace AMDiS {
 				  ElInfo **elInfoSmall,
 				  ElInfo **elInfoLarge)
   {
+    FUNCNAME("DualTraverse::traverseNext()");
     // call standard traverse
     if (inc1) {
       do {
@@ -195,7 +197,7 @@ namespace AMDiS {
 
   int DualTraverse::getFace(DualElInfo *dualElInfo, int largeFace)
   {
-    FUNCNAME("DualTraverse::getFace()");
+    FUNCNAME_DBG("DualTraverse::getFace()");
 
     TEST_EXIT_DBG(dualElInfo)("No dual element info object!\n");
 
diff --git a/AMDiS/src/ElInfo1d.cc b/AMDiS/src/ElInfo1d.cc
index 385bd7cf..4a2c65cd 100644
--- a/AMDiS/src/ElInfo1d.cc
+++ b/AMDiS/src/ElInfo1d.cc
@@ -56,7 +56,6 @@ namespace AMDiS {
 
   void ElInfo1d::fillMacroInfo(const MacroElement * mel)
   {
-    FUNCNAME("ElInfo1d::fillMacroInfo()");
     Element *nb;
     MacroElement *mnb;
 
@@ -188,6 +187,7 @@ namespace AMDiS {
   /****************************************************************************/
   double ElInfo1d::getNormal(int side, WorldVector<double> &normal) const
   {
+    FUNCNAME_DBG("ElInfo::getNormal()");
     normal = coord[side] - coord[(side + 1) % 2];
     double det = norm(&normal);
     TEST_EXIT_DBG(det > 1.e-30)("det = 0 on side %d\n", side);
@@ -204,7 +204,7 @@ namespace AMDiS {
   /****************************************************************************/
   double ElInfo1d::getElementNormal(WorldVector<double> &elementNormal) const
   {
-    FUNCNAME("ElInfo::getElementNormal()");
+    FUNCNAME_DBG("ElInfo::getElementNormal()");
 
     TEST_EXIT_DBG(dimOfWorld == 2)
       (" element normal only well defined for  DIM_OF_WORLD = DIM + 1 !!");
@@ -224,7 +224,7 @@ namespace AMDiS {
 
   void ElInfo1d::fillElInfo(int ichild, const ElInfo *elInfoOld)
   {
-    FUNCNAME("ElInfo1d::fillElInfo()");
+    FUNCNAME_DBG("ElInfo1d::fillElInfo()");
 
     Element *nb;
     Element *elem = elInfoOld->element;
diff --git a/AMDiS/src/ElInfo2d.cc b/AMDiS/src/ElInfo2d.cc
index 1656a9c7..2e1c5fee 100644
--- a/AMDiS/src/ElInfo2d.cc
+++ b/AMDiS/src/ElInfo2d.cc
@@ -713,7 +713,7 @@ namespace AMDiS {
 
   double ElInfo2d::getNormal(int side, WorldVector<double> &normal) const
   {
-    FUNCNAME("ElInfo::getNormal()");
+    FUNCNAME_DBG("ElInfo::getNormal()");
 
     int i0 = (side + 1) % 3;
     int i1 = (side + 2) % 3;
@@ -752,7 +752,7 @@ namespace AMDiS {
   /****************************************************************************/
   double ElInfo2d::getElementNormal(WorldVector<double> &elementNormal) const
   {
-    FUNCNAME("ElInfo::getElementNormal()");
+    FUNCNAME_DBG("ElInfo::getElementNormal()");
 
     TEST_EXIT_DBG(dimOfWorld == 3)
       (" element normal only well defined for  DIM_OF_WORLD = DIM + 1 !!");
diff --git a/AMDiS/src/ElInfo3d.cc b/AMDiS/src/ElInfo3d.cc
index b6d792b2..76509ff9 100644
--- a/AMDiS/src/ElInfo3d.cc
+++ b/AMDiS/src/ElInfo3d.cc
@@ -173,7 +173,7 @@ namespace AMDiS {
 
   void ElInfo3d::fillMacroInfo(const MacroElement * mel)
   {
-    FUNCNAME("ElInfo3d::fillMacroInfo()");
+    FUNCNAME_DBG("ElInfo3d::fillMacroInfo()");
 
     TEST_EXIT_DBG(mel)("No macro element given!\n");
 
@@ -410,7 +410,7 @@ namespace AMDiS {
 
   void ElInfo3d::update()
   {
-    FUNCNAME("ElInfo::update()");
+    FUNCNAME_DBG("ElInfo::update()");
 
     int neighbours = mesh->getGeo(NEIGH);
     int vertices = mesh->getGeo(VERTEX);
diff --git a/AMDiS/src/Element.cc b/AMDiS/src/Element.cc
index d4d435a1..e48eeeaa 100644
--- a/AMDiS/src/Element.cc
+++ b/AMDiS/src/Element.cc
@@ -78,7 +78,7 @@ namespace AMDiS {
 
   void Element::createNewDofPtrs(bool setDofs)
   {
-    FUNCNAME("Element::setDofPtrs()");
+    FUNCNAME_DBG("Element::setDofPtrs()");
 
     TEST_EXIT_DBG(mesh)("no mesh!\n");
 
@@ -105,8 +105,6 @@ namespace AMDiS {
 
   bool Element::deleteElementData(int typeID)
   {
-    FUNCNAME("Element::deleteElementData()");
-
     if (elementData) {
       if (elementData->isOfType(typeID)) {
 	ElementData *tmp = elementData;
@@ -318,8 +316,6 @@ namespace AMDiS {
   void Element::changeDofs1(const DOFAdmin* admin, std::vector<int>& newDofIndex,
 			    int n0, int nd0, int nd, int pos)
   {
-    FUNCNAME("Element::changeDofs1()");
-
     DegreeOfFreedom *ldof = dof[n0 + pos] + nd0;
     for (int j = 0; j < nd; j++) {
       int k = ldof[j];
@@ -347,6 +343,8 @@ namespace AMDiS {
 
   int Element::oppVertex(FixVec<DegreeOfFreedom*, DIMEN> pdof) const
   {
+    FUNCNAME("Element::oppVertex()");
+    
     int nv = 0;
     int ov = 0;
     int vertices = mesh->getGeo(VERTEX);
@@ -651,7 +649,7 @@ namespace AMDiS {
 			   bool baseDofPtr,
 			   vector<GeoIndex>* dofGeoIndex)
   {
-    FUNCNAME("Element::getAllDofs()");
+    FUNCNAME_DBG("Element::getAllDofs()");
 
     getNodeDofs(feSpace, bound, dofs, baseDofPtr);
 
diff --git a/AMDiS/src/ElementDofIterator.cc b/AMDiS/src/ElementDofIterator.cc
index 3da06de1..3a752478 100644
--- a/AMDiS/src/ElementDofIterator.cc
+++ b/AMDiS/src/ElementDofIterator.cc
@@ -20,7 +20,7 @@ namespace AMDiS {
 
   void ElementDofIterator::reset(const Element* el)
   {
-    FUNCNAME("ElementDofIterator::reset()");
+    FUNCNAME_DBG("ElementDofIterator::reset()");
 
     TEST_EXIT_DBG(el->getMesh() == mesh)
       ("Mesh and element does not fit together!\n");
diff --git a/AMDiS/src/FirstOrderAssembler.cc b/AMDiS/src/FirstOrderAssembler.cc
index 1c576054..5d5a225f 100644
--- a/AMDiS/src/FirstOrderAssembler.cc
+++ b/AMDiS/src/FirstOrderAssembler.cc
@@ -40,7 +40,7 @@ namespace AMDiS {
 					   FirstOrderType type)
     : SubAssembler(op, assembler, quad, 1, optimized, type)
   {
-    FUNCNAME("FirstOrderAssmebler::FirstOrderAssembler()");
+    FUNCNAME_DBG("FirstOrderAssmebler::FirstOrderAssembler()");
     
     TEST_EXIT_DBG(dim > 0)("Should not happen!\n");
 
@@ -301,7 +301,7 @@ namespace AMDiS {
   Stand01::Stand01(Operator *op, Assembler *assembler, Quadrature *quad) 
     : FirstOrderAssembler(op, assembler, quad, false, GRD_PHI)
   {
-    FUNCNAME("Stand01::Stand01()");
+    FUNCNAME_DBG("Stand01::Stand01()");
 
     TEST_EXIT_DBG(dim > 0)("Should not happen!\n");
 
diff --git a/AMDiS/src/Global.cc b/AMDiS/src/Global.cc
index cdd04bae..d894e538 100644
--- a/AMDiS/src/Global.cc
+++ b/AMDiS/src/Global.cc
@@ -50,9 +50,10 @@ namespace AMDiS {
     FUNCNAME("Msg::wait()");
 
     if (w) {
-      char line[10];
+      std::string line;
       MSG("wait for <enter> ...");
-      char* result = fgets(line, 9, stdin);
+      std::cin >> line;
+//       char* result = fgets(line, 9, stdin);
     }
   }
 
diff --git a/AMDiS/src/Global.h b/AMDiS/src/Global.h
index bbe98dff..ba671e6a 100644
--- a/AMDiS/src/Global.h
+++ b/AMDiS/src/Global.h
@@ -136,6 +136,7 @@ namespace AMDiS {
     }
   };
 
+  
   /// check for file existence
   inline bool file_exists(const std::string filename)
   {
@@ -144,15 +145,16 @@ namespace AMDiS {
 #else
     return access(filename.c_str(), F_OK) == 0;
 #endif
-  };
+  }
 
+  
   /// trim std::string
   inline std::string trim(const std::string& oldStr)
   {
     std::string swap(oldStr);
     boost::algorithm::trim(swap);
     return swap;
-  };
+  }
 
   // ===== some simple template functions ====================================== 
 
@@ -330,6 +332,12 @@ namespace AMDiS {
   /// Should be the first call in every functions. It defines the current 
   /// function name nn for message output via MSG, WARNING, ...
 #define FUNCNAME(nn) const char *funcName; funcName = nn;
+  
+#if (DEBUG == 0) 
+  #define FUNCNAME_DBG(nn)
+#else
+  #define FUNCNAME_DBG(nn) const char *funcName; funcName = nn;
+#endif
 
   /// prints an error message 
 #define ERROR Msg::print_error_funcname(funcName,__FILE__, __LINE__),	\
diff --git a/AMDiS/src/Initfile.cc b/AMDiS/src/Initfile.cc
index 927dd68e..e8596472 100644
--- a/AMDiS/src/Initfile.cc
+++ b/AMDiS/src/Initfile.cc
@@ -155,8 +155,8 @@ namespace AMDiS {
       // otherwise throw tagNotFound exception
       std::string varParam;
       int error_code = checkedGet(varName, varParam);
-//       if (error_code != 0)
-// 	throw TagNotFoundBreak("required tag '" + varName + "' for variable substitution not found");
+      if (error_code > 2)
+	throw TagNotFoundBreak("required tag '" + varName + "' for variable substitution not found");
       
       std::string replaceName = inputSwap.substr(posVar , posVarEnd - posVar + (posVarBegin - posVar));
       inputSwap.replace(inputSwap.find(replaceName), replaceName.length(), varParam);
diff --git a/AMDiS/src/Lagrange.cc b/AMDiS/src/Lagrange.cc
index 93e4240d..3bbad7fe 100644
--- a/AMDiS/src/Lagrange.cc
+++ b/AMDiS/src/Lagrange.cc
@@ -233,7 +233,7 @@ namespace AMDiS {
 			     GeoIndex position, int positionIndex, int nodeIndex, 
 			     int** vertices)
   {
-    FUNCNAME("Lagrange::setVertices()");
+    FUNCNAME_DBG("Lagrange::setVertices()");
 
     TEST_EXIT_DBG(*vertices == NULL)("vertices != NULL\n");
 
@@ -817,7 +817,7 @@ namespace AMDiS {
 			  AbstractFunction<double, WorldVector<double> > *f, 
 			  mtl::dense_vector<double> &rvec) const
   {
-    FUNCNAME("Lagrange::interpol()");
+    FUNCNAME_DBG("Lagrange::interpol()");
 
     WorldVector<double> x;
 
@@ -852,7 +852,7 @@ namespace AMDiS {
 			  AbstractFunction<WorldVector<double>, WorldVector<double> > *f, 
 			  mtl::dense_vector<WorldVector<double> > &rvec) const
   {
-    FUNCNAME("*Lagrange::interpol()");
+    FUNCNAME_DBG("*Lagrange::interpol()");
 
     WorldVector<double> x;
 
@@ -956,7 +956,7 @@ namespace AMDiS {
 			     AbstractFunction<double, WorldVector<double> >* f,
 			     DOFVector<double>* fh)
   {
-    FUNCNAME("Lagrange::l2ScpFctBas()");
+    FUNCNAME_DBG("Lagrange::l2ScpFctBas()");
 
     TEST_EXIT_DBG(fh)("no DOF_REAL_VEC fh\n");
     TEST_EXIT_DBG(fh->getFeSpace())
@@ -1009,8 +1009,6 @@ namespace AMDiS {
 			       int n, 
 			       BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter0()");
-
     if (n < 1) 
       return;
 
@@ -1033,8 +1031,6 @@ namespace AMDiS {
 			      int n, 
 			      BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter1_1d()");
-
     if (n < 1) 
       return;
 
@@ -1055,8 +1051,6 @@ namespace AMDiS {
 				 int n, 
 				 BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter2_1d()");
-
     if (n < 1) 
       return;
     
@@ -1100,8 +1094,6 @@ namespace AMDiS {
 				 RCNeighbourList* list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter2_2d()");
-
     if (n < 1) 
       return;
 
@@ -1251,8 +1243,6 @@ namespace AMDiS {
 				 RCNeighbourList* list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter3_1d()");
-
     if (n < 1) 
       return;
 
@@ -1343,8 +1333,6 @@ namespace AMDiS {
 				 int n, 
 				 BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter3_2d()");
-
     if (n < 1) 
       return;
     
@@ -1435,7 +1423,7 @@ namespace AMDiS {
 				 RCNeighbourList* list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter3_3d()");
+    FUNCNAME_DBG("Lagrange::refineInter3_3d()");
 
     if (n < 1) 
       return;
@@ -1647,8 +1635,6 @@ namespace AMDiS {
 				 RCNeighbourList* list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter4_1d()");
-
     if (n < 1) 
       return;
 
@@ -1792,8 +1778,6 @@ namespace AMDiS {
 				 RCNeighbourList* list,
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter4_2d");
-
     if (n < 1) 
       return;
 
@@ -1938,7 +1922,7 @@ namespace AMDiS {
 				 RCNeighbourList* list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::refineInter4_3d");
+    FUNCNAME_DBG("Lagrange::refineInter4_3d");
 
     if (n < 1) 
       return;
@@ -2488,8 +2472,6 @@ namespace AMDiS {
 			      RCNeighbourList *list, 
 			      int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::coarseRestr0()");
-
     if (n < 1) 
       return;
 
@@ -2507,8 +2489,6 @@ namespace AMDiS {
 			      RCNeighbourList *list, 
 			      int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::coarseRestr1()");
-
     if (n < 1) 
       return;
 
@@ -4145,7 +4125,7 @@ namespace AMDiS {
   void Lagrange::coarseInter0(DOFIndexed<double> *drv, RCNeighbourList* list, 
 			      int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::coarseInter0()");
+    FUNCNAME_DBG("Lagrange::coarseInter0()");
 
     TEST_EXIT_DBG(drv->getFeSpace())("No fe_space in dof_real_vec!\n");
     TEST_EXIT_DBG(drv->getFeSpace()->getBasisFcts())
@@ -4170,7 +4150,7 @@ namespace AMDiS {
   void Lagrange::coarseInter2_1d(DOFIndexed<double> *drv, RCNeighbourList *list, 
 				 int n, BasisFunction* basFct)
   {
-    FUNCNAME("Lagrange::coarseInter2_1d()");
+    FUNCNAME_DBG("Lagrange::coarseInter2_1d()");
 
     TEST_EXIT_DBG(drv->getFeSpace())("No fe_space in dof_real_vec!\n");
     TEST_EXIT_DBG(drv->getFeSpace()->getBasisFcts())
diff --git a/AMDiS/src/Line.h b/AMDiS/src/Line.h
index 7749f612..bf7f3aa1 100644
--- a/AMDiS/src/Line.h
+++ b/AMDiS/src/Line.h
@@ -114,7 +114,7 @@ namespace AMDiS {
     /// implements Element::getSideOfChild()
     int getSideOfChild(int child, int side, int) const 
     {
-      FUNCNAME("Line::getSideOfChild()");
+      FUNCNAME_DBG("Line::getSideOfChild()");
       TEST_EXIT_DBG(child == 0 || child == 1)("Child must be either 0 or 1!\n");
       TEST_EXIT_DBG(side >= 0 && side <= 1)("Side must be either 0 or 1!\n");
       return sideOfChild[child][side];
@@ -129,7 +129,7 @@ namespace AMDiS {
     /// implements Element::getVertexOfParent()
     int getVertexOfParent(int child, int side, int) const 
     {
-      FUNCNAME("Line::getVertexOfParent()");
+      FUNCNAME_DBG("Line::getVertexOfParent()");
       TEST_EXIT_DBG(child == 0 || child == 1)("Child must be either 0 or 1!\n");
       TEST_EXIT_DBG(side >= 0 && side <= 1)("Side must be between 0 and 2!\n");
       return vertexOfParent[child][side];
diff --git a/AMDiS/src/MacroElement.cc b/AMDiS/src/MacroElement.cc
index ddc6a1a8..58c4d9bb 100644
--- a/AMDiS/src/MacroElement.cc
+++ b/AMDiS/src/MacroElement.cc
@@ -47,8 +47,6 @@ namespace AMDiS {
 
   MacroElement& MacroElement::operator=(const MacroElement &el)
   {
-    FUNCNAME("MacroElement::operator=()");
-
     if (this == &el)
       return *this;
 
diff --git a/AMDiS/src/Marker.cc b/AMDiS/src/Marker.cc
index 3f82e606..e3589ad8 100644
--- a/AMDiS/src/Marker.cc
+++ b/AMDiS/src/Marker.cc
@@ -50,7 +50,7 @@ namespace AMDiS {
   
   void Marker::initMarking(AdaptInfo *adaptInfo, Mesh *mesh)
   {
-    FUNCNAME("Marker::initMarking()");
+    FUNCNAME_DBG("Marker::initMarking()");
 
     TEST_EXIT_DBG(adaptInfo)("No AdaptInfo object!\n");
 
@@ -72,8 +72,6 @@ namespace AMDiS {
 
   void Marker::markElement(AdaptInfo *adaptInfo, ElInfo *elInfo) 
   {
-    FUNCNAME("Marker::markElement()");
-
     Element *el = elInfo->getElement();
     double lError = el->getEstimation(row);
 
@@ -94,7 +92,7 @@ namespace AMDiS {
 
   Flag Marker::markMesh(AdaptInfo *adaptInfo, Mesh *mesh) 
   {
-    FUNCNAME("Marker::markMesh()");
+    FUNCNAME_DBG("Marker::markMesh()");
 
     TEST_EXIT_DBG(mesh)("No mesh!\n");
 
diff --git a/AMDiS/src/MatrixVector.h b/AMDiS/src/MatrixVector.h
index 8c0e793a..e18a8e84 100644
--- a/AMDiS/src/MatrixVector.h
+++ b/AMDiS/src/MatrixVector.h
@@ -512,7 +512,7 @@ namespace AMDiS {
 		     const Vector<T>& y, 
 		     Vector<T>& z)
   {
-    FUNCNAME("vectorProduct()");
+    FUNCNAME_DBG("vectorProduct()");
     TEST_EXIT_DBG(Global::getGeo(WORLD) == 3)("DIM_OF_WORLD != 3\n");
     z[0] = x[1] * y[2] - x[2] * y[1];
     z[1] = x[2] * y[0] - x[0] * y[2];
diff --git a/AMDiS/src/Mesh.cc b/AMDiS/src/Mesh.cc
index 5042fbdd..0803de17 100644
--- a/AMDiS/src/Mesh.cc
+++ b/AMDiS/src/Mesh.cc
@@ -466,7 +466,7 @@ namespace AMDiS {
 
   void Mesh::dofCompress()
   {
-    FUNCNAME("Mesh::dofCompress()");
+    FUNCNAME_DBG("Mesh::dofCompress()");
 
     for (unsigned int iadmin = 0; iadmin < admin.size(); iadmin++) {
       DOFAdmin* compressAdmin = admin[iadmin];
@@ -503,7 +503,7 @@ namespace AMDiS {
 
   DegreeOfFreedom *Mesh::getDof(GeoIndex position)
   {
-    FUNCNAME("Mesh::getDof()");
+    FUNCNAME_DBG("Mesh::getDof()");
 
     TEST_EXIT_DBG(position >= CENTER && position <= FACE)
       ("unknown position %d\n", position);
@@ -534,8 +534,6 @@ namespace AMDiS {
 
   DegreeOfFreedom **Mesh::createDofPtrs()
   {
-    FUNCNAME("Mesh::createDofPtrs()");
-
     if (nNodeEl <= 0)
       return NULL;
 
@@ -549,7 +547,7 @@ namespace AMDiS {
 
   void Mesh::freeDofPtrs(DegreeOfFreedom **ptrs)
   {
-    FUNCNAME("Mesh::freeDofPtrs()");
+    FUNCNAME_DBG("Mesh::freeDofPtrs()");
 
     TEST_EXIT_DBG(ptrs)("ptrs is NULL!\n");
 
@@ -561,9 +559,7 @@ namespace AMDiS {
 
 
   const DOFAdmin *Mesh::createDOFAdmin(string lname, DimVec<int> lnDof)
-  {
-    FUNCNAME("Mesh::createDOFAdmin()");
-    
+  {    
     DOFAdmin *localAdmin = new DOFAdmin(this, lname);
 
     for (int i = 0; i < dim + 1; i++)
@@ -594,7 +590,7 @@ namespace AMDiS {
 
   void Mesh::freeDof(DegreeOfFreedom* dof, GeoIndex position)
   {
-    FUNCNAME("Mesh::freeDof()");
+    FUNCNAME_DBG("Mesh::freeDof()");
 
     TEST_EXIT_DBG(position >= CENTER && position <= FACE)
       ("unknown position %d\n", position);
@@ -632,7 +628,7 @@ namespace AMDiS {
 
   Element* Mesh::createNewElement(Element *parent)
   {
-    FUNCNAME("Mesh::createNewElement()");
+    FUNCNAME_DBG("Mesh::createNewElement()");
 
     TEST_EXIT_DBG(elementPrototype)("no element prototype\n");
 
@@ -911,8 +907,6 @@ namespace AMDiS {
 			       const FiniteElemSpace* feSpace,
 			       WorldVector<double>& coords)
   {
-    FUNCNAME("Mesh::getDofIndexCoords()");
-
     DimVec<double>* baryCoords;
     bool found = false;
     TraverseStack stack;
@@ -945,8 +939,6 @@ namespace AMDiS {
 
   void Mesh::getDofIndexCoords(DOFVector<WorldVector<double> >& coords)
   {
-    FUNCNAME("Mesh::getDofIndexCoords()");
-
     const FiniteElemSpace *feSpace = coords.getFeSpace();
     const BasisFunction* basFcts = feSpace->getBasisFcts();
     int nBasFcts = basFcts->getNumber();
@@ -971,8 +963,6 @@ namespace AMDiS {
   void Mesh::getAllDofs(const FiniteElemSpace *feSpace, 
 			std::set<const DegreeOfFreedom*>& allDofs)
   {
-    FUNCNAME("Mesh::getAllDofs()");
-
     ElementDofIterator elDofIt(feSpace);   
     allDofs.clear();
 
@@ -1079,14 +1069,16 @@ namespace AMDiS {
 
   void Mesh::deserialize(istream &in)
   {
-    FUNCNAME("Mesh::deserialize()");
+    FUNCNAME_DBG("Mesh::deserialize()");
 
     serializedDOFs.clear();
 
     in >> name;
     in.get();
 
+#if DEBUG != 0
     int oldVal = dim;
+#endif
     SerUtil::deserialize(in, dim);
     TEST_EXIT_DBG(oldVal == 0 || dim == oldVal)("Invalid dimension!\n");
 
@@ -1101,13 +1093,17 @@ namespace AMDiS {
 
     SerUtil::deserialize(in, preserveCoarseDOFs);
 
+#if DEBUG != 0
     oldVal = nDofEl;
+#endif
     SerUtil::deserialize(in, nDofEl);
     TEST_EXIT_DBG(oldVal == 0 || nDofEl == oldVal)("Invalid nDofEl!\n");
 
     nDof.deserialize(in);
 
+#if DEBUG != 0
     oldVal = nNodeEl;
+#endif
     SerUtil::deserialize(in, nNodeEl);
     TEST_EXIT_DBG(oldVal == 0 || nNodeEl == oldVal)("Invalid nNodeEl!\n");
 
diff --git a/AMDiS/src/Mesh.h b/AMDiS/src/Mesh.h
index 708b24f8..c0ba1776 100644
--- a/AMDiS/src/Mesh.h
+++ b/AMDiS/src/Mesh.h
@@ -550,7 +550,7 @@ namespace AMDiS {
     /// Returns the periodic association for a specific boundary type.
     inline VertexVector& getPeriodicAssociations(BoundaryType b)
     {
-      FUNCNAME("Mesh::getPeriodicAssociations()");
+      FUNCNAME_DBG("Mesh::getPeriodicAssociations()");
 
       TEST_EXIT_DBG(periodicAssociations.count(b) == 1)
 	("There are no periodic assoications for boundary type %d!\n", b);
diff --git a/AMDiS/src/MeshStructure.cc b/AMDiS/src/MeshStructure.cc
index d36dde7d..d59d80fa 100644
--- a/AMDiS/src/MeshStructure.cc
+++ b/AMDiS/src/MeshStructure.cc
@@ -175,7 +175,7 @@ namespace AMDiS {
 
   bool MeshStructure::nextElement(MeshStructure *insert)
   {
-    FUNCNAME("MeshStructure::nextElement()");
+    FUNCNAME_DBG("MeshStructure::nextElement()");
 
     if (insert)
       insert->insertElement(isLeafElement());
@@ -202,8 +202,6 @@ namespace AMDiS {
 
   int MeshStructure::lookAhead(unsigned int n)
   {
-    FUNCNAME("MeshStructure::lookAhead()");
-
     int returnValue = 0;
 
     int tmp_pos = pos;
@@ -232,7 +230,7 @@ namespace AMDiS {
 
   bool MeshStructure::skipBranch(MeshStructure *insert)
   {
-    FUNCNAME("MeshStructure::skipBranch()");
+    FUNCNAME_DBG("MeshStructure::skipBranch()");
 
     if (isLeafElement()) {
       return nextElement(insert);
@@ -250,7 +248,7 @@ namespace AMDiS {
 			    MeshStructure *structure2,
 			    MeshStructure *result)
   {
-    FUNCNAME("MeshStructure::merge()");
+    FUNCNAME_DBG("MeshStructure::merge()");
 
     result->clear();
     structure1->reset();
@@ -258,17 +256,26 @@ namespace AMDiS {
 
     bool cont = true;
     while (cont) {
-      bool cont1, cont2;
+      bool cont1;
+#if DEBUG != 0
+      bool cont2;
+#endif
       if (structure1->isLeafElement() == structure2->isLeafElement()) {
 	cont1 = structure1->nextElement(result);
+#if DEBUG != 0
 	cont2 = structure2->nextElement();
+#endif
       } else {
 	if (structure1->isLeafElement()) {
 	  cont1 = structure1->nextElement();
+#if DEBUG != 0
 	  cont2 = structure2->skipBranch(result);
+#endif
 	} else {
 	  cont1 = structure1->skipBranch(result);
+#if DEBUG != 0
 	  cont2 = structure2->nextElement();
+#endif
 	}
       }
       TEST_EXIT_DBG(cont1 == cont2)("Structures don't match!\n");
@@ -426,7 +433,7 @@ namespace AMDiS {
 					     const DOFVector<double>* vec,
 					     std::vector<double>& values)
   {
-    FUNCNAME("MeshStructure::getMeshStructureValues()");
+    FUNCNAME_DBG("MeshStructure::getMeshStructureValues()");
 
     TEST_EXIT_DBG(vec)("No DOFVector defined!\n");
   
@@ -479,7 +486,7 @@ namespace AMDiS {
 					     DOFVector<double>* vec,
 					     const std::vector<double>& values)
   {
-    FUNCNAME("MeshStructure::setMeshStructureValues()");
+    FUNCNAME_DBG("MeshStructure::setMeshStructureValues()");
 
     TEST_EXIT_DBG(vec)("No DOFVector defined!\n");
 
diff --git a/AMDiS/src/MeshStructure_ED.h b/AMDiS/src/MeshStructure_ED.h
index d23d70bf..752e3182 100644
--- a/AMDiS/src/MeshStructure_ED.h
+++ b/AMDiS/src/MeshStructure_ED.h
@@ -50,7 +50,7 @@ namespace AMDiS {
 				   Element* child2,
 				   int elType)
     {
-      FUNCNAME("MeshStructureED::refineElementData()");
+      FUNCNAME_DBG("MeshStructureED::refineElementData()");
 
       ElementData::refineElementData(parent, child1, child2, elType);
 
diff --git a/AMDiS/src/OEMSolver.h b/AMDiS/src/OEMSolver.h
index 4e8ea2db..d47959bc 100644
--- a/AMDiS/src/OEMSolver.h
+++ b/AMDiS/src/OEMSolver.h
@@ -79,9 +79,7 @@ namespace AMDiS {
     {}
 
     void initParameters()
-    {
-      FUNCNAME("OEMSolver::initParameters()");
-      
+    {      
       Parameters::get(name + "->tolerance", tolerance);
       Parameters::get(name + "->relative tolerance", relative);
       Parameters::get(name + "->max iteration", max_iter);
@@ -188,12 +186,14 @@ namespace AMDiS {
     
     virtual BasePreconditionerType* getLeftPrecon()
     {
+      FUNCNAME("OEMSolver::getLeftPrecon()");
       WARNING("no left preconditioner provided!\n");
       return NULL;
     }    
     
     virtual BasePreconditionerType* getRightPrecon()
     {
+      FUNCNAME("OEMSolver::getRightPrecon()");
       WARNING("no right preconditioner provided!\n");
       return NULL;
     }
diff --git a/AMDiS/src/OperatorTerm.hh b/AMDiS/src/OperatorTerm.hh
index 3dc0005c..3cac6c7d 100644
--- a/AMDiS/src/OperatorTerm.hh
+++ b/AMDiS/src/OperatorTerm.hh
@@ -21,7 +21,7 @@ namespace AMDiS {
 				    Quadrature *quad,
 				    mtl::dense_vector<T>& vecAtQPs)
   {
-    FUNCNAME("OperatorTerm::getVectorAtQPs()");
+    FUNCNAME_DBG("OperatorTerm::getVectorAtQPs()");
 
     TEST_EXIT_DBG(elInfo->getMesh() == vec->getFeSpace()->getMesh())
       ("There is something wrong!\n");
@@ -75,7 +75,7 @@ namespace AMDiS {
 					Quadrature *quad,
 					mtl::dense_vector<typename GradientType<T>::type>& grdAtQPs)
   {
-    FUNCNAME("OperatorTerm::getGradientsAtQPs()");
+    FUNCNAME_DBG("OperatorTerm::getGradientsAtQPs()");
 
     TEST_EXIT_DBG(elInfo->getMesh() == vec->getFeSpace()->getMesh())
       ("There is something wrong!\n");
diff --git a/AMDiS/src/PeriodicBC.cc b/AMDiS/src/PeriodicBC.cc
index 1fb18b6a..e8bb99a4 100644
--- a/AMDiS/src/PeriodicBC.cc
+++ b/AMDiS/src/PeriodicBC.cc
@@ -134,7 +134,7 @@ namespace AMDiS {
 					 const BoundaryType *localBound,
 					 int nBasFcts)
   {
-    FUNCNAME("PeriodicBC::fillBoundaryCondition()");
+    FUNCNAME_DBG("PeriodicBC::fillBoundaryCondition()");
 
     if (matrix != masterMatrix)
       return;
@@ -228,8 +228,6 @@ namespace AMDiS {
 
   void PeriodicBC::exitVector(DOFVectorBase<double>* vector)
   {
-    FUNCNAME("PeriodicBC::exitVector()");
-
     DOFIterator<double> vecIt(vector, USED_DOFS);
     Mesh *mesh = vector->getFeSpace()->getMesh();
     VertexVector *associated = mesh->getPeriodicAssociations()[boundaryType];
diff --git a/AMDiS/src/ProblemImplicit.cc b/AMDiS/src/ProblemImplicit.cc
index 5677e6d6..a9a06b9d 100644
--- a/AMDiS/src/ProblemImplicit.cc
+++ b/AMDiS/src/ProblemImplicit.cc
@@ -222,8 +222,6 @@ namespace AMDiS {
 
   bool ProblemImplicit::createImplicitMesh(int p) 
   {
-    FUNCNAME("ProblemImplicit::createImplicitMesh()");
-
     std::string path = name + "->implicit mesh[" 
       + boost::lexical_cast< std::string >(p) + "]->";
     int nImplMeshes(0);
@@ -283,8 +281,6 @@ namespace AMDiS {
 
   void ProblemImplicit::createMesh()
   {
-    FUNCNAME("ProblemImplicit::createMesh()");
-
     ProblemStat::createMesh();
 #if 0
     implMesh.resize(meshes.size());
@@ -313,8 +309,6 @@ namespace AMDiS {
 				   ProblemStatSeq* adaptProblem, 
 				   Flag adoptFlag)
   {
-    FUNCNAME("ProblemImplicit::initialize()");
-
     ProblemStat::initialize(initFlag);
     if ( initFlag.isSet(INIT_IMPLICIT_MESH) )
       createImplicitMesh();
diff --git a/AMDiS/src/ProblemInstat.cc b/AMDiS/src/ProblemInstat.cc
index f9da2d06..e6946c5e 100644
--- a/AMDiS/src/ProblemInstat.cc
+++ b/AMDiS/src/ProblemInstat.cc
@@ -44,7 +44,9 @@ namespace AMDiS {
 
   void ProblemInstat::closeTimestep(AdaptInfo *adaptInfo) 
   {
+#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
     FUNCNAME("ProblemInstat::closeTimestep()");
+#endif
 
     bool force = (adaptInfo->getTime() >= adaptInfo->getEndTime());
     problemStat->writeFiles(adaptInfo, force);
diff --git a/AMDiS/src/ProblemStat.cc b/AMDiS/src/ProblemStat.cc
index 63e65784..90bba929 100644
--- a/AMDiS/src/ProblemStat.cc
+++ b/AMDiS/src/ProblemStat.cc
@@ -478,8 +478,6 @@ namespace AMDiS {
 
   void ProblemStatSeq::createMatricesAndVectors()
   {
-    FUNCNAME("ProblemStat::createMatricesAndVectors()");
-
     // === create vectors and system matrix ===
 
     systemMatrix = new Matrix<DOFMatrix*>(nComponents, nComponents);
@@ -559,8 +557,6 @@ namespace AMDiS {
 
   void ProblemStatSeq::createMarker()
   {
-    FUNCNAME("ProblemStat::createMarker()");
-
     int nMarkersCreated = 0;
 
     for (int i = 0; i < nComponents; i++) {
@@ -697,7 +693,7 @@ namespace AMDiS {
 
   Flag ProblemStatSeq::markElements(AdaptInfo *adaptInfo) 
   {
-    FUNCNAME("ProblemStat::markElements()");
+    FUNCNAME_DBG("ProblemStat::markElements()");
 
     TEST_EXIT_DBG(static_cast<unsigned int>(nComponents) == marker.size())
       ("Wrong number of markers!\n");
@@ -713,8 +709,6 @@ namespace AMDiS {
 
   Flag ProblemStatSeq::refineMesh(AdaptInfo *adaptInfo) 
   {
-    FUNCNAME("ProblemStat::refineMesh()");
-
     int nMeshes = static_cast<int>(meshes.size());
     Flag refineFlag = 0;
     for (int i = 0; i < nMeshes; i++)
@@ -727,8 +721,6 @@ namespace AMDiS {
 
   Flag ProblemStatSeq::coarsenMesh(AdaptInfo *adaptInfo) 
   {
-    FUNCNAME("ProblemStat::coarsenMesh()");
-
     int nMeshes = static_cast<int>(meshes.size());
     Flag coarsenFlag = 0;
     for (int i = 0; i < nMeshes; i++)
@@ -741,8 +733,6 @@ namespace AMDiS {
 
   Flag ProblemStatSeq::oneIteration(AdaptInfo *adaptInfo, Flag toDo)
   {
-    FUNCNAME("ProblemStat::oneIteration()");
-
     for (int i = 0; i < nComponents; i++)
       if (adaptInfo->spaceToleranceReached(i))
  	adaptInfo->allowRefinement(false, i);
@@ -756,7 +746,9 @@ namespace AMDiS {
   void ProblemStatSeq::buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag,
 					 bool asmMatrix, bool asmVector)
   {
+#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
     FUNCNAME("ProblemStat::buildAfterCoarsen()");
+#endif
 
     if (dualMeshTraverseRequired()) {
 #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
@@ -878,7 +870,7 @@ namespace AMDiS {
 	// conditions. In this case, we may have a data race between 
 	// fillBoundaryCondition and exitMatrix, where both make use of the
 	// vertex vector associated.
-#pragma omp barrier
+// #pragma omp barrier
 
 	// The simplest case: either the right hand side has no operaters, no aux
 	// fe spaces, or all aux fe spaces are equal to the row and col fe space.
@@ -889,7 +881,7 @@ namespace AMDiS {
 			  rhs->getDOFVector(rowComponent) : 
 			  NULL);
 
-#pragma omp barrier
+// #pragma omp barrier
       
 	assembledMatrix[rowComponent][colComponent] = true;
 
@@ -1222,8 +1214,6 @@ namespace AMDiS {
 
   void ProblemStatSeq::interpolInitialSolution(vector<AbstractFunction<double, WorldVector<double> >*> *fct) 
   {
-    FUNCNAME("ProblemStat::interpolInitialSolution()");
-
     solution->interpol(fct);
   }
 
@@ -1374,8 +1364,6 @@ namespace AMDiS {
   void ProblemStatSeq::addNeumannBC(BoundaryType type, int row, int col, 
 				    AbstractFunction<double, WorldVector<double> > *n)
   {
-    FUNCNAME("ProblemStat::addNeumannBC()");
-
     boundaryConditionSet = true;
 
     NeumannBC *neumann = 
@@ -1389,8 +1377,6 @@ namespace AMDiS {
   void ProblemStatSeq::addNeumannBC(BoundaryType type, int row, int col, 
 				    DOFVector<double> *n)
   {
-    FUNCNAME("ProblemStat::addNeumannBC()");
-
     boundaryConditionSet = true;
 
     NeumannBC *neumann = 
@@ -1405,8 +1391,6 @@ namespace AMDiS {
 				  AbstractFunction<double, WorldVector<double> > *n,
 				  AbstractFunction<double, WorldVector<double> > *r)
   {
-    FUNCNAME("ProblemStat::addRobinBC()");
-
     boundaryConditionSet = true;
 
     RobinBC *robin = 
@@ -1423,8 +1407,6 @@ namespace AMDiS {
 				  DOFVector<double> *n,
 				  DOFVector<double> *r)
   {
-    FUNCNAME("ProblemStat::addRobinBC()");
-
     boundaryConditionSet = true;
 
     RobinBC *robin = 
@@ -1441,8 +1423,6 @@ namespace AMDiS {
 				  Operator *n,
 				  Operator *r)
   {
-    FUNCNAME("ProblemStat::addRobinBC()");
-
     boundaryConditionSet = true;
 
     RobinBC *robin = 
@@ -1457,8 +1437,6 @@ namespace AMDiS {
 
   void ProblemStatSeq::addPeriodicBC(BoundaryType type, int row, int col) 
   {
-    FUNCNAME("ProblemStat::addPeriodicBC()");
-
     boundaryConditionSet = true;
     PeriodicBC *periodic = new PeriodicBC(type, componentSpaces[row]);
 
@@ -1473,8 +1451,6 @@ namespace AMDiS {
   void ProblemStatSeq::addBoundaryMatrixOperator(BoundaryType type, 
           Operator *op, int row, int col)
   {
-    FUNCNAME("ProblemStat::addBoundaryOperator()");
-
     boundaryConditionSet = true;
 
     RobinBC *robin = 
@@ -1488,8 +1464,6 @@ namespace AMDiS {
   void ProblemStatSeq::addBoundaryVectorOperator(BoundaryType type, 
           Operator *op, int row)
   {
-    FUNCNAME("ProblemStat::addBoundaryOperator()");
-
     boundaryConditionSet = true;
 
     RobinBC *robin = 
@@ -1505,8 +1479,6 @@ namespace AMDiS {
 					 DOFMatrix *matrix, 
 					 DOFVector<double> *vector)
   {
-    FUNCNAME("ProblemStat::assembleOnOnMesh()");
-
     Mesh *mesh = feSpace->getMesh();
     const BasisFunction *basisFcts = feSpace->getBasisFcts();
 
@@ -1563,9 +1535,6 @@ namespace AMDiS {
 						  Mesh *mesh,
 						  Flag assembleFlag)
   {
-    FUNCNAME("ProblemStat::assembleBoundaryConditions()");
-
-
     // === Initialization of vectors ===
 
     if (rhs->getBoundaryManager())
@@ -1599,8 +1568,6 @@ namespace AMDiS {
 					 AdaptInfo *adaptInfo, 
 					 string name)
   {
-    FUNCNAME("ProblemStat::writeResidualMesh()");
-
     map<int, double> vec;    
     TraverseStack stack;
     ElInfo *elInfo = 
@@ -1618,8 +1585,6 @@ namespace AMDiS {
 
   void ProblemStatSeq::serialize(ostream &out) 
   {
-    FUNCNAME("ProblemStat::serialize()");
-   
     for (unsigned int i = 0; i < meshes.size(); i++)
       meshes[i]->serialize(out);
 
diff --git a/AMDiS/src/QPsiPhi.cc b/AMDiS/src/QPsiPhi.cc
index b578684f..5b297571 100644
--- a/AMDiS/src/QPsiPhi.cc
+++ b/AMDiS/src/QPsiPhi.cc
@@ -54,7 +54,7 @@ namespace AMDiS {
       k(NULL),
       l(NULL)
   {
-    FUNCNAME("Q11PsiPhi::Q11PsiPhi()");
+    FUNCNAME_DBG("Q11PsiPhi::Q11PsiPhi()");
 
     const FastQuadrature *q_phi, *q_psi;
     int j, lk, ll, n, iq, all_entries, n_psi, n_phi;
@@ -186,7 +186,6 @@ namespace AMDiS {
 					       const BasisFunction *ph,
 					       const Quadrature    *quadrat)
   {
-    FUNCNAME("Q11PsiPhi::provideQ11PsiPhi");
     std::list<Q11PsiPhi*>::iterator list;
  
     if (!ps && !ph) return NULL;
@@ -225,7 +224,7 @@ namespace AMDiS {
   Q10PsiPhi::Q10PsiPhi(const BasisFunction *ps, const BasisFunction *ph,
 		       const Quadrature *quadrat):psi(ps),phi(ph),quadrature(quadrat)
   {
-    FUNCNAME("Q10PsiPhi::Q10PsiPhi");
+    FUNCNAME_DBG("Q10PsiPhi::Q10PsiPhi");
     const FastQuadrature      *q_phi, *q_psi;
     int                       i, j, lk, n=0, iq, all_entries, n_psi, n_phi;
     double                      val, psij, grdi;
@@ -347,7 +346,6 @@ namespace AMDiS {
 					       const BasisFunction *ph,
 					       const Quadrature *quadrat)
   {
-    FUNCNAME("Q10PsiPhi::provideQ10PsiPhi");
     std::list<Q10PsiPhi*>::iterator list;
  
     if (!ps && !ph) return NULL;
@@ -384,7 +382,7 @@ namespace AMDiS {
 		       const Quadrature *quadrat)
     : psi(ps),phi(ph),quadrature(quadrat)
   {
-    FUNCNAME("Q01PsiPhi::Q01PsiPhi");
+    FUNCNAME_DBG("Q01PsiPhi::Q01PsiPhi");
     const FastQuadrature      *q_phi, *q_psi;
     int                       i, j, ll, n=0, iq, all_entries, n_psi, n_phi;
     double                      val, grdj, psii;
@@ -508,7 +506,6 @@ namespace AMDiS {
 					       const BasisFunction *ph,
 					       const Quadrature    *quadrat)
   {
-    FUNCNAME("Q01PsiPhi::provideQ01PsiPhi");
     std::list<Q01PsiPhi*>::iterator list;
  
     if (!ps && !ph) return NULL;
@@ -563,7 +560,6 @@ namespace AMDiS {
       phi(ph), 
       quadrature(quadrat)
   {
-    FUNCNAME("Q00PsiPhi::Q00PsiPhi()");
 
     const FastQuadrature      *q_phi, *q_psi;
     int                       i, j,iq, n_psi, n_phi;
@@ -631,7 +627,6 @@ namespace AMDiS {
 					 const BasisFunction *ph,
 					 const Quadrature    *quadrat)
   {
-    FUNCNAME("Q00PsiPhi::provideQ00PsiPhi");
     std::list<Q00PsiPhi*>::iterator list;
 
     if (!ps && !ph) return NULL;
@@ -666,7 +661,6 @@ namespace AMDiS {
   Q0Psi::Q0Psi(const BasisFunction *ps, const Quadrature *quadrat)
     : psi(ps), quadrature(quadrat)
   {
-    FUNCNAME("Q0Psi::Q0Psi()");
     const FastQuadrature *q_psi;
 
     int iq, n_psi;
@@ -709,7 +703,6 @@ namespace AMDiS {
 
   Q0Psi* Q0Psi::provideQ0Psi(const BasisFunction *ps, const Quadrature *quadrat)
   {
-    FUNCNAME("Q0Psi::provideQ0Psi");
     std::list<Q0Psi*>::iterator list;
  
     if (!ps) return NULL;
@@ -740,7 +733,7 @@ namespace AMDiS {
   Q1Psi::Q1Psi(const BasisFunction *ps, const Quadrature *quadrat)
     : psi(ps), quadrature(quadrat),nrEntries(NULL),values(NULL),k(NULL)
   {
-    FUNCNAME("Q1Psi::Q1Psi");
+    FUNCNAME_DBG("Q1Psi::Q1Psi");
     const FastQuadrature *q_psi;
     int                       i, lk, n, iq, all_entries, n_psi;
     double                    val, grdi;
@@ -834,7 +827,6 @@ namespace AMDiS {
   const Q1Psi* Q1Psi::provideQ1Psi(const BasisFunction *ps, 
 				   const Quadrature    *quadrat)
   {
-    FUNCNAME("Q1Psi::provideQ1Psi");
     std::list<Q1Psi*>::iterator list;
  
     if (!ps) return NULL;
diff --git a/AMDiS/src/Quadrature.cc b/AMDiS/src/Quadrature.cc
index c81ccf50..c2899581 100644
--- a/AMDiS/src/Quadrature.cc
+++ b/AMDiS/src/Quadrature.cc
@@ -49,8 +49,6 @@ namespace AMDiS {
 			DimVec<double> >& f, 
 			WorldVector<double>* vec) const
   {
-    FUNCNAME("Quadrature::grdFAtQp()");
-
     static WorldVector<double> *quad_vec_d = NULL;
     static size_t size = 0;
     WorldVector<double> *val;
@@ -82,8 +80,6 @@ namespace AMDiS {
   const double *Quadrature::fAtQp(const AbstractFunction<double, DimVec<double> >& f,
 				  double *vec) const
   {
-    FUNCNAME("Quadrature::fAtQp()");
-
     static double *quad_vec = NULL;
     static size_t size = 0;
     double *val;
@@ -1414,7 +1410,7 @@ namespace AMDiS {
     Quadrature::quad_nd[1] = Quadrature::quad_1d;
     Quadrature::quad_nd[2] = Quadrature::quad_2d;
     Quadrature::quad_nd[3] = Quadrature::quad_3d;
-  };
+  }
 
 
   Quadrature* Quadrature::provideQuadrature(int dim_, int degree_)
@@ -1474,11 +1470,9 @@ namespace AMDiS {
 							const Quadrature& quad, 
 							Flag init_flag)
   {
-    FUNCNAME("FastQuadrature::provideFastQuuadrature()");
-
     FastQuadrature *quad_fast = NULL;
 
-#pragma omp critical
+// #pragma omp critical
     {
       list<FastQuadrature*>::iterator fast = fastQuadList.begin(); 
       for (; fast != fastQuadList.end(); fast++)
diff --git a/AMDiS/src/RCNeighbourList.cc b/AMDiS/src/RCNeighbourList.cc
index 773cacf9..5b8fb76d 100644
--- a/AMDiS/src/RCNeighbourList.cc
+++ b/AMDiS/src/RCNeighbourList.cc
@@ -111,8 +111,6 @@ namespace AMDiS {
 
   void  RCNeighbourList::fillNeighbourRelations(int n_neigh, int bound)
   {
-    FUNCNAME("RCNeighbourList::getNeighOnPatch()");
-
 	// for all RC Elements in list
     for (int i = 0; i < n_neigh; i++) {
       Element *el = rclist[i]->el;
@@ -335,7 +333,7 @@ namespace AMDiS {
 				      int *n_neigh_periodic,
 				      RCNeighbourList &periodicList)
   {
-    FUNCNAME("RCNeighbourList::periodicSplit()");
+    FUNCNAME_DBG("RCNeighbourList::periodicSplit()");
 
     *n_neigh_periodic = 0;
     int count = 0;
diff --git a/AMDiS/src/Recovery.cc b/AMDiS/src/Recovery.cc
index 79d03eef..f97c812b 100644
--- a/AMDiS/src/Recovery.cc
+++ b/AMDiS/src/Recovery.cc
@@ -147,8 +147,6 @@ void RecoveryStructure::print()
 
 void Recovery::set_feSpace(const FiniteElemSpace *fe_space)
 {
-  FUNCNAME("Recovery::set_feSpace()");
-
   if (!feSpace || feSpace != fe_space) {
     if (struct_vec) {
       delete struct_vec;
@@ -245,7 +243,7 @@ void Recovery::compute_integrals(DOFVector<double> *uh, ElInfo *elInfo,
 				 AbstractFunction<double, double> *f_scal,
 				 DOFVector<double> *aux_vec)
 {
-  FUNCNAME("Recovery::compute_integrals()");
+  FUNCNAME_DBG("Recovery::compute_integrals()");
 
   TEST_EXIT_DBG(!(f_vec && f_scal))("Only one diffusion function, please!\n");
 
@@ -332,7 +330,7 @@ void Recovery::compute_interior_sums(DOFVector<double> *uh, ElInfo *elInfo,
 				     AbstractFunction<double, double> *f_scal,
 				     DOFVector<double> *aux_vec)
 {
-  FUNCNAME("Recovery::compute_sums()");
+  FUNCNAME_DBG("Recovery::compute_sums()");
 
   TEST_EXIT_DBG(gradient)("SPR of solution need computing node sums.\n");
   TEST_EXIT_DBG(!(f_vec && f_scal))("Only one diffusion function, please!\n");
@@ -385,7 +383,7 @@ void Recovery::compute_node_sums(DOFVector<double> *uh, ElInfo *elInfo,
 				 RecoveryStructure *rec_struct, DimVec<int> preDofs,
 				 int n_vertices, int n_edges, int n_faces)
 {
-  FUNCNAME("Recovery::compute_sums()");
+  FUNCNAME_DBG("Recovery::compute_sums()");
 
   TEST_EXIT_DBG(!gradient)
     ("SPR of flux or gradient need computing interior sums\n");
@@ -421,7 +419,7 @@ void Recovery::compute_sums_linear(DOFVector<double> *uh, ElInfo *elInfo,
 				   int vertex, DimVec<int> preDofs,
 				   int n_vertices)
 {
-  FUNCNAME("Recovery::compute_sums_linear()");
+  FUNCNAME_DBG("Recovery::compute_sums_linear()");
 
   TEST_EXIT_DBG(!gradient)
     ("SPR of flux or gradient need computing interior sums\n");
@@ -473,7 +471,7 @@ void Recovery::fill_struct_vec(DOFVector<double> *uh,
 			       AbstractFunction<double, double> *f_scal,
 			       DOFVector<double> *aux_vec)
 {
-  FUNCNAME("Recovery::fill_struct_vec()");
+  FUNCNAME_DBG("Recovery::fill_struct_vec()");
 
   // Information on the mesh.
   Mesh *mesh = feSpace->getMesh();
@@ -836,7 +834,7 @@ Recovery::recovery(DOFVector<double> *uh, const FiniteElemSpace *fe_space,
 		   AbstractFunction<double, double> *f_scal,
 		   DOFVector<double> *aux_vec)
 {
-  FUNCNAME("Recovery::recovery()");
+  FUNCNAME_DBG("Recovery::recovery()");
 
   clear();
 
@@ -906,7 +904,7 @@ Recovery::recovery(DOFVector<double> *uh,
 		   AbstractFunction<double, double> *f_scal,
 		   DOFVector<double> *aux_vec)
 {
-  FUNCNAME("Recovery::simpleAveraging()");
+  FUNCNAME_DBG("Recovery::simpleAveraging()");
 
   TEST_EXIT_DBG(!(f_vec && f_scal))("Only one diffusion function, please!\n");
 
diff --git a/AMDiS/src/RefinementManager.cc b/AMDiS/src/RefinementManager.cc
index aff95794..3f18d28c 100644
--- a/AMDiS/src/RefinementManager.cc
+++ b/AMDiS/src/RefinementManager.cc
@@ -30,8 +30,6 @@ namespace AMDiS {
 
   Flag RefinementManager::globalRefine(Mesh *aMesh, int mark)
   {
-    FUNCNAME("RefinementManager::globalRefine()");
-
     if (mark <= 0) 
       return static_cast<Flag>(0);
 
@@ -50,8 +48,6 @@ namespace AMDiS {
 
   Flag RefinementManager::refineMesh(Mesh *aMesh)
   {
-    FUNCNAME("RefinementManager::refineMesh()");
-
     mesh = aMesh;
     int nElements = mesh->getNumberOfLeaves();
     newCoords = false;
@@ -92,9 +88,7 @@ namespace AMDiS {
 
 
   void RefinementManager::refineMacroElement(Mesh *aMesh, int macroElIndex)
-  {
-    FUNCNAME("RefineManager::refineMacroElement()");
-    
+  {    
     mesh = aMesh;
     int nElements = mesh->getNumberOfLeaves();
     newCoords = false;
diff --git a/AMDiS/src/RefinementManager2d.cc b/AMDiS/src/RefinementManager2d.cc
index d79501b5..4072d599 100644
--- a/AMDiS/src/RefinementManager2d.cc
+++ b/AMDiS/src/RefinementManager2d.cc
@@ -30,8 +30,6 @@ namespace AMDiS {
 
   ElInfo* RefinementManager2d::refineFunction(ElInfo* elInfo)
   {
-    FUNCNAME("RefinementManager2d::refineFunction()");
-
     if (elInfo->getElement()->getMark() <= 0)
       return elInfo;    
 
@@ -127,8 +125,6 @@ namespace AMDiS {
 
   void RefinementManager2d::newCoordsFct(ElInfo *elInfo)
   {
-    FUNCNAME("RefinementManager2d::newCoordsFct()");
-
     Element *el = elInfo->getElement();
     int dow = Global::getGeo(WORLD);
 
@@ -174,7 +170,6 @@ namespace AMDiS {
 						   RCNeighbourList &refineList,
 						   int n_neigh, bool bound)
   {
-    FUNCNAME("RefinementManager2d::refinePatch()");
     DegreeOfFreedom *dof[3] = {NULL, NULL, NULL};
     Triangle *el = 
       dynamic_cast<Triangle*>(const_cast<Element*>(refineList.getElement(0)));
@@ -244,7 +239,7 @@ namespace AMDiS {
 
   void RefinementManager2d::bisectTriangle(Triangle *el, DegreeOfFreedom* newDOFs[3])
   {
-    FUNCNAME("RefinementManager2d::bisectTriangle()");
+    FUNCNAME_DBG("RefinementManager2d::bisectTriangle()");
  
     TEST_EXIT_DBG(mesh)("No mesh!\n");
 
@@ -321,7 +316,7 @@ namespace AMDiS {
 					  int dir, RCNeighbourList &refineList, 
 					  int *n_neigh)
   {
-    FUNCNAME("RefinementManager2d::getRefinePatch()");
+    FUNCNAME_DBG("RefinementManager2d::getRefinePatch()");
 
     if ((*elInfo)->getNeighbour(2) && (*elInfo)->getOppVertex(2) != 2) {
       // Neighbour is not compatible devisible; refine neighbour first, store the
diff --git a/AMDiS/src/RefinementManager3d.cc b/AMDiS/src/RefinementManager3d.cc
index 582d7b47..1bef5603 100644
--- a/AMDiS/src/RefinementManager3d.cc
+++ b/AMDiS/src/RefinementManager3d.cc
@@ -36,8 +36,6 @@ namespace AMDiS {
 					      DegreeOfFreedom* dof[3],
 					      DegreeOfFreedom *edge[2])
   {
-    FUNCNAME("RefinementManager3d::bisectTetrahedron()");
-
     Tetrahedron *el = 
       dynamic_cast<Tetrahedron*>(const_cast<Element*>(refineList.getElement(index)));
     Tetrahedron *child[2];
@@ -157,7 +155,7 @@ namespace AMDiS {
   void RefinementManager3d::fillPatchConnectivity(RCNeighbourList &refineList,
 						  int index)
   {
-    FUNCNAME("RefinementManager3d::fillPatchConnectivity");
+    FUNCNAME_DBG("RefinementManager3d::fillPatchConnectivity");
 
     Element *el = refineList.getElement(index);
     int el_type = refineList.getType(index);
@@ -325,8 +323,6 @@ namespace AMDiS {
 						   RCNeighbourList &refineList,
 						   int n_neigh, bool bound)
   {
-    FUNCNAME("RefinementManager3d::refinePatch()");
-
     Tetrahedron *el = 
       dynamic_cast<Tetrahedron*>(const_cast<Element*>(refineList.getElement(0)));
     /* first element in the list */
@@ -404,7 +400,7 @@ namespace AMDiS {
 					   RCNeighbourList &refineList, 
 					   int *n_neigh)
   {
-    FUNCNAME("RefinementManager3d::getRefinePatch()");
+    FUNCNAME_DBG("RefinementManager3d::getRefinePatch()");
 
     int localNeighbour = 3 - direction;
     Tetrahedron *el = 
@@ -624,7 +620,7 @@ namespace AMDiS {
 
   ElInfo* RefinementManager3d::refineFunction(ElInfo* elInfo)
   {
-    FUNCNAME("RefinementManager3d::refineFunction()");
+    FUNCNAME_DBG("RefinementManager3d::refineFunction()");
 
     Element *el = elInfo->getElement();
 
@@ -823,7 +819,7 @@ namespace AMDiS {
   void FixRefinementPatch::getOtherEl(TraverseStack *stack, 
 				      vector<EdgeInEl>& refineEdges)
   {
-    FUNCNAME("FixRefinementPatch::getOtherEl()");
+    FUNCNAME_DBG("FixRefinementPatch::getOtherEl()");
 
     if (!FixRefinementPatch::connectedEdges.empty()) {
       // === Get stack of current traverse. ===
diff --git a/AMDiS/src/RobinBC.cc b/AMDiS/src/RobinBC.cc
index 99b23e94..f4178450 100644
--- a/AMDiS/src/RobinBC.cc
+++ b/AMDiS/src/RobinBC.cc
@@ -174,7 +174,7 @@ namespace AMDiS {
 				      const BoundaryType* localBound,
 				      int nBasFcts)
   {
-    FUNCNAME("RobinBC::fillBoundaryCondition()");
+    FUNCNAME_DBG("RobinBC::fillBoundaryCondition()");
     TEST_EXIT_DBG(vector->getFeSpace() == rowFeSpace)("invalid row fe space\n");
 
     int dim = elInfo->getMesh()->getDim();
diff --git a/AMDiS/src/SecondOrderTerm.cc b/AMDiS/src/SecondOrderTerm.cc
index cf5ca67e..a99bfbdb 100644
--- a/AMDiS/src/SecondOrderTerm.cc
+++ b/AMDiS/src/SecondOrderTerm.cc
@@ -382,7 +382,7 @@ namespace AMDiS {
   void CoordsAtQP_SOT::weakEval(const std::vector<WorldVector<double> > &grdUhAtQP,
 				std::vector<WorldVector<double> > &result) 
   {
-    FUNCNAME("CoordsAtQP_SOT::weakEval()");
+    FUNCNAME_DBG("CoordsAtQP_SOT::weakEval()");
     TEST_EXIT_DBG(grdUhAtQP.size() == num_rows(coordsAtQPs))
       ("Wrong sizes! grdUhAtQP = %d   coordsAtQPs = %d\n", 
        grdUhAtQP.size(), num_rows(coordsAtQPs));
@@ -469,7 +469,7 @@ namespace AMDiS {
   void MatrixGradient_SOT::weakEval(const std::vector<WorldVector<double> > &grdUhAtQP,
 				    std::vector<WorldVector<double> > &result)
   {
-    FUNCNAME("MatrixGradient_SOT::weakEval()");
+    FUNCNAME_DBG("MatrixGradient_SOT::weakEval()");
 
     TEST_EXIT_DBG(f)("No function f!\n");
     TEST_EXIT_DBG(num_rows(gradAtQPs))
@@ -824,7 +824,7 @@ namespace AMDiS {
       A(Af),
       symmetric(sym)
   {
-    FUNCNAME("MatrixVec2_SOT::MatrixVec2_SOT()");
+    FUNCNAME_DBG("MatrixVec2_SOT::MatrixVec2_SOT()");
 
     setSymmetric(symmetric);
 
diff --git a/AMDiS/src/StandardProblemIteration.cc b/AMDiS/src/StandardProblemIteration.cc
index 148d9a50..66a57805 100644
--- a/AMDiS/src/StandardProblemIteration.cc
+++ b/AMDiS/src/StandardProblemIteration.cc
@@ -32,8 +32,6 @@ namespace AMDiS {
 
   Flag StandardProblemIteration::oneIteration(AdaptInfo *adaptInfo, Flag toDo) 
   {
-    FUNCNAME("StandardProblemIteration::oneIteration()");
-
     Flag flag = buildAndAdapt(adaptInfo, toDo);
 
     if (toDo.isSet(SOLVE))
@@ -61,7 +59,9 @@ namespace AMDiS {
 
   Flag StandardProblemIteration::buildAndAdapt(AdaptInfo *adaptInfo, Flag toDo)
   {
+#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
     FUNCNAME("StandardProblemIteration::buildAndAdapt()");
+#endif
 
     Flag flag = 0, markFlag = 0;
 
@@ -121,4 +121,4 @@ namespace AMDiS {
     problem->deserialize(in);
   }
 
-};
+} // end namespace
diff --git a/AMDiS/src/SubAssembler.cc b/AMDiS/src/SubAssembler.cc
index 4a596bb0..b2e57538 100644
--- a/AMDiS/src/SubAssembler.cc
+++ b/AMDiS/src/SubAssembler.cc
@@ -93,7 +93,7 @@ namespace AMDiS {
     if (!quadFast) {
       quadFast = FastQuadrature::provideFastQuadrature(psi, *quadrature, updateFlag);
     } else {
-#pragma omp critical 
+// #pragma omp critical 
       {
 	if (!quadFast->initialized(updateFlag))
 	  quadFast->init(updateFlag);
@@ -108,8 +108,6 @@ namespace AMDiS {
 				 const ElInfo *largeElInfo,
 				 Quadrature *quad)
   {
-    FUNCNAME("SubAssembler::initElement()");
-
     // set corrdsAtQPs invalid
     coordsValid = false;
 
diff --git a/AMDiS/src/SubAssembler.hh b/AMDiS/src/SubAssembler.hh
index 0768aa7f..696e1ca0 100644
--- a/AMDiS/src/SubAssembler.hh
+++ b/AMDiS/src/SubAssembler.hh
@@ -22,7 +22,7 @@ namespace AMDiS {
 				    Quadrature *quad,
 				    mtl::dense_vector<T>& vecAtQPs)
   {
-    FUNCNAME("SubAssembler::getVectorAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getVectorAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
     TEST_EXIT_DBG(elInfo->getMesh() == vec->getFeSpace()->getMesh())
@@ -84,7 +84,7 @@ namespace AMDiS {
 				    Quadrature *quad,
 				    mtl::dense_vector<T>& vecAtQPs)
   {
-    FUNCNAME("SubAssembler::getVectorAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getVectorAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
     Quadrature *localQuad = quad ? quad : quadrature;
@@ -116,7 +116,7 @@ namespace AMDiS {
 				       Quadrature *quad,
 				       mtl::dense_vector<typename GradientType<T>::type>& grdAtQPs)
   {
-    FUNCNAME("SubAssembler::getGradientsAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getGradientsAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
     Quadrature *localQuad = quad ? quad : quadrature;
@@ -178,7 +178,7 @@ namespace AMDiS {
 				       Quadrature *quad,
 				       mtl::dense_vector<typename GradientType<T>::type>& grdAtQPs)
   {
-    FUNCNAME("SubAssembler::getGradientsAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getGradientsAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
 
@@ -215,7 +215,7 @@ namespace AMDiS {
 					int comp,
 					mtl::dense_vector<T>& grdAtQPs)
   {
-    FUNCNAME("SubAssembler::getGradientsAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getGradientsAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
 
@@ -266,7 +266,7 @@ namespace AMDiS {
 					int comp,
 					mtl::dense_vector<T>& grdAtQPs)
   {
-    FUNCNAME("SubAssembler::getGradientsAtQPs()");
+    FUNCNAME_DBG("SubAssembler::getGradientsAtQPs()");
 
     TEST_EXIT_DBG(vec)("No DOF vector!\n");
 
diff --git a/AMDiS/src/SystemVector.h b/AMDiS/src/SystemVector.h
index 5ae12899..e43e356f 100644
--- a/AMDiS/src/SystemVector.h
+++ b/AMDiS/src/SystemVector.h
@@ -358,7 +358,7 @@ namespace AMDiS {
 		 SystemVector       &result,
 		 bool               add = false)
   {
-    FUNCNAME("mv()");
+    FUNCNAME_DBG("mv()");
 
     int size = x.getNumVectors();
     int i;
@@ -384,6 +384,7 @@ namespace AMDiS {
   /// y = a*x + y;
   inline void axpy(double a, SystemVector& x, SystemVector& y)
   {
+    FUNCNAME_DBG("axpy()");
     TEST_EXIT_DBG(x.getNumVectors() == y.getNumVectors())
           ("invalid size\n");
 
@@ -397,6 +398,7 @@ namespace AMDiS {
   /// y = x + a*y
   inline void xpay(double a, SystemVector& x, SystemVector& y)
   {
+    FUNCNAME_DBG("xpay()");
     TEST_EXIT_DBG(x.getNumVectors() == y.getNumVectors())
           ("invalid size\n");
     int size = x.getNumVectors();
diff --git a/AMDiS/src/Tetrahedron.cc b/AMDiS/src/Tetrahedron.cc
index c4c8ec2b..acf2202f 100644
--- a/AMDiS/src/Tetrahedron.cc
+++ b/AMDiS/src/Tetrahedron.cc
@@ -291,7 +291,7 @@ namespace AMDiS {
 				      DofContainer& dofs,
 				      bool baseDofPtr) const
   {
-    FUNCNAME("Tetrahedron::getNodeDofsAtEdge()");
+    FUNCNAME_DBG("Tetrahedron::getNodeDofsAtEdge()");
 
 
     if (!child[0]){
diff --git a/AMDiS/src/Tetrahedron.h b/AMDiS/src/Tetrahedron.h
index a800a3bd..a7fa5792 100644
--- a/AMDiS/src/Tetrahedron.h
+++ b/AMDiS/src/Tetrahedron.h
@@ -216,7 +216,7 @@ namespace AMDiS {
     /// implements Element::getSideOfChild()
     int getSideOfChild(int child, int side, int elType = 0) const 
     {
-      FUNCNAME("Tetrahedron::getSideOfChild()");
+      FUNCNAME_DBG("Tetrahedron::getSideOfChild()");
 
       TEST_EXIT_DBG(child == 0 || child == 1)("Child must be in (0,1)!\n");
       TEST_EXIT_DBG(side >= 0 && side <= 3)("Side must be between 0 and 3!\n");
@@ -230,7 +230,7 @@ namespace AMDiS {
     /// \ref edgeOfChild for mor information.
     inline int getEdgeOfChild(int child, int edge, int elType) const
     {
-      FUNCNAME("Tetrahedron::getEdgeOfChild()");
+      FUNCNAME_DBG("Tetrahedron::getEdgeOfChild()");
 
       TEST_EXIT_DBG(child == 0 || child == 1)("Child must be in (0,1)!\n");
       TEST_EXIT_DBG(edge >= 0 && edge <= 5)("Side must be between 0 and 3!\n");
@@ -243,7 +243,7 @@ namespace AMDiS {
     int getSubObjOfChild(int childnr, GeoIndex subObj, 
 			 int ithObj, int elType) const
     {
-      FUNCNAME("Tetrahedron::getSubObjOfChild()");
+      FUNCNAME_DBG("Tetrahedron::getSubObjOfChild()");
 
       TEST_EXIT_DBG(subObj == EDGE || subObj == FACE)("Not yet implemented!\n");
 
@@ -256,7 +256,7 @@ namespace AMDiS {
     /// implements Element::getVertexOfParent()
     int getVertexOfParent(int child, int side, int elType = 0) const 
     {
-      FUNCNAME("Tetrahedron::getVertexOfParent()");
+      FUNCNAME_DBG("Tetrahedron::getVertexOfParent()");
 
       TEST_EXIT_DBG(child == 0 || child == 1)("Child must be in (0,1)!\n");
       TEST_EXIT_DBG(side >= 0 && side <= 3)("Side must be between 0 and 3!\n");
@@ -268,7 +268,7 @@ namespace AMDiS {
 
     inline int getEdgeOfFace(int face, int edge) const 
     {
-      FUNCNAME("Tetrahedron::getEdgeOfFace()");
+      FUNCNAME_DBG("Tetrahedron::getEdgeOfFace()");
 
       TEST_EXIT_DBG(face >= 0 && face < 4)("Invalid face number!\n");
       TEST_EXIT_DBG(edge >= 0 && edge < 3)("Invalid edge number!\n");
@@ -278,7 +278,7 @@ namespace AMDiS {
    
     DofEdge getEdge(int localEdgeIndex) const
     {
-      FUNCNAME("Tetrahedron::getEdge()");
+      FUNCNAME_DBG("Tetrahedron::getEdge()");
       TEST_EXIT_DBG(localEdgeIndex >= 0 && localEdgeIndex < 6)("Invalid edge!\n");
 
       DegreeOfFreedom dof0 = dof[vertexOfEdge[localEdgeIndex][0]][0];
@@ -290,7 +290,7 @@ namespace AMDiS {
 
     DofFace getFace(int localFaceIndex) const
     {
-      FUNCNAME("Tetrahedron::getFace()");
+      FUNCNAME_DBG("Tetrahedron::getFace()");
       TEST_EXIT_DBG(localFaceIndex >= 0 && localFaceIndex < 4)("Invalid face!\n");
 
       // Get the three DOFs of the face.
diff --git a/AMDiS/src/Traverse.cc b/AMDiS/src/Traverse.cc
index b60a0fd8..8bc5fead 100644
--- a/AMDiS/src/Traverse.cc
+++ b/AMDiS/src/Traverse.cc
@@ -65,7 +65,7 @@ namespace AMDiS {
   ElInfo* TraverseStack::traverseFirstOneMacro(Mesh *mesh, int macroIndex, int level, 
 					       Flag fill_flag)
   {
-    FUNCNAME("TraverseStack::traverseFirstOneMacro()");
+    FUNCNAME_DBG("TraverseStack::traverseFirstOneMacro()");
 
     TEST_EXIT_DBG(macroIndex >= 0)("Invalid macro element index!\n");
     TEST_EXIT_DBG(traverse_fill_flag.isSet(Mesh::CALL_MG_LEVEL) == false)
@@ -124,8 +124,6 @@ namespace AMDiS {
 
   void TraverseStack::enlargeTraverseStack()
   {
-    FUNCNAME("TraverseStack::enlargeTraverseStack()");
-
     int new_stack_size = stack_size + 10;
 
     elinfo_stack.resize(new_stack_size, NULL);
@@ -156,7 +154,7 @@ namespace AMDiS {
   
   ElInfo* TraverseStack::traverseLeafElement()
   {
-    FUNCNAME("TraverseStack::traverseLeafElement()");
+    FUNCNAME_DBG("TraverseStack::traverseLeafElement()");
 
     Element *el = NULL;
 
@@ -256,8 +254,6 @@ namespace AMDiS {
 
   ElInfo* TraverseStack::traverseElementLevel()
   {
-    FUNCNAME("TraverseStack::traverseElementLevel()");
-
     ElInfo *elInfo;
     do {
       elInfo = traverseEveryElementPreorder();
@@ -269,7 +265,7 @@ namespace AMDiS {
 
   ElInfo* TraverseStack::traverseMultiGridLevel()
   {
-    FUNCNAME("TraverseStack::traverseMultiGridLevel()");
+    FUNCNAME_DBG("TraverseStack::traverseMultiGridLevel()");
 
     if (stack_used == 0) {   /* first call */
       currentMacro = traverse_mesh->firstMacroElement();
@@ -343,7 +339,7 @@ namespace AMDiS {
 
   ElInfo* TraverseStack::traverseEveryElementPreorder()
   {
-    FUNCNAME("TraverseStack::traverseEveryElementPreorder()");
+    FUNCNAME_DBG("TraverseStack::traverseEveryElementPreorder()");
 
     if (stack_used == 0) {   /* first call */
       currentMacro = traverse_mesh->firstMacroElement();
@@ -431,7 +427,7 @@ namespace AMDiS {
 
   ElInfo* TraverseStack::traverseEveryElementPostorder()
   {
-    FUNCNAME("TraverseStack::traverseEveryElementPostorder()");
+    FUNCNAME_DBG("TraverseStack::traverseEveryElementPostorder()");
 
     if (stack_used == 0) {   /* first call */
       currentMacro = traverse_mesh->firstMacroElement();
@@ -788,8 +784,8 @@ namespace AMDiS {
   {
     FUNCNAME("TraverseStack::traverseNeighbour2d()");
 
-    Triangle *el2 = NULL;
-    ElInfo *elinfo2 = NULL;
+//     Triangle *el2 = NULL;
+//     ElInfo *elinfo2 = NULL;
     int stack2_used = 0;
     int sav_neighbour = neighbour;
 
@@ -884,8 +880,8 @@ namespace AMDiS {
       else
 	stack2_used = 1;
       
-      elinfo2 = save_elinfo_stack[stack2_used];
-      el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
+//       elinfo2 = save_elinfo_stack[stack2_used];
+//       el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
 
       int i = traverse_mel->getOppVertex(nb);
       traverse_mel = traverse_mel->getNeighbour(nb);
@@ -903,8 +899,8 @@ namespace AMDiS {
       if (save_stack_used > stack2_used)
 	stack2_used++;               /* go down one level in OLD hierarchy */
       
-      elinfo2 = save_elinfo_stack[stack2_used];
-      el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
+//       elinfo2 = save_elinfo_stack[stack2_used];
+//       el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
 
       if (stack_used >= stack_size - 1)
 	enlargeTraverseStack();
@@ -990,8 +986,8 @@ namespace AMDiS {
 	if (save_stack_used > stack2_used)
 	  stack2_used++;                /* go down one level in OLD hierarchy */
 	
-	elinfo2 = save_elinfo_stack[stack2_used];
-	el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
+// 	elinfo2 = save_elinfo_stack[stack2_used];
+// 	el2 = dynamic_cast<Triangle*>(const_cast<Element*>(elinfo2->getElement()));
       } else {   
 	// Now we're done...
 
@@ -1036,7 +1032,7 @@ namespace AMDiS {
 
   void TraverseStack::update()
   {
-    FUNCNAME("TraverseStack::update()");
+    FUNCNAME_DBG("TraverseStack::update()");
 
     TEST_EXIT_DBG(traverse_mesh->getDim() == 3)
       ("Update only in 3d, mesh is d = %d\n", traverse_mesh->getDim());
diff --git a/AMDiS/src/Traverse.h b/AMDiS/src/Traverse.h
index e81803c8..edb23c86 100644
--- a/AMDiS/src/Traverse.h
+++ b/AMDiS/src/Traverse.h
@@ -141,7 +141,7 @@ namespace AMDiS {
     /// Returns the elInfo object on the top of the stack.
     ElInfo* getElInfo()
     {
-      FUNCNAME("TraverseStack::getElInfo()");
+      FUNCNAME_DBG("TraverseStack::getElInfo()");
 
       if (stack_used < 0)
 	return NULL;
diff --git a/AMDiS/src/Triangle.cc b/AMDiS/src/Triangle.cc
index 89e48d12..66e6130e 100644
--- a/AMDiS/src/Triangle.cc
+++ b/AMDiS/src/Triangle.cc
@@ -302,7 +302,7 @@ namespace AMDiS {
   
   void Triangle::prepareNextBound(BoundaryObject &bound, int ithChild) const
   {
-    FUNCNAME("Triangle::prepareNextBound()");
+    FUNCNAME_DBG("Triangle::prepareNextBound()");
 
     TEST_EXIT_DBG(bound.el == this)("Wrong element!\n");
     TEST_EXIT_DBG(child[0])("Has no child!\n");
diff --git a/AMDiS/src/Triangle.h b/AMDiS/src/Triangle.h
index 768e0573..8ada40a2 100644
--- a/AMDiS/src/Triangle.h
+++ b/AMDiS/src/Triangle.h
@@ -124,7 +124,7 @@ namespace AMDiS {
     /// implements Element::getSideOfChild()
     virtual int getSideOfChild(int child, int side, int) const 
     {
-      FUNCNAME("Triangle::getSideOfChild()");
+      FUNCNAME_DBG("Triangle::getSideOfChild()");
 
       TEST_EXIT_DBG(child == 0 || child == 1)("child must be in (0,1)\n");
       TEST_EXIT_DBG(side >= 0 && side <= 2)("side must be between 0 and 2\n");
@@ -134,7 +134,7 @@ namespace AMDiS {
 
     int getSubObjOfChild(int childnr, GeoIndex subObj, int ithObj, int elType) const
     {
-      FUNCNAME("Triangle::getSubObjOfChild()");
+      FUNCNAME_DBG("Triangle::getSubObjOfChild()");
 
       TEST_EXIT_DBG(subObj == EDGE)("Not yet implemented!\n");
 
@@ -144,7 +144,7 @@ namespace AMDiS {
     /// implements Element::getVertexOfParent()
     virtual int getVertexOfParent(int child, int side, int = 0) const 
     {
-      FUNCNAME("Triangle::getVertexOfParent()");
+      FUNCNAME_DBG("Triangle::getVertexOfParent()");
 
       TEST_EXIT_DBG(child == 0 || child == 1)("child must be in (0,1)\n");
       TEST_EXIT_DBG(side >= 0 && side <= 2)("side must be between 0 and 2\n");
@@ -154,7 +154,7 @@ namespace AMDiS {
 
     virtual int getPositionOfVertex(int side, int vertex) const 
     {
-      FUNCNAME("Triangle::getPositionOfVertex()");
+      FUNCNAME_DBG("Triangle::getPositionOfVertex()");
       TEST_EXIT_DBG(side >= 0 && side <= 2)("Wrong side number %d!\n", side);
       TEST_EXIT_DBG(vertex >= 0 && vertex <= 2)("Wrong vertex number %d!\n", vertex);
 
@@ -164,7 +164,7 @@ namespace AMDiS {
 
     inline int getEdgeOfFace(int face, int edge) const 
     {
-      FUNCNAME("Triangle::getEdgeOfFace()");
+      FUNCNAME_DBG("Triangle::getEdgeOfFace()");
       TEST_EXIT_DBG(face == 0)("face must be zero at triangle\n");
       TEST_EXIT_DBG(edge >= 0 && edge < 3)("invalid edge\n");
 
@@ -173,7 +173,7 @@ namespace AMDiS {
 
     DofEdge getEdge(int localEdgeIndex) const
     {
-      FUNCNAME("Triangle::getEdge()");
+      FUNCNAME_DBG("Triangle::getEdge()");
       TEST_EXIT_DBG(localEdgeIndex >= 0 && localEdgeIndex < 3)("invalid edge\n");
 
       DegreeOfFreedom dof0 = dof[vertexOfEdge[localEdgeIndex][0]][0];
diff --git a/AMDiS/src/UmfPackSolver.h b/AMDiS/src/UmfPackSolver.h
index 3a6643a6..df4ce232 100644
--- a/AMDiS/src/UmfPackSolver.h
+++ b/AMDiS/src/UmfPackSolver.h
@@ -53,7 +53,7 @@ namespace AMDiS {
       symmetric_strategy(0),
       alloc_init(0.7)
     {
-      FUNCNAME("Umfpack_runner::Umfpack_runner()");
+      FUNCNAME_DBG("Umfpack_runner::Umfpack_runner()");
 
       TEST_EXIT_DBG(oem_ != NULL)("Need real OEMSolver\n"); 
       Parameters::get(oem.getName() + "->store symbolic", store_symbolic);
@@ -63,8 +63,6 @@ namespace AMDiS {
 
     void init(const Matrix& A)
     {
-      FUNCNAME("Umfpack_runner::init()")
-
       if (solver != NULL) {
 	delete solver;
 	solver = NULL;
@@ -105,7 +103,7 @@ namespace AMDiS {
     {
       if (solver != NULL) {	
 	delete solver;
-	solver == NULL;
+	solver = NULL;
       }
     }
 
diff --git a/AMDiS/src/VertexVector.cc b/AMDiS/src/VertexVector.cc
index 886baabd..fef1ee2f 100644
--- a/AMDiS/src/VertexVector.cc
+++ b/AMDiS/src/VertexVector.cc
@@ -55,8 +55,6 @@ namespace AMDiS {
 
   void VertexVector::changeDofIndices(std::map<int, int>& dofIndexMap)
   {
-    FUNCNAME("VertexVector::changedofIndices()");
-
     std::vector<DegreeOfFreedom> tmp(vec.size());
     for (int i = 0; i < static_cast<int>(tmp.size()); i++)
       tmp[i] = i;
diff --git a/AMDiS/src/VertexVector.h b/AMDiS/src/VertexVector.h
index 725d3d12..6dd9e472 100644
--- a/AMDiS/src/VertexVector.h
+++ b/AMDiS/src/VertexVector.h
@@ -45,7 +45,7 @@ namespace AMDiS {
 
     void freeDofIndex(DegreeOfFreedom dof)
     {
-      FUNCNAME("VertexVector::freeDofIndex()");
+      FUNCNAME_DBG("VertexVector::freeDofIndex()");
       
       TEST_EXIT_DBG(dof < static_cast<int>(vec.size()))("Should not happen!\n");
 
diff --git a/AMDiS/src/ZeroOrderAssembler.cc b/AMDiS/src/ZeroOrderAssembler.cc
index 853724ed..1b39ac32 100644
--- a/AMDiS/src/ZeroOrderAssembler.cc
+++ b/AMDiS/src/ZeroOrderAssembler.cc
@@ -270,8 +270,6 @@ namespace AMDiS {
   void PrecalcZOA::calculateElementMatrix(const ElInfo *elInfo, 
 					  ElementMatrix& mat)
   {
-    FUNCNAME("PrecalcZOA::calculateElementMatrix()");
-
     if (firstCall) {
       q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(), 
 					colFeSpace->getBasisFcts(), 
@@ -308,8 +306,6 @@ namespace AMDiS {
   void PrecalcZOA::calculateElementVector(const ElInfo *elInfo, 
 					  ElementVector& vec)
   {
-    FUNCNAME("PrecalcZOA::calculateElementVector()");
-
     if (firstCall) {
       q00 = Q00PsiPhi::provideQ00PsiPhi(rowFeSpace->getBasisFcts(), 
 					colFeSpace->getBasisFcts(), 
diff --git a/AMDiS/src/compositeFEM/CFE_Integration.cc b/AMDiS/src/compositeFEM/CFE_Integration.cc
index f9fc9a15..bbc535d1 100644
--- a/AMDiS/src/compositeFEM/CFE_Integration.cc
+++ b/AMDiS/src/compositeFEM/CFE_Integration.cc
@@ -26,8 +26,6 @@ namespace AMDiS {
 				     int deg, 
 				     Quadrature *q)
   {
-    FUNCNAME("CFE_Integration::integrate_onNegLs()");
-
     int dim = elLS->getDim();
     double int_val = 0.0;
     double el_int_val;
@@ -192,8 +190,6 @@ namespace AMDiS {
 				      int deg, 
 				      Quadrature *q)
   {
-    FUNCNAME("CFE_Integration::integrate_onZeroLs()");
-
     int dim = elLS->getDim();
     double int_val = 0.0;
     VectorOfFixVecs<DimVec<double> > *intersecPts;
diff --git a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc
index 15421930..625f6a3c 100644
--- a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc
+++ b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc
@@ -206,8 +206,6 @@ namespace AMDiS {
 					int deg, 
 					Quadrature *q)
   {
-    FUNCNAME("CFE_NormAndErrorFcts::Norm_IntNoBound()");
-
     int dim = elLS->getDim();
     Mesh *mesh = elLS->getMesh();
     double nrm = 0.0;
@@ -255,8 +253,6 @@ namespace AMDiS {
 				      int deg, 
 				      Quadrature *q)
   {
-    FUNCNAME("CFE_NormAndErrorFcts::Norm_IntBound()");
-
     int dim = elLS->getDim();
     Mesh *mesh = elLS->getMesh();
     double nrm = 0.0;
@@ -265,7 +261,7 @@ namespace AMDiS {
     int numIntersecPts;
     SubPolytope *subPolytope;
     ScalableQuadrature *scalQuad;
-    int nScalQPts;
+//     int nScalQPts;
     int elStatus;
 
     // ===== Get quadratures. =====
@@ -273,7 +269,7 @@ namespace AMDiS {
       q = Quadrature::provideQuadrature(dim, deg);
     }
     scalQuad = new ScalableQuadrature(q);
-    nScalQPts = scalQuad->getNumPoints();
+//     nScalQPts = scalQuad->getNumPoints();
 
 
     // ===== Traverse mesh and calculate integral on each element. =====
@@ -370,8 +366,6 @@ namespace AMDiS {
 				 int deg, 
 				 Quadrature *q)
   {
-    FUNCNAME("CFE_NormAndErrorFcts::Norm_Int()");
-
     int dim = elLS->getDim();
     Mesh *mesh = elLS->getMesh();
     double nrm = 0.0;
@@ -381,7 +375,7 @@ namespace AMDiS {
     int vertex_interior;
     SubPolytope *subPolytope;
     ScalableQuadrature *scalQuad;
-    int nScalQPts;
+//     int nScalQPts;
     int elStatus;
 
     // ===== Get quadratures. =====
@@ -389,7 +383,7 @@ namespace AMDiS {
       q = Quadrature::provideQuadrature(dim, deg);
     }
     scalQuad = new ScalableQuadrature(q);
-    nScalQPts = scalQuad->getNumPoints();
+//     nScalQPts = scalQuad->getNumPoints();
 
 
     // ===== Traverse mesh and calculate integral on each element. =====
@@ -517,8 +511,6 @@ namespace AMDiS {
 				   int deg, 
 				   Quadrature *q)
   {
-    FUNCNAME("CFE_NormAndErrorFcts::Norm_Bound()");
-
     int dim = elLS->getDim();
     Mesh *mesh = elLS->getMesh();
     double nrm = 0.0;
@@ -527,7 +519,7 @@ namespace AMDiS {
     int numIntersecPts;
     SubPolytope *subPolytope;
     ScalableQuadrature *scalQuad;
-    int nScalQPts;
+//     int nScalQPts;
     int elStatus;
 
     // ===== Get quadratures. =====
@@ -535,7 +527,7 @@ namespace AMDiS {
       q = Quadrature::provideQuadrature(dim, deg);
     }
     scalQuad = new ScalableQuadrature(q);
-    nScalQPts = scalQuad->getNumPoints();
+//     nScalQPts = scalQuad->getNumPoints();
 
 
     // ===== Traverse mesh and calculate integral on each element. =====
@@ -621,8 +613,6 @@ namespace AMDiS {
 				      int deg, 
 				      Quadrature *q)
   {
-    FUNCNAME("CFE_NormAndErrorFcts::Norm_Complete()");
-
     int dim = elLS->getDim();
     Mesh *mesh = elLS->getMesh();
     double nrm = 0.0;
@@ -631,7 +621,7 @@ namespace AMDiS {
     int numIntersecPts;
     SubPolytope *subPolytope;
     ScalableQuadrature *scalQuad;
-    int nScalQPts;
+//     int nScalQPts;
     int elStatus;
 
     // ===== Get quadratures. =====
@@ -639,7 +629,7 @@ namespace AMDiS {
       q = Quadrature::provideQuadrature(dim, deg);
     }
     scalQuad = new ScalableQuadrature(q);
-    nScalQPts = scalQuad->getNumPoints();
+//     nScalQPts = scalQuad->getNumPoints();
 
 
     // ===== Traverse mesh and calculate integral on each element. =====
diff --git a/AMDiS/src/compositeFEM/CompositeFEMMethods.cc b/AMDiS/src/compositeFEM/CompositeFEMMethods.cc
index 5ea0c82a..42b12d39 100644
--- a/AMDiS/src/compositeFEM/CompositeFEMMethods.cc
+++ b/AMDiS/src/compositeFEM/CompositeFEMMethods.cc
@@ -80,8 +80,6 @@ void CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
 						ElementLevelSet *elLS,
 						FiniteElemSpace *feSpace)
 {
-  FUNCNAME("CompositeFEMMethods::printBoundaryElements()");
-
   int dim = feSpace->getMesh()->getDim();
   std::string fn_main;
   std::string fn;
diff --git a/AMDiS/src/compositeFEM/ElementLevelSet.cc b/AMDiS/src/compositeFEM/ElementLevelSet.cc
index 580b7c8f..5979a45f 100644
--- a/AMDiS/src/compositeFEM/ElementLevelSet.cc
+++ b/AMDiS/src/compositeFEM/ElementLevelSet.cc
@@ -187,8 +187,6 @@ ElementLevelSet::checkIntersecBary(double &bary)
 void
 ElementLevelSet::sortIntersecPoints_4IP3D()
 {
-  FUNCNAME("sortIntersecPoints_4IP3D");
-
   int indexFace1 = 0; 
   int indexFace2 = 0; 
   int indexOpVert = 0;
@@ -249,7 +247,7 @@ ElementLevelSet::calcIntersecNormal(WorldVector<double> &normalVec)
     break;
   default: ERROR_EXIT("illegal dimension !\n");
   }
-};
+}
 
 void 
 ElementLevelSet::calcIntersecNormal_2d(WorldVector<double> &normalVec)
@@ -325,7 +323,7 @@ ElementLevelSet::calcIntersecNormal_2d(WorldVector<double> &normalVec)
       normalVec[i] *= -1;
     }
   }
-};
+}
 
 void 
 ElementLevelSet::calcIntersecNormal_3d(WorldVector<double> &normalVec)
@@ -399,7 +397,8 @@ ElementLevelSet::calcIntersecNormal_3d(WorldVector<double> &normalVec)
       normalVec[i] *= -1;
     }
   }
-};
+}
+
 
 int 
 ElementLevelSet::getVertexPos(const DimVec<double> barCoords)
diff --git a/AMDiS/src/compositeFEM/ElementLevelSet.h b/AMDiS/src/compositeFEM/ElementLevelSet.h
index acf4dc05..ef958d81 100644
--- a/AMDiS/src/compositeFEM/ElementLevelSet.h
+++ b/AMDiS/src/compositeFEM/ElementLevelSet.h
@@ -175,8 +175,6 @@ public:
   /// Resets level set information on element.
   inline void resetElement() 
   {
-    FUNCNAME("ElementLevelSet::resetElement");
-
     numElVertexInterior = 0;
     numElVertexBoundary = 0;
     numElVertexExterior = 0;
diff --git a/AMDiS/src/compositeFEM/PenaltyOperator.cc b/AMDiS/src/compositeFEM/PenaltyOperator.cc
index ceb6413d..e3ead563 100644
--- a/AMDiS/src/compositeFEM/PenaltyOperator.cc
+++ b/AMDiS/src/compositeFEM/PenaltyOperator.cc
@@ -31,8 +31,6 @@ PenaltyOperator::getElementMatrix(const ElInfo *elInfo,
 				  ElementMatrix& userMat, 
 				  double factor)
 {
-  FUNCNAME("PenaltyOperator::getElementMatrix");
-
   VectorOfFixVecs<DimVec<double> > *intersecPoints = NULL;
   double penaltyCoeff = getPenaltyCoeff(elInfo);
 
@@ -149,8 +147,6 @@ PenaltyOperator::getElementVector(const ElInfo *elInfo,
 				  ElementVector& userVec, 
 				  double factor)
 {
-  FUNCNAME("PenaltyOperator::getElementVector");
-
   VectorOfFixVecs<DimVec<double> > *intersecPoints = NULL;
   double penaltyCoeff = getPenaltyCoeff(elInfo);
 
diff --git a/AMDiS/src/est/Estimator.cc b/AMDiS/src/est/Estimator.cc
index 6bb33f49..7f847912 100644
--- a/AMDiS/src/est/Estimator.cc
+++ b/AMDiS/src/est/Estimator.cc
@@ -25,16 +25,12 @@ namespace AMDiS {
       auxMesh(NULL),
       traverseInfo(0)
   {
-    FUNCNAME("Estimator::Estimator()");
-
-	Parameters::get(name + "->error norm", norm);
+    Parameters::get(name + "->error norm", norm);
   }
 
 
   double Estimator::estimate(double ts)
   {
-    FUNCNAME("Estimator::estimate()");
-
     bool dualTraverse = false;
 
     /*
@@ -85,8 +81,6 @@ namespace AMDiS {
 
   void Estimator::singleMeshTraverse()
   {
-    FUNCNAME("Estimator::singleMeshTraverse()");
-
     TraverseStack stack;
     ElInfo *elInfo = stack.traverseFirst(mesh, -1, traverseFlag);
     while (elInfo) {
@@ -98,8 +92,6 @@ namespace AMDiS {
 
   void Estimator::dualMeshTraverse()
   {
-    FUNCNAME("Estimator::dualMeshTraverse()");
-
     DualTraverse dualTraverse;
     DualElInfo dualElInfo;
 
diff --git a/AMDiS/src/est/RecoveryEstimator.cc b/AMDiS/src/est/RecoveryEstimator.cc
index f24e3c2f..540f2b74 100644
--- a/AMDiS/src/est/RecoveryEstimator.cc
+++ b/AMDiS/src/est/RecoveryEstimator.cc
@@ -70,8 +70,6 @@ namespace AMDiS {
 
   void RecoveryEstimator::init(double ts)
   {
-    FUNCNAME("RecoveryEstimator::init()");
-
     basFcts = uh->getFeSpace()->getBasisFcts();
     int dim = mesh->getDim();
     h1Norm2 = 0.0;
@@ -145,8 +143,6 @@ namespace AMDiS {
 
   void RecoveryEstimator::estimateElement(ElInfo *elInfo, DualElInfo *dualElInfo)
   {    
-    FUNCNAME("RecoveryEstimator::estimateElement()");
-
       Element *el = elInfo->getElement();
       double det = elInfo->getDet();
       double errEl = 0.0;
diff --git a/AMDiS/src/est/ResidualEstimator.cc b/AMDiS/src/est/ResidualEstimator.cc
index e105c863..6362e324 100644
--- a/AMDiS/src/est/ResidualEstimator.cc
+++ b/AMDiS/src/est/ResidualEstimator.cc
@@ -54,7 +54,7 @@ namespace AMDiS {
 
   void ResidualEstimator::init(double ts)
   {
-    FUNCNAME("ResidualEstimator::init()");
+    FUNCNAME_DBG("ResidualEstimator::init()");
 
     timestep = ts;
     nSystems = static_cast<int>(uh.size());
@@ -313,7 +313,7 @@ namespace AMDiS {
 
   void ResidualEstimator::estimateElement(ElInfo *elInfo, DualElInfo *dualElInfo)
   {    
-    FUNCNAME("ResidualEstimator::estimateElement()");
+    FUNCNAME_DBG("ResidualEstimator::estimateElement()");
 
     TEST_EXIT_DBG(nSystems > 0)("no system set\n");
 
@@ -472,7 +472,7 @@ namespace AMDiS {
   double ResidualEstimator::computeJumpResidual(ElInfo *elInfo, 
 						DualElInfo *dualElInfo)
   {
-    FUNCNAME("ResidualEstimator::computeJumpResidual()");
+    FUNCNAME_DBG("ResidualEstimator::computeJumpResidual()");
 
     double result = 0.0;
     Element *el = elInfo->getElement();
diff --git a/AMDiS/src/est/SimpleResidualEstimator.cc b/AMDiS/src/est/SimpleResidualEstimator.cc
index 0635e87b..749fba1e 100644
--- a/AMDiS/src/est/SimpleResidualEstimator.cc
+++ b/AMDiS/src/est/SimpleResidualEstimator.cc
@@ -25,8 +25,6 @@ namespace AMDiS {
       C0(0.0), 
       C1(0.0)
   {
-    FUNCNAME("SimpleResidualEstimator::SimpleResidualEstimator()");
-
     // === Read parameters C0 and C1 from init file. ===
 
     Parameters::get(name + "->C0", C0);
@@ -39,8 +37,6 @@ namespace AMDiS {
 
   void SimpleResidualEstimator::init(double)
   {
-    FUNCNAME("SimpleResidualEstimator::init()");
-
     double kappa = 0.0;
     Parameters::get("kappa", kappa);
     kappa_inv = 1.0 / kappa;
@@ -176,8 +172,6 @@ namespace AMDiS {
 
   double SimpleResidualEstimator::computeElementResidual(ElInfo *elInfo)
   {
-    FUNCNAME("SimpleResidualEstimator::computeElementResidual()");
-
     double det = elInfo->getDet();
     double h2 = h2_from_det(det, dim);
     riq = 0.0;
@@ -226,8 +220,6 @@ namespace AMDiS {
 
   double SimpleResidualEstimator::computeJumpResidual(ElInfo *elInfo)
   {
-    FUNCNAME("SimpleResidualEstimator::computeJumpResidual()");
-
     // === Init temporary variables. ===
     double result = 0.0;
     Element *el = elInfo->getElement();
@@ -358,8 +350,6 @@ namespace AMDiS {
 				  Quadrature *quad,
 				  mtl::dense_vector<double>& result)
   {
-    FUNCNAME("SimpleResidualEstimator::r()");
-
     std::vector<Operator*>::iterator it;
     std::vector<double*>::iterator fac;
 
diff --git a/AMDiS/src/io/ArhReader.cc b/AMDiS/src/io/ArhReader.cc
index c9c082b9..71cd84b7 100644
--- a/AMDiS/src/io/ArhReader.cc
+++ b/AMDiS/src/io/ArhReader.cc
@@ -289,8 +289,6 @@ namespace AMDiS {
   void ArhReader::setDofValues(int macroElIndex, Mesh *mesh,
 			       vector<double>& values, DOFVector<double>* vec)
   {
-    FUNCNAME("ArhReader::setDofValues()");
-
     bool macroElement = false;
     int valuePos = 0;
     TraverseStack stack;
diff --git a/AMDiS/src/io/ArhWriter.cc b/AMDiS/src/io/ArhWriter.cc
index 45c9fb28..c6d0517e 100644
--- a/AMDiS/src/io/ArhWriter.cc
+++ b/AMDiS/src/io/ArhWriter.cc
@@ -129,8 +129,6 @@ namespace AMDiS {
 				    vector<vector<double> >& values,
 				    uint32_t elIndex)
   {
-    FUNCNAME("ArhWriter::writeMacroElement()");
-
     file.write(reinterpret_cast<char*>(&elIndex), 4); 
     
     uint32_t nStructureCodes = code.getCode().size();
diff --git a/AMDiS/src/io/DataCollector.hh b/AMDiS/src/io/DataCollector.hh
index 5dab3539..f8613aa5 100644
--- a/AMDiS/src/io/DataCollector.hh
+++ b/AMDiS/src/io/DataCollector.hh
@@ -90,8 +90,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::startCollectingElementData()
   {
-    FUNCNAME("DataCollector<T>::startCollectingElementData()");
-
     Flag flag = traverseFlag;
     flag |= 
       Mesh::FILL_NEIGH      | 
@@ -128,8 +126,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::startCollectingValueData()
   {
-    FUNCNAME("DataCollector<T>::startCollectingValueData()");
-
     DOFVector<int>::Iterator intPointIt(interpPointInd, USED_DOFS);
     for (intPointIt.reset(); !intPointIt.end(); ++intPointIt)
       (*intPointIt) = -1;
@@ -176,8 +172,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::startCollectingPeriodicData()
   {    
-    FUNCNAME("DataCollector<T>::startCollectingPeriodicData()");
-
     periodicConnections.clear();
     
     TraverseStack stack;
@@ -222,8 +216,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::addElementData(ElInfo* elInfo)
   {
-    FUNCNAME("DataCollector<T>::addElementData()");
-
     const DegreeOfFreedom **dof = elInfo->getElement()->getDof();
 
     // create ElementInfo
@@ -294,8 +286,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::addValueData(ElInfo *elInfo)
   {
-    FUNCNAME("DataCollector<T>::addValueData()");
-    
     vector<DegreeOfFreedom> localDOFs(basisFcts->getNumber());
     basisFcts->getLocalIndices(elInfo->getElement(), localAdmin, localDOFs);
 
@@ -354,8 +344,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::addInterpData(ElInfo *elInfo)
   {
-    FUNCNAME("DataCollector<T>::addInterpData()");
-    
     vector<DegreeOfFreedom> localDOFs(basisFcts->getNumber());
     basisFcts->getLocalIndices(elInfo->getElement(), localAdmin, localDOFs);
 
@@ -370,8 +358,6 @@ namespace AMDiS {
   template<typename T>
   void DataCollector<T>::addPeriodicData(ElInfo *elInfo)
   {
-    FUNCNAME("DataCollector<T>::addPeriodicData");
-
     LeafDataPeriodic *ldp = dynamic_cast<LeafDataPeriodic*>
       (elInfo->getElement()->
        getElementData()->
diff --git a/AMDiS/src/io/DofWriter.cc b/AMDiS/src/io/DofWriter.cc
index 02b65937..5d32dce5 100644
--- a/AMDiS/src/io/DofWriter.cc
+++ b/AMDiS/src/io/DofWriter.cc
@@ -20,8 +20,6 @@ namespace AMDiS {
 
   void DofWriter::writeFile(string filename, vector<DOFVector<double>*> &vec)
   {
-    FUNCNAME("DofWriter::writeFile()");
-
     DOFVector<WorldVector<double> > coordDof(feSpace, "tmp");
     
     Mesh *mesh = feSpace->getMesh();
diff --git a/AMDiS/src/io/FileWriter.hh b/AMDiS/src/io/FileWriter.hh
index 7b047769..b439bee8 100644
--- a/AMDiS/src/io/FileWriter.hh
+++ b/AMDiS/src/io/FileWriter.hh
@@ -46,8 +46,6 @@ namespace AMDiS {
     : name(str),
       mesh(m)
   {
-    FUNCNAME("FileWriterTemplated<T>::FileWriter()");
-
     initialize();
 
     feSpace = vec->getFeSpace();
@@ -133,8 +131,6 @@ namespace AMDiS {
   template<typename T>
   void FileWriterTemplated<T>::readParameters()
   {
-    FUNCNAME("FileWriterTemplated<T>::readParamters()");
-
     Parameters::get(name + "->filename", filename);
     Parameters::get(name + "->AMDiS format", writeAMDiSFormat);
     Parameters::get(name + "->AMDiS mesh ext", amdisMeshExt);
diff --git a/AMDiS/src/io/MacroInfo.cc b/AMDiS/src/io/MacroInfo.cc
index e110f38a..ac1fbb4d 100644
--- a/AMDiS/src/io/MacroInfo.cc
+++ b/AMDiS/src/io/MacroInfo.cc
@@ -227,7 +227,7 @@ namespace AMDiS {
     file = fopen(filename.c_str(), "r");
     TEST_EXIT(file)("cannot open file %s\n", filename.c_str());
 
-    int result, n_;
+    int result;
 
     for (int i_key = 0; i_key < n_keys; i_key++) {
 
@@ -283,7 +283,7 @@ namespace AMDiS {
 
       case 4:
 	// block "vertex coordinates"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 	for (int i = 0; i < nVertices; i++) {
 	  for (j = 0; j <Global::getGeo(WORLD) ; j++) {
 	    result = fscanf(file, "%lf", &dbl);
@@ -297,7 +297,7 @@ namespace AMDiS {
 
       case 5:
 	// block "element vertices"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 
 	// === Global number of vertices on a single element. ===
 
@@ -315,7 +315,7 @@ namespace AMDiS {
 
       case 6:
 	// block "element boundaries"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 
 
 	// === MEL boundary pointers. ===
@@ -341,7 +341,7 @@ namespace AMDiS {
 
       case 7:
 	// block "element neighbours"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 
 	// ===  Fill MEL neighbour pointers:                               ===
 	// ===    if they are specified in the file: read them from file,  ===
@@ -368,7 +368,7 @@ namespace AMDiS {
 
       case 8:
 	// block "element type"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 
 	// === MEL elType ===
 
@@ -389,7 +389,7 @@ namespace AMDiS {
       case 9:
 	// block "projections"
 	{
-	  n_ = fscanf(file, "%*s");
+	  result = fscanf(file, "%*s");
 
 	  int nFaces = mesh->getGeo(FACE);
 	  int nEdgesAtBoundary = 0;
@@ -427,7 +427,7 @@ namespace AMDiS {
 
       case 10:
 	// block "element region"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 
 	// === MEL regions. ===
 
@@ -448,7 +448,7 @@ namespace AMDiS {
 
       case 11:
 	// block "surface region"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 	for (int i = 0; i < nElements; i++) {
 	  result = read_indices(file, *ind);
 	  TEST_EXIT(result)
@@ -471,12 +471,12 @@ namespace AMDiS {
 
       case 12:
 	// line "mesh name"
-	n_ = fscanf(file, "%*s %*s %*s");
+	result = fscanf(file, "%*s %*s %*s");
 	break;
 
       case 13:
 	// line "time"
-	n_ = fscanf(file, "%*s %*s");
+	result = fscanf(file, "%*s %*s");
 	break;
       }
     }
diff --git a/AMDiS/src/io/MacroReader.cc b/AMDiS/src/io/MacroReader.cc
index 0f079bf2..e15066d6 100644
--- a/AMDiS/src/io/MacroReader.cc
+++ b/AMDiS/src/io/MacroReader.cc
@@ -575,8 +575,6 @@ namespace AMDiS {
 
   int MacroReader::macrotest(Mesh *mesh)
   {
-    FUNCNAME("MacroReader::macrotest()");
-
     std::deque<MacroElement*>::const_iterator macro, mac;
     int flg = 0;
     int dim = mesh->getDim();
@@ -657,8 +655,6 @@ namespace AMDiS {
   void MacroReader::umb(int *ele, Mesh *mesh,
 			void (*umbvk)(Mesh*, MacroElement*, int, int*))
   {
-    FUNCNAME("MacroReader::umb");
-
     int *test = new int[mesh->getNumberOfMacros()];
   
     for (int i = 0; i < static_cast<int>(mesh->getNumberOfMacros()); i++)
diff --git a/AMDiS/src/io/PovrayWriter.h b/AMDiS/src/io/PovrayWriter.h
index c66b79cf..cc9a3760 100644
--- a/AMDiS/src/io/PovrayWriter.h
+++ b/AMDiS/src/io/PovrayWriter.h
@@ -50,7 +50,7 @@ namespace AMDiS {
   public:
     PovrayWriter(FileWriter *fw, DataCollector<> *dc) : fileWriter(fw), dataCollector(dc)
     {
-      FUNCNAME("PovrayWriter::PovrayWriter()");	
+//       FUNCNAME("PovrayWriter::PovrayWriter()");	
 
       // abort if problem not 3D //FIX THAT!!!
       /*	TEST_EXIT(dataCollector->getMesh()->getDim()==3)
diff --git a/AMDiS/src/io/Spreadsheet.cc b/AMDiS/src/io/Spreadsheet.cc
index 96ef2bb3..5cb39df1 100644
--- a/AMDiS/src/io/Spreadsheet.cc
+++ b/AMDiS/src/io/Spreadsheet.cc
@@ -54,8 +54,6 @@ namespace AMDiS {
 
   void Spreadsheet::read(string filename)
   {
-    FUNCNAME("Spreadsheet::read()");
-
     data.clear();
 
     string line;
diff --git a/AMDiS/src/io/VtkVectorWriter.h b/AMDiS/src/io/VtkVectorWriter.h
index 128e0fc5..fc1251b4 100644
--- a/AMDiS/src/io/VtkVectorWriter.h
+++ b/AMDiS/src/io/VtkVectorWriter.h
@@ -139,7 +139,6 @@ namespace AMDiS {
     }
     
     std::ostream& print(const std::vector<double> &l, std::ostream &o) {
-      std::vector<double>::const_iterator it = l.begin();
       for (size_t i = 0; i < l.size(); i++) {
 	o << (fabs(l[i]) < 1e-40 ? 0.0 : l[i]) << " ";
       }
@@ -160,7 +159,7 @@ namespace AMDiS {
     template<typename T>
     size_t num_rows(T &v) {
       return 1;
-    };
+    }
     // for WorldVectors print 3 components
     template<typename T>
     size_t num_rows(WorldVector<T> &v) {
@@ -171,22 +170,22 @@ namespace AMDiS {
     size_t num_rows(std::vector<T> &v) {
       size_t v_size = v.size();
       return (writeAs3dVector ? std::max(three,v_size) : v_size);
-    };
+    }
     template<typename T>
     size_t num_rows(const std::vector<T> &v) {
       size_t v_size = v.size();
       return (writeAs3dVector ? std::max(three,v_size) : v_size);
-    };
+    }
     template<typename T>
     size_t num_rows(mtl::dense_vector<T> &v) {
       size_t v_size = mtl::num_rows(v);
       return (writeAs3dVector ? std::max(three,v_size) : v_size);
-    };
+    }
     template<typename T>
     size_t num_rows(const mtl::dense_vector<T> &v) {
       size_t v_size = mtl::num_rows(v);
       return (writeAs3dVector ? std::max(three,v_size) : v_size);
-    };
+    }
 
   private:
     /// List of DataCollectors, for each component of the problem one.
diff --git a/AMDiS/src/io/VtkWriter.cc b/AMDiS/src/io/VtkWriter.cc
index 82c4a6be..08ea4627 100644
--- a/AMDiS/src/io/VtkWriter.cc
+++ b/AMDiS/src/io/VtkWriter.cc
@@ -159,8 +159,6 @@ namespace AMDiS {
 			    string filename,
 			    bool writeParallel)
   {
-    FUNCNAME("VtkWriter::writeFile()");
-
     DataCollector<> dc(values->getFeSpace(), values);
     vector<DataCollector<>*> dcList(0);
     dcList.push_back(&dc);
diff --git a/AMDiS/src/reinit/ElementLevelSet.cc b/AMDiS/src/reinit/ElementLevelSet.cc
index 64ae1956..967379ac 100644
--- a/AMDiS/src/reinit/ElementLevelSet.cc
+++ b/AMDiS/src/reinit/ElementLevelSet.cc
@@ -187,8 +187,6 @@ ElementLevelSet::checkIntersecBary(double &bary)
 void
 ElementLevelSet::sortIntersecPoints_4IP3D()
 {
-  FUNCNAME("sortIntersecPoints_4IP3D");
-
   int indexFace1 = 0; 
   int indexFace2 = 0; 
   int indexOpVert = 0;
@@ -249,7 +247,7 @@ ElementLevelSet::calcIntersecNormal(WorldVector<double> &normalVec)
     break;
   default: ERROR_EXIT("illegal dimension !\n");
   }
-};
+}
 
 void 
 ElementLevelSet::calcIntersecNormal_2d(WorldVector<double> &normalVec)
@@ -325,7 +323,8 @@ ElementLevelSet::calcIntersecNormal_2d(WorldVector<double> &normalVec)
       normalVec[i] *= -1;
     }
   }
-};
+}
+
 
 void 
 ElementLevelSet::calcIntersecNormal_3d(WorldVector<double> &normalVec)
@@ -399,7 +398,8 @@ ElementLevelSet::calcIntersecNormal_3d(WorldVector<double> &normalVec)
       normalVec[i] *= -1;
     }
   }
-};
+}
+
 
 int 
 ElementLevelSet::getVertexPos(const DimVec<double> barCoords)
diff --git a/AMDiS/src/reinit/ElementLevelSet.h b/AMDiS/src/reinit/ElementLevelSet.h
index 772767a9..6f5aff63 100644
--- a/AMDiS/src/reinit/ElementLevelSet.h
+++ b/AMDiS/src/reinit/ElementLevelSet.h
@@ -167,8 +167,6 @@ class ElementLevelSet
   /// Resets level set information on element.
   inline void resetElement() 
   {
-    FUNCNAME("ElementLevelSet::resetElement");
-
     numElVertexInterior = 0;
     numElVertexBoundary = 0;
     numElVertexExterior = 0;
diff --git a/AMDiS/src/reinit/HL_SignedDistTraverse.cc b/AMDiS/src/reinit/HL_SignedDistTraverse.cc
index 83ba2fb3..ce9d7130 100644
--- a/AMDiS/src/reinit/HL_SignedDistTraverse.cc
+++ b/AMDiS/src/reinit/HL_SignedDistTraverse.cc
@@ -155,8 +155,6 @@ void HL_SignedDistTraverse::HL_updateIteration()
 
 void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo) 
 {
-  FUNCNAME("HL_SignedDistTraverse::HL_elementUpdate()");
-   
   // ===== Get global indices of vertices of element. =====
   const int nBasFcts = feSpace->getBasisFcts()->getNumber();
   if (static_cast<int>(locInd.size()) < nBasFcts)
diff --git a/AMDiS/src/reinit/VelocityExtFromVelocityField.cc b/AMDiS/src/reinit/VelocityExtFromVelocityField.cc
index cf2ca622..1d8000b0 100644
--- a/AMDiS/src/reinit/VelocityExtFromVelocityField.cc
+++ b/AMDiS/src/reinit/VelocityExtFromVelocityField.cc
@@ -18,8 +18,6 @@ void
 VelocityExtFromVelocityField::calcVelocityBoundary(DegreeOfFreedom *locInd, 
 						   const int indexV)
 {
-  FUNCNAME("VelocityExtFromVelocityField::calcVelocityBoundary()");
-
   // ===== Calculate normal velocity in element vertices. =====
 
   // Get gradient of lSFct on element.
diff --git a/AMDiS/src/reinit/VelocityExtFromVelocityField.h b/AMDiS/src/reinit/VelocityExtFromVelocityField.h
index f6b86c34..7a3aeb6d 100644
--- a/AMDiS/src/reinit/VelocityExtFromVelocityField.h
+++ b/AMDiS/src/reinit/VelocityExtFromVelocityField.h
@@ -44,8 +44,6 @@ public:
       elNormalVel(dim_, NO_INIT),
       basFcts(NULL)
   {
-    FUNCNAME("VelocityExtFromVelocityField::VelocityExtFromVelocityField()");
-    
     lSFctVal.change_dim(dim + 1);
     
     // ===== set epsilon for norm regularization =====
diff --git a/AMDiS/src/time/RosenbrockAdaptInstationary.cc b/AMDiS/src/time/RosenbrockAdaptInstationary.cc
index 2873208a..b6ca6c3f 100644
--- a/AMDiS/src/time/RosenbrockAdaptInstationary.cc
+++ b/AMDiS/src/time/RosenbrockAdaptInstationary.cc
@@ -35,7 +35,6 @@ namespace AMDiS {
       minusInvTauGamma(-1.0),
       dbgTimestepStudy(false)
   {
-    FUNCNAME("RosenbrockAdaptInstationary::RosenbrockAdaptInstationary()");
     initConstructor(problemStat);
   }
 
@@ -59,14 +58,13 @@ namespace AMDiS {
       minusInvTauGamma(-1.0),
       dbgTimestepStudy(false)
   {
-    FUNCNAME("RosenbrockAdaptInstationary::RosenbrockAdaptInstationary()");
     initConstructor(&problemStat);
   }
 
 
   void RosenbrockAdaptInstationary::initConstructor(RosenbrockStationary *problemStat)
   {
-    FUNCNAME("RosenbrockAdaptInstationary::initConstructor()");
+    FUNCNAME_DBG("RosenbrockAdaptInstationary::initConstructor()");
 
     std::string str("");
     std::string initFileStr(name + "->rosenbrock method");
@@ -93,8 +91,6 @@ namespace AMDiS {
 
   void RosenbrockAdaptInstationary::reset()
   {
-    FUNCNAME("RosenbrockAdaptInstationary::reset()");
-
     firstTimestep = true;
     lastTimestepRejected = false;
     succRejection = false;
diff --git a/AMDiS/src/time/RosenbrockStationary.cc b/AMDiS/src/time/RosenbrockStationary.cc
index 1250bf31..6e472f65 100644
--- a/AMDiS/src/time/RosenbrockStationary.cc
+++ b/AMDiS/src/time/RosenbrockStationary.cc
@@ -154,8 +154,6 @@ namespace AMDiS {
   void RosenbrockStationary::addDirichletBC(BoundaryType type, int row, int col,
 					    AbstractFunction<double, WorldVector<double> > *fct)
   {
-    FUNCNAME("RosenbrockStationary::addDirichletBC()");
-
     DOFVector<double>* vec = new DOFVector<double>(componentSpaces[row], "vec");
     RosenbrockBoundary bound = {fct, vec, row, col};
     boundaries.push_back(bound);
-- 
GitLab