Changeset 47d041 for src/Tesselation


Ignore:
Timestamp:
Nov 3, 2011, 7:44:01 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
41a467
Parents:
50e4e5
git-author:
Frederik Heber <heber@…> (10/27/11 11:53:58)
git-committer:
Frederik Heber <heber@…> (11/03/11 19:44:01)
Message:

HUGE: Removed all calls to Log(), eLog(), replaced by LOG() and ELOG().

  • Replaced DoLog(.) && (Log() << Verbose(.) << ... << std::endl) by Log(., ...).
  • Replaced Log() << Verbose(.) << .. << by Log(., ...)
  • on multiline used stringstream to generate and message which was finally used in LOG(., output.str())
  • there should be no more occurence of Log(). LOG() and ELOG() must be used instead.
  • Eventually, this will allow for storing all errors and re-printing them on program exit which would be very helpful to ascertain error-free runs for the user.
Location:
src/Tesselation
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/Tesselation/BoundaryLineSet.cpp

    r50e4e5 r47d041  
    6666  skipped = false;
    6767  // clear triangles list
    68   DoLog(0) && (Log() << Verbose(0) << "New Line with endpoints " << *this << "." << endl);
     68  LOG(0, "New Line with endpoints " << *this << ".");
    6969}
    7070;
     
    8787  Point2->AddLine(this); //
    8888  // clear triangles list
    89   DoLog(0) && (Log() << Verbose(0) << "New Line with endpoints " << *this << "." << endl);
     89  LOG(0, "New Line with endpoints " << *this << ".");
    9090}
    9191;
     
    116116        for (LineMap::iterator Runner = erasor.first; Runner != erasor.second; Runner++)
    117117          if ((*Runner).second == this) {
    118             //Log() << Verbose(0) << "Removing Line Nr. " << Nr << " in boundary point " << *endpoints[i] << "." << endl;
     118            //LOG(0, "Removing Line Nr. " << Nr << " in boundary point " << *endpoints[i] << ".");
    119119            endpoints[i]->lines.erase(Runner);
    120120            break;
     
    122122      } else { // there's just a single line left
    123123        if (endpoints[i]->lines.erase(Nr)) {
    124           //Log() << Verbose(0) << "Removing Line Nr. " << Nr << " in boundary point " << *endpoints[i] << "." << endl;
     124          //LOG(0, "Removing Line Nr. " << Nr << " in boundary point " << *endpoints[i] << ".");
    125125        }
    126126      }
    127127      if (endpoints[i]->lines.empty()) {
    128         //Log() << Verbose(0) << *endpoints[i] << " has no more lines it's attached to, erasing." << endl;
     128        //LOG(0, *endpoints[i] << " has no more lines it's attached to, erasing.");
    129129        if (endpoints[i] != NULL) {
    130130          delete (endpoints[i]);
     
    135135  }
    136136  if (!triangles.empty())
    137     DoeLog(2) && (eLog() << Verbose(2) << "Memory Leak! I " << *this << " am still connected to some triangles." << endl);
     137    ELOG(2, "Memory Leak! I " << *this << " am still connected to some triangles.");
    138138}
    139139;
     
    145145{
    146146  Info FunctionInfo(__func__);
    147   DoLog(0) && (Log() << Verbose(0) << "Add " << triangle->Nr << " to line " << *this << "." << endl);
     147  LOG(0, "Add " << triangle->Nr << " to line " << *this << ".");
    148148  triangles.insert(TrianglePair(triangle->Nr, triangle));
    149149}
     
    175175  double angle = CalculateConvexity();
    176176  if (angle > -MYEPSILON) {
    177     DoLog(0) && (Log() << Verbose(0) << "ACCEPT: Angle is greater than pi: convex." << endl);
     177    LOG(0, "ACCEPT: Angle is greater than pi: convex.");
    178178    return true;
    179179  } else {
    180     DoLog(0) && (Log() << Verbose(0) << "REJECT: Angle is less than pi: concave." << endl);
     180    LOG(0, "REJECT: Angle is less than pi: concave.");
    181181    return false;
    182182  }
     
    194194  // get the two triangles
    195195  if (triangles.size() != 2) {
    196     DoeLog(0) && (eLog() << Verbose(0) << "Baseline " << *this << " is connected to less than two triangles, Tesselation incomplete!" << endl);
     196    ELOG(0, "Baseline " << *this << " is connected to less than two triangles, Tesselation incomplete!");
    197197    return true;
    198198  }
    199199  // check normal vectors
    200200  // have a normal vector on the base line pointing outwards
    201   //Log() << Verbose(0) << "INFO: " << *this << " has vectors at " << *(endpoints[0]->node->node) << " and at " << *(endpoints[1]->node->node) << "." << endl;
     201  //LOG(0, "INFO: " << *this << " has vectors at " << *(endpoints[0]->node->node) << " and at " << *(endpoints[1]->node->node) << ".");
    202202  BaseLineCenter = (1./2.)*((endpoints[0]->node->getPosition()) + (endpoints[1]->node->getPosition()));
    203203  BaseLine = (endpoints[0]->node->getPosition()) - (endpoints[1]->node->getPosition());
    204204
    205   //Log() << Verbose(0) << "INFO: Baseline is " << BaseLine << " and its center is at " << BaseLineCenter << "." << endl;
     205  //LOG(0, "INFO: Baseline is " << BaseLine << " and its center is at " << BaseLineCenter << ".");
    206206
    207207  BaseLineNormal.Zero();
     
    211211  class BoundaryPointSet *node = NULL;
    212212  for (TriangleMap::const_iterator runner = triangles.begin(); runner != triangles.end(); runner++) {
    213     //Log() << Verbose(0) << "INFO: NormalVector of " << *(runner->second) << " is " << runner->second->NormalVector << "." << endl;
     213    //LOG(0, "INFO: NormalVector of " << *(runner->second) << " is " << runner->second->NormalVector << ".");
    214214    NormalCheck += runner->second->NormalVector;
    215215    NormalCheck *= sign;
     
    218218      BaseLineNormal = runner->second->NormalVector;   // yes, copy second on top of first
    219219    else {
    220       DoeLog(0) && (eLog() << Verbose(0) << "Triangle " << *runner->second << " has zero normal vector!" << endl);
     220      ELOG(0, "Triangle " << *runner->second << " has zero normal vector!");
    221221    }
    222222    node = runner->second->GetThirdEndpoint(this);
    223223    if (node != NULL) {
    224       //Log() << Verbose(0) << "INFO: Third node for triangle " << *(runner->second) << " is " << *node << " at " << *(node->node->node) << "." << endl;
     224      //LOG(0, "INFO: Third node for triangle " << *(runner->second) << " is " << *node << " at " << *(node->node->node) << ".");
    225225      helper[i] = (node->node->getPosition()) - BaseLineCenter;
    226226      helper[i].MakeNormalTo(BaseLine);  // we want to compare the triangle's heights' angles!
    227       //Log() << Verbose(0) << "INFO: Height vector with respect to baseline is " << helper[i] << "." << endl;
     227      //LOG(0, "INFO: Height vector with respect to baseline is " << helper[i] << ".");
    228228      i++;
    229229    } else {
    230       DoeLog(1) && (eLog() << Verbose(1) << "I cannot find third node in triangle, something's wrong." << endl);
     230      ELOG(1, "I cannot find third node in triangle, something's wrong.");
    231231      return true;
    232232    }
    233233  }
    234   //Log() << Verbose(0) << "INFO: BaselineNormal is " << BaseLineNormal << "." << endl;
     234  //LOG(0, "INFO: BaselineNormal is " << BaseLineNormal << ".");
    235235  if (NormalCheck.NormSquared() < MYEPSILON) {
    236     DoLog(0) && (Log() << Verbose(0) << "ACCEPT: Normalvectors of both triangles are the same: convex." << endl);
     236    LOG(0, "ACCEPT: Normalvectors of both triangles are the same: convex.");
    237237    return true;
    238238  }
  • src/Tesselation/BoundaryPointSet.cpp

    r50e4e5 r47d041  
    4646{
    4747  Info FunctionInfo(__func__);
    48   DoLog(1) && (Log() << Verbose(1) << "Adding noname." << endl);
     48  LOG(1, "Adding noname.");
    4949}
    5050;
     
    6060{
    6161  Info FunctionInfo(__func__);
    62   DoLog(1) && (Log() << Verbose(1) << "Adding Node " << *Walker << endl);
     62  LOG(1, "Adding Node " << *Walker);
    6363}
    6464;
     
    7171{
    7272  Info FunctionInfo(__func__);
    73   //Log() << Verbose(0) << "Erasing point Nr. " << Nr << "." << endl;
     73  //LOG(0, "Erasing point Nr. " << Nr << ".");
    7474  if (!lines.empty())
    75     DoeLog(2) && (eLog() << Verbose(2) << "Memory Leak! I " << *this << " am still connected to some lines." << endl);
     75    ELOG(2, "Memory Leak! I " << *this << " am still connected to some lines.");
    7676  node = NULL;
    7777}
     
    8484{
    8585  Info FunctionInfo(__func__);
    86   DoLog(1) && (Log() << Verbose(1) << "Adding " << *this << " to line " << *line << "." << endl);
     86  LOG(1, "Adding " << *this << " to line " << *line << ".");
    8787  if (line->endpoints[0] == this) {
    8888    lines.insert(LinePair(line->endpoints[1]->Nr, line));
  • src/Tesselation/BoundaryPolygonSet.cpp

    r50e4e5 r47d041  
    5656  Info FunctionInfo(__func__);
    5757  endpoints.clear();
    58   DoLog(1) && (Log() << Verbose(1) << "Erasing polygon Nr." << Nr << " itself." << endl);
     58  LOG(1, "Erasing polygon Nr." << Nr << " itself.");
    5959}
    6060;
     
    7777      Runner[i]++;
    7878      if (Runner[i] == endpoints.end()) {
    79         DoeLog(0) && (eLog() << Verbose(0) << "There are less than three endpoints in the polygon!" << endl);
     79        ELOG(0, "There are less than three endpoints in the polygon!");
    8080        performCriticalExit();
    8181      }
     
    9797  if (TotalNormal->ScalarProduct(OtherVector) > 0.)
    9898    TotalNormal->Scale(-1.);
    99   DoLog(1) && (Log() << Verbose(1) << "Normal Vector is " << *TotalNormal << "." << endl);
     99  LOG(1, "Normal Vector is " << *TotalNormal << ".");
    100100
    101101  return TotalNormal;
     
    117117  }
    118118  center->Scale(1. / (double) counter);
    119   DoLog(1) && (Log() << Verbose(1) << "Center is at " << *center << "." << endl);
     119  LOG(1, "Center is at " << *center << ".");
    120120}
    121121
     
    150150  Info FunctionInfo(__func__);
    151151  for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++) {
    152     DoLog(0) && (Log() << Verbose(0) << "Checking against " << **Runner << endl);
     152    LOG(0, "Checking against " << **Runner);
    153153    if (point == (*Runner)) {
    154       DoLog(0) && (Log() << Verbose(0) << " Contained." << endl);
     154      LOG(0, " Contained.");
    155155      return true;
    156156    }
    157157  }
    158   DoLog(0) && (Log() << Verbose(0) << " Not contained." << endl);
     158  LOG(0, " Not contained.");
    159159  return false;
    160160}
     
    170170  for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++)
    171171    if (point == (*Runner)->node) {
    172       DoLog(0) && (Log() << Verbose(0) << " Contained." << endl);
     172      LOG(0, " Contained.");
    173173      return true;
    174174    }
    175   DoLog(0) && (Log() << Verbose(0) << " Not contained." << endl);
     175  LOG(0, " Not contained.");
    176176  return false;
    177177}
     
    187187  Info FunctionInfo(__func__);
    188188  int counter = 0;
    189   DoLog(1) && (Log() << Verbose(1) << "Polygon is " << *this << endl);
     189  LOG(1, "Polygon is " << *this);
    190190  for (int i = 0; i < dim; i++) {
    191     DoLog(1) && (Log() << Verbose(1) << " Testing endpoint " << *Points[i] << endl);
     191    LOG(1, " Testing endpoint " << *Points[i]);
    192192    if (ContainsBoundaryPoint(Points[i])) {
    193193      counter++;
     
    210210  Info FunctionInfo(__func__);
    211211  size_t counter = 0;
    212   DoLog(1) && (Log() << Verbose(1) << "Polygon is " << *this << endl);
     212  LOG(1, "Polygon is " << *this);
    213213  for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++) {
    214     DoLog(1) && (Log() << Verbose(1) << " Testing endpoint " << **Runner << endl);
     214    LOG(1, " Testing endpoint " << **Runner);
    215215    if (ContainsBoundaryPoint(*Runner))
    216216      counter++;
     
    246246    for (LineMap::const_iterator Walker = (*Runner)->lines.begin(); Walker != (*Runner)->lines.end(); Walker++)
    247247      for (TriangleMap::const_iterator Sprinter = (Walker->second)->triangles.begin(); Sprinter != (Walker->second)->triangles.end(); Sprinter++) {
    248         //Log() << Verbose(0) << " Testing triangle " << *(Sprinter->second) << endl;
     248        //LOG(0, " Testing triangle " << *(Sprinter->second));
    249249        if (ContainsBoundaryTriangle(Sprinter->second)) {
    250250          Tester = triangles->insert(Sprinter->second);
    251251          if (Tester.second)
    252             DoLog(0) && (Log() << Verbose(0) << "Adding triangle " << *(Sprinter->second) << endl);
     252            LOG(0, "Adding triangle " << *(Sprinter->second));
    253253        }
    254254      }
    255255
    256   DoLog(1) && (Log() << Verbose(1) << "The Polygon of " << endpoints.size() << " endpoints has " << triangles->size() << " unique triangles in total." << endl);
     256  LOG(1, "The Polygon of " << endpoints.size() << " endpoints has " << triangles->size() << " unique triangles in total.");
    257257  return triangles;
    258258}
     
    269269  if (line == NULL)
    270270    return false;
    271   DoLog(1) && (Log() << Verbose(1) << "Filling polygon from line " << *line << endl);
     271  LOG(1, "Filling polygon from line " << *line);
    272272  for (TriangleMap::const_iterator Runner = line->triangles.begin(); Runner != line->triangles.end(); Runner++) {
    273273    for (int i = 0; i < 3; i++) {
    274274      Tester = endpoints.insert((Runner->second)->endpoints[i]);
    275275      if (Tester.second)
    276         DoLog(1) && (Log() << Verbose(1) << "  Inserting endpoint " << *((Runner->second)->endpoints[i]) << endl);
     276        LOG(1, "  Inserting endpoint " << *((Runner->second)->endpoints[i]));
    277277    }
    278278  }
  • src/Tesselation/BoundaryTriangleSet.cpp

    r50e4e5 r47d041  
    7979  // set endpoints
    8080  int Counter = 0;
    81   DoLog(0) && (Log() << Verbose(0) << "New triangle " << Nr << " with end points: " << endl);
     81  LOG(0, "New triangle " << Nr << " with end points: ");
    8282  for (PointMap::iterator runner = OrderMap.begin(); runner != OrderMap.end(); runner++) {
    8383    endpoints[Counter] = runner->second;
    84     DoLog(0) && (Log() << Verbose(0) << " " << *endpoints[Counter] << endl);
     84    LOG(0, " " << *endpoints[Counter]);
    8585    Counter++;
    8686  }
     
    9999    if (lines[i] != NULL) {
    100100      if (lines[i]->triangles.erase(Nr)) {
    101         //Log() << Verbose(0) << "Triangle Nr." << Nr << " erased in line " << *lines[i] << "." << endl;
     101        //LOG(0, "Triangle Nr." << Nr << " erased in line " << *lines[i] << ".");
    102102      }
    103103      if (lines[i]->triangles.empty()) {
    104         //Log() << Verbose(0) << *lines[i] << " is no more attached to any triangle, erasing." << endl;
     104        //LOG(0, *lines[i] << " is no more attached to any triangle, erasing.");
    105105        delete (lines[i]);
    106106        lines[i] = NULL;
     
    108108    }
    109109  }
    110   //Log() << Verbose(0) << "Erasing triangle Nr." << Nr << " itself." << endl;
     110  //LOG(0, "Erasing triangle Nr." << Nr << " itself.");
    111111}
    112112;
     
    127127  if (NormalVector.ScalarProduct(OtherVector) > 0.)
    128128    NormalVector.Scale(-1.);
    129   DoLog(1) && (Log() << Verbose(1) << "Normal Vector is " << NormalVector << "." << endl);
     129  LOG(1, "Normal Vector is " << NormalVector << ".");
    130130}
    131131;
     
    154154    Intersection = Plane(NormalVector, (endpoints[0]->node->getPosition())).GetIntersection(centerLine);
    155155
    156     DoLog(1) && (Log() << Verbose(1) << "INFO: Triangle is " << *this << "." << endl);
    157     DoLog(1) && (Log() << Verbose(1) << "INFO: Line is from " << MolCenter << " to " << x << "." << endl);
    158     DoLog(1) && (Log() << Verbose(1) << "INFO: Intersection is " << Intersection << "." << endl);
     156    LOG(1, "INFO: Triangle is " << *this << ".");
     157    LOG(1, "INFO: Line is from " << MolCenter << " to " << x << ".");
     158    LOG(1, "INFO: Intersection is " << Intersection << ".");
    159159
    160160    if (Intersection.DistanceSquared(endpoints[0]->node->getPosition()) < MYEPSILON) {
    161       DoLog(1) && (Log() << Verbose(1) << "Intersection coindices with first endpoint." << endl);
     161      LOG(1, "Intersection coindices with first endpoint.");
    162162      return true;
    163163    }   else if (Intersection.DistanceSquared(endpoints[1]->node->getPosition()) < MYEPSILON) {
    164       DoLog(1) && (Log() << Verbose(1) << "Intersection coindices with second endpoint." << endl);
     164      LOG(1, "Intersection coindices with second endpoint.");
    165165      return true;
    166166    }   else if (Intersection.DistanceSquared(endpoints[2]->node->getPosition()) < MYEPSILON) {
    167       DoLog(1) && (Log() << Verbose(1) << "Intersection coindices with third endpoint." << endl);
     167      LOG(1, "Intersection coindices with third endpoint.");
    168168      return true;
    169169    }
     
    177177      CrossPoint -= (endpoints[i%3]->node->getPosition());  // cross point was returned as absolute vector
    178178      const double s = CrossPoint.ScalarProduct(helper)/helper.NormSquared();
    179       DoLog(1) && (Log() << Verbose(1) << "INFO: Factor s is " << s << "." << endl);
     179      LOG(1, "INFO: Factor s is " << s << ".");
    180180      if ((s < -MYEPSILON) || ((s-1.) > MYEPSILON)) {
    181         DoLog(1) && (Log() << Verbose(1) << "INFO: Crosspoint " << CrossPoint << "outside of triangle." << endl);
     181        LOG(1, "INFO: Crosspoint " << CrossPoint << "outside of triangle.");
    182182        return false;
    183183      }
    184184      i++;
    185185    } while (i < 3);
    186     DoLog(1) && (Log() << Verbose(1) << "INFO: Crosspoint " << CrossPoint << " inside of triangle." << endl);
     186    LOG(1, "INFO: Crosspoint " << CrossPoint << " inside of triangle.");
    187187    return true;
    188188  }
    189189  catch (LinearAlgebraException &excp) {
    190     Log() << Verbose(1) << boost::diagnostic_information(excp);
    191     DoeLog(1) && (eLog() << Verbose(1) << "Alas! Intersection with plane failed - at least numerically - the intersection is not on the plane!" << endl);
     190    LOG(1, boost::diagnostic_information(excp));
     191    ELOG(1, "Alas! Intersection with plane failed - at least numerically - the intersection is not on the plane!");
    192192    return false;
    193193  }
     
    213213
    214214  // 1. get intersection with plane
    215   DoLog(1) && (Log() << Verbose(1) << "INFO: Looking for closest point of triangle " << *this << " to " << x << "." << endl);
     215  LOG(1, "INFO: Looking for closest point of triangle " << *this << " to " << x << ".");
    216216  GetCenter(Direction);
    217217  try {
     
    228228  InPlane += ClosestPoint;
    229229
    230   DoLog(2) && (Log() << Verbose(2) << "INFO: Triangle is " << *this << "." << endl);
    231   DoLog(2) && (Log() << Verbose(2) << "INFO: Line is from " << Direction << " to " << x << "." << endl);
    232   DoLog(2) && (Log() << Verbose(2) << "INFO: In-plane part is " << InPlane << "." << endl);
     230  LOG(2, "INFO: Triangle is " << *this << ".");
     231  LOG(2, "INFO: Line is from " << Direction << " to " << x << ".");
     232  LOG(2, "INFO: In-plane part is " << InPlane << ".");
    233233
    234234  // Calculate cross point between one baseline and the desired point such that distance is shortest
     
    247247    CrossPoint[i] -= (endpoints[i%3]->node->getPosition());  // cross point was returned as absolute vector
    248248    const double s = CrossPoint[i].ScalarProduct(Direction)/Direction.NormSquared();
    249     DoLog(2) && (Log() << Verbose(2) << "INFO: Factor s is " << s << "." << endl);
     249    LOG(2, "INFO: Factor s is " << s << ".");
    250250    if ((s >= -MYEPSILON) && ((s-1.) <= MYEPSILON)) {
    251251          CrossPoint[i] += (endpoints[i%3]->node->getPosition());  // make cross point absolute again
    252       DoLog(2) && (Log() << Verbose(2) << "INFO: Crosspoint is " << CrossPoint[i] << ", intersecting BoundaryLine between " << endpoints[i % 3]->node->getPosition() << " and " << endpoints[(i + 1) % 3]->node->getPosition() << "." << endl);
     252      LOG(2, "INFO: Crosspoint is " << CrossPoint[i] << ", intersecting BoundaryLine between " << endpoints[i % 3]->node->getPosition() << " and " << endpoints[(i + 1) % 3]->node->getPosition() << ".");
    253253      const double distance = CrossPoint[i].DistanceSquared(x);
    254254      if ((ShortestDistance < 0.) || (ShortestDistance > distance)) {
     
    279279    }
    280280  }
    281   DoLog(1) && (Log() << Verbose(1) << "INFO: Closest Point is " << ClosestPoint << " with shortest squared distance is " << ShortestDistance << "." << endl);
     281  LOG(1, "INFO: Closest Point is " << ClosestPoint << " with shortest squared distance is " << ShortestDistance << ".");
    282282  return ShortestDistance;
    283283}
     
    333333{
    334334  Info FunctionInfo(__func__);
    335   DoLog(1) && (Log() << Verbose(1) << "INFO: Checking " << Points[0] << "," << Points[1] << "," << Points[2] << " against " << endpoints[0] << "," << endpoints[1] << "," << endpoints[2] << "." << endl);
     335  LOG(1, "INFO: Checking " << Points[0] << "," << Points[1] << "," << Points[2] << " against " << endpoints[0] << "," << endpoints[1] << "," << endpoints[2] << ".");
    336336  return (((endpoints[0] == Points[0]) || (endpoints[0] == Points[1]) || (endpoints[0] == Points[2])) && ((endpoints[1] == Points[0]) || (endpoints[1] == Points[1]) || (endpoints[1] == Points[2])) && ((endpoints[2] == Points[0]) || (endpoints[2] == Points[1]) || (endpoints[2] == Points[2])
    337337
     
    400400    (center) += (endpoints[i]->node->getPosition());
    401401  center.Scale(1. / 3.);
    402   DoLog(1) && (Log() << Verbose(1) << "INFO: Center is at " << center << "." << endl);
     402  LOG(1, "INFO: Center is at " << center << ".");
    403403}
    404404
  • src/Tesselation/CandidateForTesselation.cpp

    r50e4e5 r47d041  
    9595
    9696  if (!pointlist.empty())
    97     DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere contains candidate list and baseline " << *BaseLine->endpoints[0] << "<->" << *BaseLine->endpoints[1] << " only ..." << endl);
     97    LOG(1, "INFO: Checking whether sphere contains candidate list and baseline " << *BaseLine->endpoints[0] << "<->" << *BaseLine->endpoints[1] << " only ...");
    9898  else
    99     DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere with no candidates contains baseline " << *BaseLine->endpoints[0] << "<->" << *BaseLine->endpoints[1] << " only ..." << endl);
     99    LOG(1, "INFO: Checking whether sphere with no candidates contains baseline " << *BaseLine->endpoints[0] << "<->" << *BaseLine->endpoints[1] << " only ...");
    100100  // check baseline for OptCenter and OtherOptCenter being on sphere's surface
    101101  for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) {
     
    103103      const double distance = fabs((*VRunner)->DistanceSquared(BaseLine->endpoints[i]->node->getPosition()) - radiusSquared);
    104104      if (distance > HULLEPSILON) {
    105         DoeLog(1) && (eLog() << Verbose(1) << "Endpoint " << *BaseLine->endpoints[i] << " is out of sphere at " << *(*VRunner) << " by " << distance << "." << endl);
     105        ELOG(1, "Endpoint " << *BaseLine->endpoints[i] << " is out of sphere at " << *(*VRunner) << " by " << distance << ".");
    106106        return false;
    107107      }
     
    115115      const double distance = fabs((*VRunner)->DistanceSquared(Walker->getPosition()) - radiusSquared);
    116116      if (distance > HULLEPSILON) {
    117         DoeLog(1) && (eLog() << Verbose(1) << "Candidate " << *Walker << " is out of sphere at " << *(*VRunner) << " by " << distance << "." << endl);
     117        ELOG(1, "Candidate " << *Walker << " is out of sphere at " << *(*VRunner) << " by " << distance << ".");
    118118        return false;
    119119      } else {
    120         DoLog(1) && (Log() << Verbose(1) << "Candidate " << *Walker << " is inside by " << distance << "." << endl);
     120        LOG(1, "Candidate " << *Walker << " is inside by " << distance << ".");
    121121      }
    122122    }
    123123  }
    124124
    125   DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere contains no others points ..." << endl);
     125  LOG(1, "INFO: Checking whether sphere contains no others points ...");
    126126  bool flag = true;
    127127  for (list<const Vector *>::const_iterator VRunner = VectorList.begin(); VRunner != VectorList.end(); ++VRunner) {
     
    129129    TesselPointList *ListofPoints = LC->GetPointsInsideSphere(RADIUS, (*VRunner));
    130130
    131     DoLog(1) && (Log() << Verbose(1) << "The following atoms are inside sphere at " << (*VRunner) << ":" << endl);
     131    LOG(1, "The following atoms are inside sphere at " << (*VRunner) << ":");
    132132    for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    133       DoLog(1) && (Log() << Verbose(1) << "  " << *(*Runner) << " with distance " << (*Runner)->distance(*(*VRunner)) << "." << endl);
     133      LOG(1, "  " << *(*Runner) << " with distance " << (*Runner)->distance(*(*VRunner)) << ".");
    134134
    135135    // remove baseline's endpoints and candidates
    136136    for (int i = 0; i < 2; i++) {
    137       DoLog(1) && (Log() << Verbose(1) << "INFO: removing baseline tesselpoint " << *BaseLine->endpoints[i]->node << "." << endl);
     137      LOG(1, "INFO: removing baseline tesselpoint " << *BaseLine->endpoints[i]->node << ".");
    138138      ListofPoints->remove(BaseLine->endpoints[i]->node);
    139139    }
    140140    for (TesselPointList::const_iterator Runner = pointlist.begin(); Runner != pointlist.end(); ++Runner) {
    141       DoLog(1) && (Log() << Verbose(1) << "INFO: removing candidate tesselpoint " << *(*Runner) << "." << endl);
     141      LOG(1, "INFO: removing candidate tesselpoint " << *(*Runner) << ".");
    142142      ListofPoints->remove(*Runner);
    143143    }
    144144    if (!ListofPoints->empty()) {
    145       DoeLog(1) && (eLog() << Verbose(1) << "CheckValidity: There are still " << ListofPoints->size() << " points inside the sphere." << endl);
     145      ELOG(1, "CheckValidity: There are still " << ListofPoints->size() << " points inside the sphere.");
    146146      flag = false;
    147       DoeLog(1) && (eLog() << Verbose(1) << "External atoms inside of sphere at " << *(*VRunner) << ":" << endl);
     147      ELOG(1, "External atoms inside of sphere at " << *(*VRunner) << ":");
    148148      for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    149         DoeLog(1) && (eLog() << Verbose(1) << "  " << *(*Runner) << " at distance " << setprecision(13) << (*Runner)->distance(*(*VRunner)) << setprecision(6) << "." << endl);
     149        ELOG(1, "  " << *(*Runner) << " at distance " << setprecision(13) << (*Runner)->distance(*(*VRunner)) << setprecision(6) << ".");
    150150
    151151      // check with animate_sphere.tcl VMD script
    152152      if (ThirdPoint != NULL) {
    153         DoeLog(1) && (eLog() << Verbose(1) << "Check by: animate_sphere 0 " << BaseLine->endpoints[0]->Nr + 1 << " " << BaseLine->endpoints[1]->Nr + 1 << " " << ThirdPoint->Nr + 1 << " " << RADIUS << " " << OldCenter[0] << " " << OldCenter[1] << " " << OldCenter[2] << " " << (*VRunner)->at(0) << " " << (*VRunner)->at(1) << " " << (*VRunner)->at(2) << endl);
     153        ELOG(1, "Check by: animate_sphere 0 " << BaseLine->endpoints[0]->Nr + 1 << " " << BaseLine->endpoints[1]->Nr + 1 << " " << ThirdPoint->Nr + 1 << " " << RADIUS << " " << OldCenter[0] << " " << OldCenter[1] << " " << OldCenter[2] << " " << (*VRunner)->at(0) << " " << (*VRunner)->at(1) << " " << (*VRunner)->at(2));
    154154      } else {
    155         DoeLog(1) && (eLog() << Verbose(1) << "Check by: ... missing third point ..." << endl);
    156         DoeLog(1) && (eLog() << Verbose(1) << "Check by: animate_sphere 0 " << BaseLine->endpoints[0]->Nr + 1 << " " << BaseLine->endpoints[1]->Nr + 1 << " ??? " << RADIUS << " " << OldCenter[0] << " " << OldCenter[1] << " " << OldCenter[2] << " " << (*VRunner)->at(0) << " " << (*VRunner)->at(1) << " " << (*VRunner)->at(2) << endl);
     155        ELOG(1, "Check by: ... missing third point ...");
     156        ELOG(1, "Check by: animate_sphere 0 " << BaseLine->endpoints[0]->Nr + 1 << " " << BaseLine->endpoints[1]->Nr + 1 << " ??? " << RADIUS << " " << OldCenter[0] << " " << OldCenter[1] << " " << OldCenter[2] << " " << (*VRunner)->at(0) << " " << (*VRunner)->at(1) << " " << (*VRunner)->at(2));
    157157      }
    158158    }
  • src/Tesselation/boundary.cpp

    r50e4e5 r47d041  
    8484  } else {
    8585    BoundaryPoints = BoundaryPtr;
    86     DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl);
     86    LOG(0, "Using given boundary points set.");
    8787  }
    8888  // determine biggest "diameter" of cluster for each axis
     
    9191  for (int axis = 0; axis < NDIM; axis++)
    9292    { // regard each projected plane
    93       //Log() << Verbose(1) << "Current axis is " << axis << "." << endl;
     93      //LOG(1, "Current axis is " << axis << ".");
    9494      for (int j = 0; j < 2; j++)
    9595        { // and for both axis on the current plane
    9696          component = (axis + j + 1) % NDIM;
    9797          Othercomponent = (axis + 1 + ((j + 1) & 1)) % NDIM;
    98           //Log() << Verbose(1) << "Current component is " << component << ", Othercomponent is " << Othercomponent << "." << endl;
     98          //LOG(1, "Current component is " << component << ", Othercomponent is " << Othercomponent << ".");
    9999          for (Boundaries::const_iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) {
    100               //Log() << Verbose(1) << "Current runner is " << *(runner->second.second) << "." << endl;
     100              //LOG(1, "Current runner is " << *(runner->second.second) << ".");
    101101              // seek for the neighbours pair where the Othercomponent sign flips
    102102              Neighbour = runner;
     
    111111                    Neighbour = BoundaryPoints[axis].begin();
    112112                  DistanceVector = (runner->second.second->getPosition()) - (Neighbour->second.second->getPosition());
    113                   //Log() << Verbose(2) << "OldComponent is " << OldComponent << ", new one is " << DistanceVector.x[Othercomponent] << "." << endl;
     113                  //LOG(2, "OldComponent is " << OldComponent << ", new one is " << DistanceVector.x[Othercomponent] << ".");
    114114                } while ((runner != Neighbour) && (fabs(OldComponent / fabs(
    115115                  OldComponent) - DistanceVector[Othercomponent] / fabs(
     
    120120                    OtherNeighbour = BoundaryPoints[axis].end();
    121121                  OtherNeighbour--;
    122                   //Log() << Verbose(1) << "The pair, where the sign of OtherComponent flips, is: " << *(Neighbour->second.second) << " and " << *(OtherNeighbour->second.second) << "." << endl;
     122                  //LOG(1, "The pair, where the sign of OtherComponent flips, is: " << *(Neighbour->second.second) << " and " << *(OtherNeighbour->second.second) << ".");
    123123                  // now we have found the pair: Neighbour and OtherNeighbour
    124124                  OtherVector = (runner->second.second->getPosition()) - (OtherNeighbour->second.second->getPosition());
    125                   //Log() << Verbose(1) << "Distances to Neighbour and OtherNeighbour are " << DistanceVector.x[component] << " and " << OtherVector.x[component] << "." << endl;
    126                   //Log() << Verbose(1) << "OtherComponents to Neighbour and OtherNeighbour are " << DistanceVector.x[Othercomponent] << " and " << OtherVector.x[Othercomponent] << "." << endl;
     125                  //LOG(1, "Distances to Neighbour and OtherNeighbour are " << DistanceVector.x[component] << " and " << OtherVector.x[component] << ".");
     126                  //LOG(1, "OtherComponents to Neighbour and OtherNeighbour are " << DistanceVector.x[Othercomponent] << " and " << OtherVector.x[Othercomponent] << ".");
    127127                  // do linear interpolation between points (is exact) to extract exact intersection between Neighbour and OtherNeighbour
    128128                  w1 = fabs(OtherVector[Othercomponent]);
     
    131131                      * OtherVector[component]) / (w1 + w2));
    132132                  // mark if it has greater diameter
    133                   //Log() << Verbose(1) << "Comparing current greatest " << GreatestDiameter[component] << " to new " << tmp << "." << endl;
     133                  //LOG(1, "Comparing current greatest " << GreatestDiameter[component] << " to new " << tmp << ".");
    134134                  GreatestDiameter[component] = (GreatestDiameter[component]
    135135                      > tmp) ? GreatestDiameter[component] : tmp;
    136136                } //else
    137               //Log() << Verbose(1) << "Saw no sign flip, probably top or bottom node." << endl;
     137              //LOG(1, "Saw no sign flip, probably top or bottom node.");
    138138            }
    139139        }
    140140    }
    141   Log() << Verbose(0) << "RESULT: The biggest diameters are "
     141  LOG(0, "RESULT: The biggest diameters are "
    142142      << GreatestDiameter[0] << " and " << GreatestDiameter[1] << " and "
    143143      << GreatestDiameter[2] << " " << (IsAngstroem ? "angstrom"
    144       : "atomiclength") << "." << endl;
     144      : "atomiclength") << ".");
    145145
    146146  // free reference lists
     
    186186    AngleReferenceNormalVector[(axis + 2) % NDIM] = 1.;
    187187
    188     DoLog(1) && (Log() << Verbose(1) << "Axisvector is " << AxisVector << " and AngleReferenceVector is " << AngleReferenceVector << ", and AngleReferenceNormalVector is " << AngleReferenceNormalVector << "." << endl);
     188    LOG(1, "Axisvector is " << AxisVector << " and AngleReferenceVector is " << AngleReferenceVector << ", and AngleReferenceNormalVector is " << AngleReferenceNormalVector << ".");
    189189
    190190    // 3b. construct set of all points, transformed into cylindrical system and with left and right neighbours
     
    200200        angle = 0.; // otherwise it's a vector in Axis Direction and unimportant for boundary issues
    201201
    202       //Log() << Verbose(1) << "Checking sign in quadrant : " << ProjectedVector.Projection(&AngleReferenceNormalVector) << "." << endl;
     202      //LOG(1, "Checking sign in quadrant : " << ProjectedVector.Projection(&AngleReferenceNormalVector) << ".");
    203203      if (ProjectedVector.ScalarProduct(AngleReferenceNormalVector) > 0) {
    204204        angle = 2. * M_PI - angle;
    205205      }
    206     DoLog(1) && (Log() << Verbose(1) << "Inserting " << **iter << ": (r, alpha) = (" << radius << "," << angle << "): " << ProjectedVector << endl);
     206    LOG(1, "Inserting " << **iter << ": (r, alpha) = (" << radius << "," << angle << "): " << ProjectedVector);
    207207      BoundaryTestPair = BoundaryPoints[axis].insert(BoundariesPair(angle, TesselPointDistancePair (radius, (*iter))));
    208208      if (!BoundaryTestPair.second) { // same point exists, check first r, then distance of original vectors to center of gravity
    209         DoLog(2) && (Log() << Verbose(2) << "Encountered two vectors whose projection onto axis " << axis << " is equal: " << endl);
    210         DoLog(2) && (Log() << Verbose(2) << "Present vector: " << *BoundaryTestPair.first->second.second << endl);
    211         DoLog(2) && (Log() << Verbose(2) << "New vector: " << **iter << endl);
     209        LOG(2, "Encountered two vectors whose projection onto axis " << axis << " is equal: ");
     210        LOG(2, "Present vector: " << *BoundaryTestPair.first->second.second);
     211        LOG(2, "New vector: " << **iter);
    212212        const double ProjectedVectorNorm = ProjectedVector.NormSquared();
    213213        if ((ProjectedVectorNorm - BoundaryTestPair.first->second.first) > MYEPSILON) {
    214214          BoundaryTestPair.first->second.first = ProjectedVectorNorm;
    215215          BoundaryTestPair.first->second.second = (*iter);
    216           DoLog(2) && (Log() << Verbose(2) << "Keeping new vector due to larger projected distance " << ProjectedVectorNorm << "." << endl);
     216          LOG(2, "Keeping new vector due to larger projected distance " << ProjectedVectorNorm << ".");
    217217        } else if (fabs(ProjectedVectorNorm - BoundaryTestPair.first->second.first) < MYEPSILON) {
    218218          helper = (*iter)->getPosition() - (*MolCenter);
     
    221221          if (helper.NormSquared() < oldhelperNorm) {
    222222            BoundaryTestPair.first->second.second = (*iter);
    223             DoLog(2) && (Log() << Verbose(2) << "Keeping new vector due to larger distance to molecule center " << helper.NormSquared() << "." << endl);
     223            LOG(2, "Keeping new vector due to larger distance to molecule center " << helper.NormSquared() << ".");
    224224          } else {
    225             DoLog(2) && (Log() << Verbose(2) << "Keeping present vector due to larger distance to molecule center " << oldhelperNorm << "." << endl);
     225            LOG(2, "Keeping present vector due to larger distance to molecule center " << oldhelperNorm << ".");
    226226          }
    227227        } else {
    228           DoLog(2) && (Log() << Verbose(2) << "Keeping present vector due to larger projected distance " << ProjectedVectorNorm << "." << endl);
     228          LOG(2, "Keeping present vector due to larger projected distance " << ProjectedVectorNorm << ".");
    229229        }
    230230      }
     
    232232    // printing all inserted for debugging
    233233    //    {
    234     //      Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl;
     234    //      std::stringstream output;
     235    //      output << "Printing list of candidates for axis " << axis << " which we have inserted so far: ";
    235236    //      int i=0;
    236237    //      for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) {
    237238    //        if (runner != BoundaryPoints[axis].begin())
    238     //          Log() << Verbose(0) << ", " << i << ": " << *runner->second.second;
     239    //          output << ", " << i << ": " << *runner->second.second;
    239240    //        else
    240     //          Log() << Verbose(0) << i << ": " << *runner->second.second;
     241    //          output << i << ": " << *runner->second.second;
    241242    //        i++;
    242243    //      }
    243     //      Log() << Verbose(0) << endl;
     244    //      LOG(1, output.str());
    244245    //    }
    245246    // 3c. throw out points whose distance is less than the mean of left and right neighbours
    246247    bool flag = false;
    247     DoLog(1) && (Log() << Verbose(1) << "Looking for candidates to kick out by convex condition ... " << endl);
     248    LOG(1, "Looking for candidates to kick out by convex condition ... ");
    248249    do { // do as long as we still throw one out per round
    249250      flag = false;
     
    273274          SideA = left->second.second->getPosition() - (*MolCenter);
    274275          SideA.ProjectOntoPlane(AxisVector);
    275           //          Log() << Verbose(1) << "SideA: " << SideA << endl;
     276          //          LOG(1, "SideA: " << SideA);
    276277
    277278          SideB = right->second.second->getPosition() -(*MolCenter);
    278279          SideB.ProjectOntoPlane(AxisVector);
    279           //          Log() << Verbose(1) << "SideB: " << SideB << endl;
     280          //          LOG(1, "SideB: " << SideB);
    280281
    281282          SideC = left->second.second->getPosition() - right->second.second->getPosition();
    282283          SideC.ProjectOntoPlane(AxisVector);
    283           //          Log() << Verbose(1) << "SideC: " << SideC << endl;
     284          //          LOG(1, "SideC: " << SideC);
    284285
    285286          SideH = runner->second.second->getPosition() -(*MolCenter);
    286287          SideH.ProjectOntoPlane(AxisVector);
    287           //          Log() << Verbose(1) << "SideH: " << SideH << endl;
     288          //          LOG(1, "SideH: " << SideH);
    288289
    289290          // calculate each length
     
    298299          const double delta = SideC.Angle(SideH);
    299300          const double MinDistance = a * sin(beta) / (sin(delta)) * (((alpha < M_PI / 2.) || (gamma < M_PI / 2.)) ? 1. : -1.);
    300           //Log() << Verbose(1) << " I calculated: a = " << a << ", h = " << h << ", beta(" << left->second.second->Name << "," << left->second.second->Name << "-" << right->second.second->Name << ") = " << beta << ", delta(" << left->second.second->Name << "," << runner->second.second->Name << ") = " << delta << ", Min = " << MinDistance << "." << endl;
    301           DoLog(1) && (Log() << Verbose(1) << "Checking CoG distance of runner " << *runner->second.second << " " << h << " against triangle's side length spanned by (" << *left->second.second << "," << *right->second.second << ") of " << MinDistance << "." << endl);
     301          //LOG(1, " I calculated: a = " << a << ", h = " << h << ", beta(" << left->second.second->Name << "," << left->second.second->Name << "-" << right->second.second->Name << ") = " << beta << ", delta(" << left->second.second->Name << "," << runner->second.second->Name << ") = " << delta << ", Min = " << MinDistance << ".");
     302          LOG(1, "Checking CoG distance of runner " << *runner->second.second << " " << h << " against triangle's side length spanned by (" << *left->second.second << "," << *right->second.second << ") of " << MinDistance << ".");
    302303          if ((fabs(h / fabs(h) - MinDistance / fabs(MinDistance)) < MYEPSILON) && ((h - MinDistance)) < -MYEPSILON) {
    303304            // throw out point
    304             DoLog(1) && (Log() << Verbose(1) << "Throwing out " << *runner->second.second << "." << endl);
     305            LOG(1, "Throwing out " << *runner->second.second << ".");
    305306            BoundaryPoints[axis].erase(runner);
    306307            runner = right;
     
    340341  } else {
    341342    BoundaryPoints = BoundaryPts;
    342     DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl);
     343    LOG(0, "Using given boundary points set.");
    343344  }
    344345
    345346// printing all inserted for debugging
    346   for (int axis=0; axis < NDIM; axis++) {
    347     DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl);
    348     int i=0;
    349     for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) {
    350       if (runner != BoundaryPoints[axis].begin())
    351         DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second);
    352       else
    353         DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second);
    354       i++;
    355     }
    356     DoLog(0) && (Log() << Verbose(0) << endl);
     347  if (DoLog(1)) {
     348    for (int axis=0; axis < NDIM; axis++) {
     349      std::stringstream output;
     350      output << "Printing list of candidates for axis " << axis << " which we have inserted so far: ";
     351      int i=0;
     352      for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) {
     353        if (runner != BoundaryPoints[axis].begin())
     354          output << ", " << i << ": " << *runner->second.second;
     355        else
     356          output << i << ": " << *runner->second.second;
     357        i++;
     358      }
     359      LOG(1, output.str());
     360    }
    357361  }
    358362
     
    361365    for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++)
    362366        if (!TesselStruct->AddBoundaryPoint(runner->second.second, 0))
    363           DoLog(2) && (Log()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present." << endl);
    364 
    365   DoLog(0) && (Log() << Verbose(0) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl);
     367          LOG(2, "Point " << *(runner->second.second) << " is already present.");
     368
     369  LOG(0, "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary.");
    366370  // now we have the whole set of edge points in the BoundaryList
    367371
    368372  // listing for debugging
    369   //  Log() << Verbose(1) << "Listing PointsOnBoundary:";
     373  //if (DoLog(1)) {
     374  //  std::stringstream output;
     375  //  output << "Listing PointsOnBoundary:";
    370376  //  for(PointMap::iterator runner = PointsOnBoundary.begin(); runner != PointsOnBoundary.end(); runner++) {
    371   //    Log() << Verbose(0) << " " << *runner->second;
     377  //    output << " " << *runner->second;
    372378  //  }
    373   //  Log() << Verbose(0) << endl;
     379  //  LOG(1, output.str());
     380  //}
    374381
    375382  // 3a. guess starting triangle
     
    382389  // 3c. check whether all atoms lay inside the boundary, if not, add to boundary points, segment triangle into three with the new point
    383390  if (!TesselStruct->InsertStraddlingPoints(cloud, LCList))
    384     DoeLog(1) && (eLog()<< Verbose(1) << "Insertion of straddling points failed!" << endl);
    385 
    386   DoLog(0) && (Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " intermediate triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl);
     391    ELOG(1, "Insertion of straddling points failed!");
     392
     393  LOG(0, "I created " << TesselStruct->TrianglesOnBoundary.size() << " intermediate triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points.");
    387394
    388395  // 4. Store triangles in tecplot file
     
    396403    for (LineMap::iterator LineRunner = TesselStruct->LinesOnBoundary.begin(); LineRunner != TesselStruct->LinesOnBoundary.end(); LineRunner++) {
    397404      line = LineRunner->second;
    398       DoLog(1) && (Log() << Verbose(1) << "INFO: Current line is " << *line << "." << endl);
     405      LOG(1, "INFO: Current line is " << *line << ".");
    399406      if (!line->CheckConvexityCriterion()) {
    400         DoLog(1) && (Log() << Verbose(1) << "... line " << *line << " is concave, flipping it." << endl);
     407        LOG(1, "... line " << *line << " is concave, flipping it.");
    401408
    402409        // flip the line
    403410        if (TesselStruct->PickFarthestofTwoBaselines(line) == 0.)
    404           DoeLog(1) && (eLog()<< Verbose(1) << "Correction of concave baselines failed!" << endl);
     411          ELOG(1, "Correction of concave baselines failed!");
    405412        else {
    406413          TesselStruct->FlipBaseline(line);
    407           DoLog(1) && (Log() << Verbose(1) << "INFO: Correction of concave baselines worked." << endl);
     414          LOG(1, "INFO: Correction of concave baselines worked.");
    408415          LineRunner = TesselStruct->LinesOnBoundary.begin(); // LineRunner may have been erase if line was deleted from LinesOnBoundary
    409416        }
     
    414421  // 3e. we need another correction here, for TesselPoints that are below the surface (i.e. have an odd number of concave triangles surrounding it)
    415422//  if (!TesselStruct->CorrectConcaveTesselPoints(out))
    416 //    Log() << Verbose(1) << "Correction of concave tesselpoints failed!" << endl;
    417 
    418   DoLog(0) && (Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl);
     423//    ELOG(1, "Correction of concave tesselpoints failed!");
     424
     425  LOG(0, "I created " << TesselStruct->TrianglesOnBoundary.size() << " triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points.");
    419426
    420427  // 4. Store triangles in tecplot file
     
    440447
    441448  if ((TesselStruct == NULL) || (TesselStruct->PointsOnBoundary.empty())) {
    442     DoeLog(1) && (eLog()<< Verbose(1) << "TesselStruct is empty." << endl);
     449    ELOG(1, "TesselStruct is empty.");
    443450    return false;
    444451  }
     
    446453  PointMap::iterator PointRunner;
    447454  while (!TesselStruct->PointsOnBoundary.empty()) {
    448     DoLog(1) && (Log() << Verbose(1) << "Remaining points are: ");
    449     for (PointMap::iterator PointSprinter = TesselStruct->PointsOnBoundary.begin(); PointSprinter != TesselStruct->PointsOnBoundary.end(); PointSprinter++)
    450       DoLog(0) && (Log() << Verbose(0) << *(PointSprinter->second) << "\t");
    451     DoLog(0) && (Log() << Verbose(0) << endl);
     455    if (DoLog(1)) {
     456      std::stringstream output;
     457      output << "Remaining points are: ";
     458      for (PointMap::iterator PointSprinter = TesselStruct->PointsOnBoundary.begin(); PointSprinter != TesselStruct->PointsOnBoundary.end(); PointSprinter++)
     459        output << *(PointSprinter->second) << "\t";
     460      LOG(1, output.str());
     461    }
    452462
    453463    PointRunner = TesselStruct->PointsOnBoundary.begin();
     
    505515  // check whether there is something to work on
    506516  if (TesselStruct == NULL) {
    507     DoeLog(1) && (eLog()<< Verbose(1) << "TesselStruct is empty!" << endl);
     517    ELOG(1, "TesselStruct is empty!");
    508518    return volume;
    509519  }
     
    521531      PointAdvance++;
    522532      point = PointRunner->second;
    523       DoLog(1) && (Log() << Verbose(1) << "INFO: Current point is " << *point << "." << endl);
     533      LOG(1, "INFO: Current point is " << *point << ".");
    524534      for (LineMap::iterator LineRunner = point->lines.begin(); LineRunner != point->lines.end(); LineRunner++) {
    525535        line = LineRunner->second;
    526         DoLog(1) && (Log() << Verbose(1) << "INFO: Current line of point " << *point << " is " << *line << "." << endl);
     536        LOG(1, "INFO: Current line of point " << *point << " is " << *line << ".");
    527537        if (!line->CheckConvexityCriterion()) {
    528538          // remove the point if needed
    529           DoLog(1) && (Log() << Verbose(1) << "... point " << *point << " cannot be on convex envelope." << endl);
     539          LOG(1, "... point " << *point << " cannot be on convex envelope.");
    530540          volume += TesselStruct->RemovePointFromTesselatedSurface(point);
    531541          sprintf(dummy, "-first-%d", ++run);
     
    548558      LineAdvance++;
    549559      line = LineRunner->second;
    550       DoLog(1) && (Log() << Verbose(1) << "INFO: Picking farthest baseline for line is " << *line << "." << endl);
     560      LOG(1, "INFO: Picking farthest baseline for line is " << *line << ".");
    551561      // take highest of both lines
    552562      if (TesselStruct->IsConvexRectangle(line) == NULL) {
     
    571581//    LineAdvance++;
    572582//    line = LineRunner->second;
    573 //    Log() << Verbose(1) << "INFO: Current line is " << *line << "." << endl;
     583//    LOG(1, "INFO: Current line is " << *line << ".");
    574584//    //if (LineAdvance != TesselStruct->LinesOnBoundary.end())
    575 //      //Log() << Verbose(1) << "INFO: Next line will be " << *(LineAdvance->second) << "." << endl;
     585//      //LOG(1, "INFO: Next line will be " << *(LineAdvance->second) << ".");
    576586//    if (!line->CheckConvexityCriterion(out)) {
    577 //      Log() << Verbose(1) << "... line " << *line << " is concave, flipping it." << endl;
     587//      LOG(1, "INFO: ... line " << *line << " is concave, flipping it.");
    578588//
    579589//      // take highest of both lines
     
    589599
    590600  // end
    591   DoLog(0) && (Log() << Verbose(0) << "Volume is " << volume << "." << endl);
     601  LOG(0, "Volume is " << volume << ".");
    592602  return volume;
    593603};
     
    622632      const double h = x.Norm(); // distance of CoG to triangle
    623633      const double PyramidVolume = (1. / 3.) * G * h; // this formula holds for _all_ pyramids (independent of n-edge base or (not) centered peak)
    624       Log() << Verbose(1) << "Area of triangle is " << setprecision(10) << G << " "
     634      LOG(1, "INFO: Area of triangle is " << setprecision(10) << G << " "
    625635          << (IsAngstroem ? "angstrom" : "atomiclength") << "^2, height is "
    626636          << h << " and the volume is " << PyramidVolume << " "
    627           << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;
     637          << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    628638      volume += PyramidVolume;
    629639    }
    630   Log() << Verbose(0) << "RESULT: The summed volume is " << setprecision(6)
    631       << volume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3."
    632       << endl;
     640  LOG(0, "RESULT: The summed volume is " << setprecision(6)
     641      << volume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    633642
    634643  return volume;
     
    722731      totalmass += (*iter)->getType()->getMass();
    723732  }
    724   DoLog(0) && (Log() << Verbose(0) << "RESULT: The summed mass is " << setprecision(10) << totalmass << " atomicmassunit." << endl);
    725   DoLog(0) && (Log() << Verbose(0) << "RESULT: The average density is " << setprecision(10) << totalmass / clustervolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl);
     733  LOG(0, "RESULT: The summed mass is " << setprecision(10) << totalmass << " atomicmassunit.");
     734  LOG(0, "RESULT: The average density is " << setprecision(10) << totalmass / clustervolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    726735
    727736  // solve cubic polynomial
    728   DoLog(1) && (Log() << Verbose(1) << "Solving equidistant suspension in water problem ..." << endl);
     737  LOG(1, "Solving equidistant suspension in water problem ...");
    729738  if (IsAngstroem)
    730739    cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_A - (totalmass / clustervolume)) / (celldensity - 1);
    731740  else
    732741    cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_a0 - (totalmass / clustervolume)) / (celldensity - 1);
    733   DoLog(1) && (Log() << Verbose(1) << "Cellvolume needed for a density of " << celldensity << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl);
     742  LOG(1, "Cellvolume needed for a density of " << celldensity << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    734743
    735744  double minimumvolume = TotalNoClusters * (GreatestDiameter[0] * GreatestDiameter[1] * GreatestDiameter[2]);
    736   DoLog(1) && (Log() << Verbose(1) << "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl);
     745  LOG(1, "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    737746  if (minimumvolume > cellvolume) {
    738     DoeLog(1) && (eLog()<< Verbose(1) << "the containing box already has a greater volume than the envisaged cell volume!" << endl);
    739     DoLog(0) && (Log() << Verbose(0) << "Setting Box dimensions to minimum possible, the greatest diameters." << endl);
     747    ELOG(1, "the containing box already has a greater volume than the envisaged cell volume!");
     748    LOG(0, "Setting Box dimensions to minimum possible, the greatest diameters.");
    740749    for (int i = 0; i < NDIM; i++)
    741750      BoxLengths[i] = GreatestDiameter[i];
     
    749758    double x2 = 0.;
    750759    if (gsl_poly_solve_cubic(BoxLengths[0], BoxLengths[1], BoxLengths[2], &x0, &x1, &x2) == 1) // either 1 or 3 on return
    751       DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting spacing is: " << x0 << " ." << endl);
     760      LOG(0, "RESULT: The resulting spacing is: " << x0 << " .");
    752761    else {
    753       DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting spacings are: " << x0 << " and " << x1 << " and " << x2 << " ." << endl);
     762      LOG(0, "RESULT: The resulting spacings are: " << x0 << " and " << x1 << " and " << x2 << " .");
    754763      x0 = x2; // sorted in ascending order
    755764    }
     
    762771
    763772    // set new box dimensions
    764     DoLog(0) && (Log() << Verbose(0) << "Translating to box with these boundaries." << endl);
     773    LOG(0, "Translating to box with these boundaries.");
    765774    mol->SetBoxDimension(&BoxLengths);
    766775    mol->CenterInBox();
     
    769778  // update Box of atoms by boundary
    770779  mol->SetBoxDimension(&BoxLengths);
    771   DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting cell dimensions are: " << BoxLengths[0] << " and " << BoxLengths[1] << " and " << BoxLengths[2] << " with total volume of " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl);
     780  LOG(0, "RESULT: The resulting cell dimensions are: " << BoxLengths[0] << " and " << BoxLengths[1] << " and " << BoxLengths[2] << " with total volume of " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3.");
    772781};
    773782
     
    809818  for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++)
    810819    if ((*ListRunner)->getAtomCount() > 0) {
    811       DoLog(1) && (Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl);
     820      LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << ".");
    812821      PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name);
    813822      LCList[(*ListRunner)] = new LinkedCell(cloud, 10.); // get linked cell list
    814       DoLog(1) && (Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl);
     823      LOG(1, "Pre-creating tesselation for molecule " << *ListRunner << ".");
    815824      TesselStruct[(*ListRunner)] = NULL;
    816825      FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL);
     
    820829  filler->CenterEdge(&Inserter);
    821830  const int FillerCount = filler->getAtomCount();
    822   DoLog(2) && (Log() << Verbose(2) << "INFO: Filler molecule has the following bonds:" << endl);
     831  LOG(2, "INFO: Filler molecule has the following bonds:");
    823832  for(molecule::iterator AtomRunner = filler->begin(); AtomRunner != filler->end(); ++AtomRunner) {
    824833    const BondList& ListOfBonds = (*AtomRunner)->getListOfBonds();
     
    827836        ++BondRunner) {
    828837      if ((*BondRunner)->leftatom == *AtomRunner)
    829         DoLog(2) && (Log() << Verbose(2) << "  " << *(*BondRunner) << endl);
     838        LOG(2, "  " << *(*BondRunner));
    830839    }
    831840  }
     
    837846  for(int i=0;i<NDIM;i++)
    838847    N[i] = (int) ceil(1./FillerDistance[i]);
    839   DoLog(1) && (Log() << Verbose(1) << "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << "." << endl);
     848  LOG(1, "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << ".");
    840849
    841850  // initialize seed of random number generator to current time
     
    854863        for (int i=0;i<NDIM;i++)
    855864          FillerTranslations[i] = RandomMolDisplacement*(random()/((rng_max-rng_min)/2.) - 1.);
    856         DoLog(2) && (Log() << Verbose(2) << "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << "." << endl);
     865        LOG(2, "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << ".");
    857866
    858867        // go through all atoms
     
    907916          // insert into Filling
    908917          if (FillIt) {
    909             DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is outer point." << endl);
     918            LOG(1, "INFO: Position at " << Inserter << " is outer point.");
    910919            // copy atom ...
    911920            CopyAtoms[(*iter)->getNr()] = (*iter)->clone();
    912921            (*CopyAtoms[(*iter)->getNr()]).setPosition(Inserter);
    913922            Filling->AddAtom(CopyAtoms[(*iter)->getNr()]);
    914             DoLog(1) && (Log() << Verbose(1) << "Filling atom " << **iter << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[(*iter)->getNr()]->getPosition()) << "." << endl);
     923            LOG(1, "Filling atom " << **iter << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[(*iter)->getNr()]->getPosition()) << ".");
    915924          } else {
    916             DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance." << endl);
     925            LOG(1, "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance.");
    917926            CopyAtoms[(*iter)->getNr()] = NULL;
    918927            continue;
     
    928937              Binder = (*BondRunner);
    929938              if ((CopyAtoms[Binder->leftatom->getNr()] != NULL) && (CopyAtoms[Binder->rightatom->getNr()] != NULL)) {
    930                 Log()  << Verbose(3) << "Adding Bond between " << *CopyAtoms[Binder->leftatom->getNr()] << " and " << *CopyAtoms[Binder->rightatom->getNr()]<< "." << endl;
     939                LOG(3, "Adding Bond between " << *CopyAtoms[Binder->leftatom->getNr()] << " and " << *CopyAtoms[Binder->rightatom->getNr()]<< ".");
    931940                Filling->AddBond(CopyAtoms[Binder->leftatom->getNr()], CopyAtoms[Binder->rightatom->getNr()], Binder->BondDegree);
    932941              }
     
    9971006  }
    9981007  if (Filling->empty()) {
    999     DoLog(0) && (Log() << Verbose(0) << "Removing molecule " << Filling->getName() << ", all atoms have been removed." << std::endl);
     1008    LOG(0, "Removing molecule " << Filling->getName() << ", all atoms have been removed.");
    10001009    World::getInstance().destroyMolecule(Filling);
    10011010    Filling = NULL;
     
    10341043  const bool result = (liste->size() == compareTo);
    10351044  if (!result) {
    1036     DoLog(0) && (Log() << Verbose(0) << "Skipping because of the following atoms:" << std::endl);
     1045    LOG(0, "Skipping because of the following atoms:");
    10371046    for (TesselPointSTLList::const_iterator iter = liste->begin();
    10381047        iter != liste->end();
    10391048        ++iter) {
    1040       DoLog(0) && (Log() << Verbose(0) << **iter << std::endl);
     1049      LOG(0, **iter);
    10411050    }
    10421051  }
     
    11061115  for (std::vector<molecule *>::iterator ListRunner = List.begin(); ListRunner != List.end(); ListRunner++)
    11071116    if ((*ListRunner)->getAtomCount() > 0) {
    1108       DoLog(1) && (Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl);
     1117      LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << ".");
    11091118      PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name);
    11101119      LCList[(*ListRunner)] = new LinkedCell(cloud, 10.); // get linked cell list
     
    11161125  delete gravity;
    11171126  //const int FillerCount = filler->getAtomCount();
    1118   DoLog(2) && (Log() << Verbose(2) << "INFO: Filler molecule has the following bonds:" << endl);
     1127  LOG(2, "INFO: Filler molecule has the following bonds:");
    11191128  for(molecule::iterator AtomRunner = filler->begin(); AtomRunner != filler->end(); ++AtomRunner) {
    11201129    const BondList& ListOfBonds = (*AtomRunner)->getListOfBonds();
     
    11231132        ++BondRunner)
    11241133      if ((*BondRunner)->leftatom == *AtomRunner)
    1125         DoLog(2) && (Log() << Verbose(2) << "  " << *(*BondRunner) << endl);
     1134        LOG(2, "  " << *(*BondRunner));
    11261135  }
    11271136
     
    11301139  for(int i=0;i<NDIM;i++)
    11311140    N[i] = (int) ceil(1./FillerDistance[i]);
    1132   DoLog(1) && (Log() << Verbose(1) << "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << "." << endl);
     1141  LOG(1, "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << ".");
    11331142
    11341143  // initialize seed of random number generator to current time
     
    11471156        for (int i=0;i<NDIM;i++) // have the random values [-1,1]*RandomMolDisplacement
    11481157          FillerTranslations[i] = RandomMolDisplacement*(random()/((rng_max-rng_min)/2.) - 1.);
    1149         DoLog(2) && (Log() << Verbose(2) << "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << "." << endl);
     1158        LOG(2, "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << ".");
    11501159
    11511160        // ... and rotation matrix
     
    11731182        if (FillIt) {
    11741183          Inserter = CurrentPosition + FillerTranslations;
    1175           DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is void point." << endl);
     1184          LOG(1, "INFO: Position at " << Inserter << " is void point.");
    11761185          // fill!
    11771186          Filling = filler->CopyMolecule();
     
    11951204          }
    11961205        } else {
    1197          DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is non-void point, within boundary or outside of MaxDistance." << endl);
     1206         LOG(1, "INFO: Position at " << Inserter << " is non-void point, within boundary or outside of MaxDistance.");
    11981207          continue;
    11991208        }
     
    12211230  }
    12221231
    1223   DoLog(0) && (Log() << Verbose(0) << MolList->ListOfMolecules.size() << " molecules have been inserted." << std::endl);
     1232  LOG(0, MolList->ListOfMolecules.size() << " molecules have been inserted.");
    12241233
    12251234  for (std::map<molecule *, LinkedCell *>::iterator ListRunner = LCList.begin(); !LCList.empty(); ListRunner = LCList.begin()) {
     
    12501259
    12511260  if (TesselStruct == NULL) {
    1252     DoLog(1) && (Log() << Verbose(1) << "Allocating Tesselation struct ..." << endl);
     1261    LOG(1, "Allocating Tesselation struct ...");
    12531262    TesselStruct= new Tesselation;
    12541263  } else {
    12551264    delete(TesselStruct);
    1256     DoLog(1) && (Log() << Verbose(1) << "Re-Allocating Tesselation struct ..." << endl);
     1265    LOG(1, "Re-Allocating Tesselation struct ...");
    12571266    TesselStruct = new Tesselation;
    12581267  }
     
    12671276  // 1. get starting triangle
    12681277  if (!TesselStruct->FindStartingTriangle(RADIUS, LCList)) {
    1269     DoeLog(0) && (eLog() << Verbose(0) << "No valid starting triangle found." << endl);
     1278    ELOG(0, "No valid starting triangle found.");
    12701279    //performCriticalExit();
    12711280  }
     
    12801289    (cerr << "There are " <<  TesselStruct->TrianglesOnBoundary.size() << " triangles and " << TesselStruct->OpenLines.size() << " open lines to scan for candidates." << endl);
    12811290    // 2a. print OpenLines without candidates
    1282     DoLog(1) && (Log() << Verbose(1) << "There are the following open lines to scan for a candidates:" << endl);
     1291    LOG(1, "There are the following open lines to scan for a candidates:");
    12831292    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    12841293      if (Runner->second->pointlist.empty())
    1285         DoLog(1) && (Log() << Verbose(1) << " " << *(Runner->second) << endl);
     1294        LOG(1, " " << *(Runner->second));
    12861295
    12871296    // 2b. find best candidate for each OpenLine
     
    12891298
    12901299    // 2c. print OpenLines with candidates again
    1291     DoLog(1) && (Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl);
     1300    LOG(1, "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:");
    12921301    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    1293       DoLog(1) && (Log() << Verbose(1) << " " << *(Runner->second) << endl);
     1302      LOG(1, " " << *(Runner->second));
    12941303
    12951304    // 2d. search for smallest ShortestAngle among all candidates
     
    12991308        baseline = Runner->second;
    13001309        ShortestAngle = baseline->ShortestAngle;
    1301         DoLog(1) && (Log() << Verbose(1) << "New best candidate is " << *baseline->BaseLine << " with point " << *(*baseline->pointlist.begin()) << " and angle " << baseline->ShortestAngle << endl);
     1310        LOG(1, "New best candidate is " << *baseline->BaseLine << " with point " << *(*baseline->pointlist.begin()) << " and angle " << baseline->ShortestAngle);
    13021311      }
    13031312    }
     
    13241333//  class TesselPoint *Runner = NULL;
    13251334//    Runner = *iter;
    1326 //    Log() << Verbose(1) << "Checking on " << Runner->Name << " ... " << endl;
     1335//    LOG(1, "Checking on " << Runner->Name << " ... ");
    13271336//    if (!->IsInnerPoint(Runner, LCList)) {
    1328 //      Log() << Verbose(2) << Runner->Name << " is outside of envelope, adding via degenerated triangles." << endl;
     1337//      LOG(2, Runner->Name << " is outside of envelope, adding via degenerated triangles.");
    13291338//      ->AddBoundaryPointByDegeneratedTriangle(Runner, LCList);
    13301339//    } else {
    1331 //      Log() << Verbose(2) << Runner->Name << " is inside of or on envelope." << endl;
     1340//      LOG(2, Runner->Name << " is inside of or on envelope.");
    13321341//    }
    13331342//  }
  • src/Tesselation/ellipsoid.cpp

    r50e4e5 r47d041  
    5555  double psi,theta,phi; // euler angles in ZX'Z'' convention
    5656
    57   //Log() << Verbose(3) << "Begin of SquaredDistanceToEllipsoid" << endl;
     57  //LOG(3, "Begin of SquaredDistanceToEllipsoid");
    5858
    5959  for(int i=0;i<3;i++)
     
    6262  // 1. translate coordinate system so that ellipsoid center is in origin
    6363  RefPoint = helper = x - EllipsoidCenter;
    64   //Log() << Verbose(4) << "Translated given point is at " << RefPoint << "." << endl;
     64  //LOG(4, "Translated given point is at " << RefPoint << ".");
    6565
    6666  // 2. transform coordinate system by inverse of rotation matrix and of diagonal matrix
     
    7979  helper *= Matrix;
    8080  helper.ScaleAll(InverseLength);
    81   //Log() << Verbose(4) << "Transformed RefPoint is at " << helper << "." << endl;
     81  //LOG(4, "Transformed RefPoint is at " << helper << ".");
    8282
    8383  // 3. construct intersection point with unit sphere and ray between origin and x
    8484  helper.Normalize(); // is simply normalizes vector in distance direction
    85   //Log() << Verbose(4) << "Transformed intersection is at " << helper << "." << endl;
     85  //LOG(4, "Transformed intersection is at " << helper << ".");
    8686
    8787  // 4. transform back the constructed intersection point
     
    100100  Matrix.set(2,2, cos(theta));
    101101  helper *= Matrix;
    102   //Log() << Verbose(4) << "Intersection is at " << helper << "." << endl;
     102  //LOG(4, "Intersection is at " << helper << ".");
    103103
    104104  // 5. determine distance between backtransformed point and x
    105105  distance = RefPoint.DistanceSquared(helper);
    106   //Log() << Verbose(4) << "Squared distance between intersection and RefPoint is " << distance << "." << endl;
     106  //LOG(4, "Squared distance between intersection and RefPoint is " << distance << ".");
    107107
    108108  return distance;
    109   //Log() << Verbose(3) << "End of SquaredDistanceToEllipsoid" << endl;
     109  //LOG(3, "End of SquaredDistanceToEllipsoid");
    110110};
    111111
     
    149149  }
    150150
    151   //Log() << Verbose(0) << "Current summed distance is " << SumDistance << "." << endl;
     151  //LOG(0, "Current summed distance is " << SumDistance << ".");
    152152  return SumDistance;
    153153};
     
    163163{
    164164  int status = GSL_SUCCESS;
    165   DoLog(2) && (Log() << Verbose(2) << "Begin of FitPointSetToEllipsoid " << endl);
     165  LOG(2, "Begin of FitPointSetToEllipsoid ");
    166166  if (N >= 3) { // check that enough points are given (9 d.o.f.)
    167167    struct EllipsoidMinimisation par;
     
    216216          EllipsoidAngle[i] = gsl_vector_get (s->x, i+6);
    217217        }
    218         DoLog(4) && (Log() << Verbose(4) << setprecision(3) << "Converged fit at: " << *EllipsoidCenter << ", lengths " << EllipsoidLength[0] << ", " << EllipsoidLength[1] << ", " << EllipsoidLength[2] << ", angles " << EllipsoidAngle[0] << ", " << EllipsoidAngle[1] << ", " << EllipsoidAngle[2] << " with summed distance " << s->fval << "." << endl);
     218        LOG(4, setprecision(3) << "Converged fit at: " << *EllipsoidCenter << ", lengths " << EllipsoidLength[0] << ", " << EllipsoidLength[1] << ", " << EllipsoidLength[2] << ", angles " << EllipsoidAngle[0] << ", " << EllipsoidAngle[1] << ", " << EllipsoidAngle[2] << " with summed distance " << s->fval << ".");
    219219      }
    220220
     
    226226
    227227  } else {
    228     DoLog(3) && (Log() << Verbose(3) << "Not enough points provided for fit to ellipsoid." << endl);
     228    LOG(3, "Not enough points provided for fit to ellipsoid.");
    229229    return false;
    230230  }
    231   DoLog(2) && (Log() << Verbose(2) << "End of FitPointSetToEllipsoid" << endl);
     231  LOG(2, "End of FitPointSetToEllipsoid");
    232232  if (status == GSL_SUCCESS)
    233233    return true;
     
    252252  int index;
    253253  TesselPoint *Candidate = NULL;
    254   DoLog(2) && (Log() << Verbose(2) << "Begin of PickRandomPointSet" << endl);
     254  LOG(2, "Begin of PickRandomPointSet");
    255255
    256256  // allocate array
     
    258258    x = new Vector[PointsToPick];
    259259  } else {
    260     DoeLog(2) && (eLog()<< Verbose(2) << "Given pointer to vector array seems already allocated." << endl);
     260    ELOG(2, "Given pointer to vector array seems already allocated.");
    261261  }
    262262
     
    282282    for(int i=0;i<NDIM;i++) // pick three random indices
    283283      LC->n[i] = ((int)random() % LC->N[i]);
    284     DoLog(2) && (Log() << Verbose(2) << "INFO: Center cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " ... ");
     284    LOG(2, "INFO: Center cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << ".");
    285285    // get random cell
    286286    const TesselPointSTLList *List = LC->GetCurrentCell();
     
    288288      continue;
    289289    }
    290     DoLog(2) && (Log() << Verbose(2) << "with No. " << LC->index << "." << endl);
    291 
    292     DoLog(2) && (Log() << Verbose(2) << "LC Intervals:");
     290    LOG(2, "INFO: Cell index is No. " << LC->index << ".");
     291
     292    if (DoLog(2)) {
     293      std::stringstream output;
     294      output << "LC Intervals:";
     295      for (int i=0;i<NDIM;i++)
     296        output << " [" << Nlower[i] << "," << Nupper[i] << "] ";
     297      LOG(2, output.str());
     298    }
     299
    293300    for (int i=0;i<NDIM;i++) {
    294301      Nlower[i] = ((LC->n[i]-1) >= 0) ? LC->n[i]-1 : 0;
    295302      Nupper[i] = ((LC->n[i]+1) < LC->N[i]) ? LC->n[i]+1 : LC->N[i]-1;
    296       DoLog(0) && (Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] ");
    297     }
    298     DoLog(0) && (Log() << Verbose(0) << endl);
     303    }
    299304
    300305    // count whether there are sufficient atoms in this cell+neighbors
     
    306311          PointsLeft += List->size();
    307312        }
    308     DoLog(2) && (Log() << Verbose(2) << "There are " << PointsLeft << " atoms in this neighbourhood." << endl);
     313    LOG(2, "There are " << PointsLeft << " atoms in this neighbourhood.");
    309314    if (PointsLeft < PointsToPick) {  // ensure that we can pick enough points in its neighbourhood at all.
    310315      continue;
     
    317322      current = PickedAtomNrs.find(index);  // not present?
    318323      if (current == PickedAtomNrs.end()) {
    319         //Log() << Verbose(2) << "Picking atom Nr. " << index << "." << endl;
     324        //LOG(2, "Picking atom Nr. " << index << ".");
    320325        PickedAtomNrs.insert(index);
    321326      }
     
    329334        for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    330335          const TesselPointSTLList *List = LC->GetCurrentCell();
    331 //          Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
     336//          LOG(2, "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points.");
    332337          if (List != NULL) {
    333338//            if (List->begin() != List->end())
    334 //              Log() << Verbose(2) << "Going through candidates ... " << endl;
     339//              LOG(2, "Going through candidates ... ");
    335340//            else
    336 //              Log() << Verbose(2) << "Cell is empty ... " << endl;
     341//              LOG(2, "Cell is empty ... ");
    337342            for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
    338343              if ((current != PickedAtomNrs.end()) && (*current == index)) {
    339344                Candidate = (*Runner);
    340                 DoLog(2) && (Log() << Verbose(2) << "Current picked node is " << (*Runner)->getName() << " with index " << index << "." << endl);
     345                LOG(2, "Current picked node is " << (*Runner)->getName() << " with index " << index << ".");
    341346                x[PointsPicked++] = Candidate->getPosition();    // we have one more atom picked
    342347                current++;    // next pre-picked atom
     
    345350            }
    346351//          } else {
    347 //            Log() << Verbose(2) << "List for this index not allocated!" << endl;
     352//            LOG(2, "List for this index not allocated!");
    348353          }
    349354        }
    350     DoLog(2) && (Log() << Verbose(2) << "The following points were picked: " << endl);
     355    LOG(2, "The following points were picked: ");
    351356    for (size_t i=0;i<PointsPicked;i++)
    352       DoLog(2) && (Log() << Verbose(2) << x[i] << endl);
     357      LOG(2, x[i]);
    353358    if (PointsPicked == PointsToPick)  // break out of loop if we have all
    354359      break;
    355360  } while(1);
    356361
    357   DoLog(2) && (Log() << Verbose(2) << "End of PickRandomPointSet" << endl);
     362  LOG(2, "End of PickRandomPointSet");
    358363};
    359364
     
    370375  double value, threshold;
    371376  PointMap *List = &T->PointsOnBoundary;
    372   DoLog(2) && (Log() << Verbose(2) << "Begin of PickRandomPointSet" << endl);
     377  LOG(2, "Begin of PickRandomPointSet");
    373378
    374379  // allocate array
     
    376381    x = new Vector[PointsToPick];
    377382  } else {
    378     DoeLog(2) && (eLog()<< Verbose(2) << "Given pointer to vector array seems already allocated." << endl);
     383    ELOG(2, "Given pointer to vector array seems already allocated.");
    379384  }
    380385
     
    386391      threshold = 1. - (double)(PointsToPick - PointsPicked)/(double)PointsLeft;
    387392      value = (double)random()/(double)(rng_max-rng_min);
    388       //Log() << Verbose(3) << "Current node is " << *Runner->second->node << " with " << value << " ... " << threshold << ": ";
    389393      if (value > threshold) {
    390394        x[PointsPicked] = (Runner->second->node->getPosition());
    391395        PointsPicked++;
    392         //Log() << Verbose(0) << "IN." << endl;
     396        //LOG(3, "Current node is " << *Runner->second->node << " with " << value << " ... " << threshold << ": IN.");
    393397      } else {
    394         //Log() << Verbose(0) << "OUT." << endl;
     398        //LOG(3, "Current node is " << *Runner->second->node << " with " << value << " ... " << threshold << ": OUT.");
    395399      }
    396400      PointsLeft--;
    397401    }
    398   DoLog(2) && (Log() << Verbose(2) << "The following points were picked: " << endl);
     402  LOG(2, "The following points were picked: ");
    399403  for (size_t i=0;i<PointsPicked;i++)
    400     DoLog(3) && (Log() << Verbose(3) << x[i] << endl);
    401 
    402   DoLog(2) && (Log() << Verbose(2) << "End of PickRandomPointSet" << endl);
     404    LOG(3, x[i]);
     405
     406  LOG(2, "End of PickRandomPointSet");
    403407};
    404408
     
    420424  double EllipsoidAngle[3];
    421425  double distance, MaxDistance, MinDistance;
    422   DoLog(0) && (Log() << Verbose(0) << "Begin of FindDistributionOfEllipsoids" << endl);
     426  LOG(0, "Begin of FindDistributionOfEllipsoids");
    423427
    424428  // construct center of gravity of boundary point set for initial ellipsoid center
     
    427431    Center += (Runner->second->node->getPosition());
    428432  Center.Scale(1./T->PointsOnBoundaryCount);
    429   DoLog(1) && (Log() << Verbose(1) << "Center is at " << Center << "." << endl);
     433  LOG(1, "Center is at " << Center << ".");
    430434
    431435  // Output header
     
    435439  // loop over desired number of parameter sets
    436440  for (;number >0;number--) {
    437     DoLog(1) && (Log() << Verbose(1) << "Determining data set " << number << " ... " << endl);
     441    LOG(1, "Determining data set " << number << " ... ");
    438442    // pick the point set
    439443    x = NULL;
     
    451455        MinDistance = distance;
    452456    }
    453     //Log() << Verbose(2) << "MinDistance " << MinDistance << ", MaxDistance " << MaxDistance << "." << endl;
     457    //LOG(2, "MinDistance " << MinDistance << ", MaxDistance " << MaxDistance << ".");
    454458    EllipsoidCenter = Center;  // use Center of Gravity as initial center of ellipsoid
    455459    for (int i=0;i<3;i++)
     
    461465    // fit the parameters
    462466    if (FitPointSetToEllipsoid(x, N, &EllipsoidCenter, &EllipsoidLength[0], &EllipsoidAngle[0])) {
    463       DoLog(1) && (Log() << Verbose(1) << "Picking succeeded!" << endl);
     467      LOG(1, "Picking succeeded!");
    464468      // output obtained parameter set
    465469      output << number << "\t";
     
    472476      output << endl;
    473477    } else { // increase N to pick one more
    474       DoLog(1) && (Log() << Verbose(1) << "Picking failed!" << endl);
     478      LOG(1, "Picking failed!");
    475479      number++;
    476480    }
     
    480484  output.close();
    481485
    482   DoLog(0) && (Log() << Verbose(0) << "End of FindDistributionOfEllipsoids" << endl);
    483 };
     486  LOG(0, "End of FindDistributionOfEllipsoids");
     487};
  • src/Tesselation/tesselation.cpp

    r50e4e5 r47d041  
    2222#include <fstream>
    2323#include <iomanip>
     24#include <sstream>
    2425
    2526#include "BoundaryPointSet.hpp"
     
    7677{
    7778  Info FunctionInfo(__func__);
    78   DoLog(0) && (Log() << Verbose(0) << "Free'ing TesselStruct ... " << endl);
     79  LOG(0, "Free'ing TesselStruct ... ");
    7980  for (TriangleMap::iterator runner = TrianglesOnBoundary.begin(); runner != TrianglesOnBoundary.end(); runner++) {
    8081    if (runner->second != NULL) {
     
    8283      runner->second = NULL;
    8384    } else
    84       DoeLog(1) && (eLog() << Verbose(1) << "The triangle " << runner->first << " has already been free'd." << endl);
    85   }
    86   DoLog(0) && (Log() << Verbose(0) << "This envelope was written to file " << TriangleFilesWritten << " times(s)." << endl);
     85      ELOG(1, "The triangle " << runner->first << " has already been free'd.");
     86  }
     87  LOG(0, "This envelope was written to file " << TriangleFilesWritten << " times(s).");
    8788}
    8889
     
    121122    }
    122123  }
    123   //    // listing distances
    124   //    Log() << Verbose(1) << "Listing DistanceMMap:";
    125   //    for(DistanceMultiMap::iterator runner = DistanceMMap.begin(); runner != DistanceMMap.end(); runner++) {
    126   //      Log() << Verbose(0) << " " << runner->first << "(" << *runner->second.first->second << ", " << *runner->second.second->second << ")";
    127   //    }
    128   //    Log() << Verbose(0) << endl;
     124//  // listing distances
     125//  if (DoLog(1)) {
     126//    std::stringstream output;
     127//    output << "Listing DistanceMMap:";
     128//    for(DistanceMultiMap::iterator runner = DistanceMMap.begin(); runner != DistanceMMap.end(); runner++) {
     129//      output << " " << runner->first << "(" << *runner->second.first->second << ", " << *runner->second.second->second << ")";
     130//    }
     131//    LOG(1, output.str());
     132//  }
    129133  // 4b2. pick three baselines forming a triangle
    130134  // 1. we take from the smallest sum of squared distance as the base line BC (with peak A) onward as the triangle candidate
     
    137141                        baseline->second.first->second->node->getPosition(),
    138142                        baseline->second.second->second->node->getPosition()).getNormal();
    139     DoLog(2) && (Log() << Verbose(2) << "Plane vector of candidate triangle is " << PlaneVector << endl);
     143    LOG(2, "Plane vector of candidate triangle is " << PlaneVector);
    140144    // 4. loop over all points
    141145    double sign = 0.;
     
    150154      if (fabs(distance) < 1e-4) // we need to have a small epsilon around 0 which is still ok
    151155        continue;
    152       DoLog(2) && (Log() << Verbose(2) << "Projection of " << checker->second->node->getName() << " yields distance of " << distance << "." << endl);
     156      LOG(2, "Projection of " << checker->second->node->getName() << " yields distance of " << distance << ".");
    153157      tmp = distance / fabs(distance);
    154158      // 4b. Any have different sign to than before? (i.e. would lie outside convex hull with this starting triangle)
    155159      if ((sign != 0) && (tmp != sign)) {
    156160        // 4c. If so, break 4. loop and continue with next candidate in 1. loop
    157         DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node->getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leaves " << checker->second->node->getName() << " outside the convex hull." << endl);
     161        LOG(2, "Current candidates: " << A->second->node->getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leaves " << checker->second->node->getName() << " outside the convex hull.");
    158162        break;
    159163      } else { // note the sign for later
    160         DoLog(2) && (Log() << Verbose(2) << "Current candidates: " << A->second->node->getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leave " << checker->second->node->getName() << " inside the convex hull." << endl);
     164        LOG(2, "Current candidates: " << A->second->node->getName() << "," << baseline->second.first->second->node->getName() << "," << baseline->second.second->second->node->getName() << " leave " << checker->second->node->getName() << " inside the convex hull.");
    161165        sign = tmp;
    162166      }
     
    178182    // 5. come this far, all on same side? Then break 1. loop and construct triangle
    179183    if (checker == PointsOnBoundary.end()) {
    180       DoLog(2) && (Log() << Verbose(2) << "Looks like we have a candidate!" << endl);
     184      LOG(2, "Looks like we have a candidate!");
    181185      break;
    182186    }
     
    202206    }
    203207
    204     DoLog(1) && (Log() << Verbose(1) << "Starting triangle is " << *BTS << "." << endl);
     208    LOG(1, "Starting triangle is " << *BTS << ".");
    205209  } else {
    206     DoeLog(0) && (eLog() << Verbose(0) << "No starting triangle found." << endl);
     210    ELOG(0, "No starting triangle found.");
    207211  }
    208212}
     
    243247        // get peak point with respect to this base line's only triangle
    244248        BTS = baseline->second->triangles.begin()->second; // there is only one triangle so far
    245         DoLog(0) && (Log() << Verbose(0) << "Current baseline is between " << *(baseline->second) << "." << endl);
     249        LOG(0, "Current baseline is between " << *(baseline->second) << ".");
    246250        for (int i = 0; i < 3; i++)
    247251          if ((BTS->endpoints[i] != baseline->second->endpoints[0]) && (BTS->endpoints[i] != baseline->second->endpoints[1]))
    248252            peak = BTS->endpoints[i];
    249         DoLog(1) && (Log() << Verbose(1) << " and has peak " << *peak << "." << endl);
     253        LOG(1, " and has peak " << *peak << ".");
    250254
    251255        // prepare some auxiliary vectors
     
    260264          CenterVector += BTS->getEndpoint(i);
    261265        CenterVector.Scale(1. / 3.);
    262         DoLog(2) && (Log() << Verbose(2) << "CenterVector of base triangle is " << CenterVector << endl);
     266        LOG(2, "CenterVector of base triangle is " << CenterVector);
    263267
    264268        // normal vector of triangle
     
    266270        BTS->GetNormalVector(NormalVector);
    267271        NormalVector = BTS->NormalVector;
    268         DoLog(2) && (Log() << Verbose(2) << "NormalVector of base triangle is " << NormalVector << endl);
     272        LOG(2, "NormalVector of base triangle is " << NormalVector);
    269273
    270274        // vector in propagation direction (out of triangle)
     
    272276        PropagationVector = Plane(BaseLine, NormalVector,0).getNormal();
    273277        TempVector = CenterVector - (baseline->second->endpoints[0]->node->getPosition()); // TempVector is vector on triangle plane pointing from one baseline egde towards center!
    274         //Log() << Verbose(0) << "Projection of propagation onto temp: " << PropagationVector.Projection(&TempVector) << "." << endl;
     278        //LOG(0, "Projection of propagation onto temp: " << PropagationVector.Projection(&TempVector) << ".");
    275279        if (PropagationVector.ScalarProduct(TempVector) > 0) // make sure normal propagation vector points outward from baseline
    276280          PropagationVector.Scale(-1.);
    277         DoLog(2) && (Log() << Verbose(2) << "PropagationVector of base triangle is " << PropagationVector << endl);
     281        LOG(2, "PropagationVector of base triangle is " << PropagationVector);
    278282        winner = PointsOnBoundary.end();
    279283
     
    281285        for (PointMap::iterator target = PointsOnBoundary.begin(); target != PointsOnBoundary.end(); target++) {
    282286          if ((target->second != baseline->second->endpoints[0]) && (target->second != baseline->second->endpoints[1])) { // don't take the same endpoints
    283             DoLog(1) && (Log() << Verbose(1) << "Target point is " << *(target->second) << ":" << endl);
     287            LOG(1, "Target point is " << *(target->second) << ":");
    284288
    285289            // first check direction, so that triangles don't intersect
     
    287291            VirtualNormalVector.ProjectOntoPlane(NormalVector);
    288292            TempAngle = VirtualNormalVector.Angle(PropagationVector);
    289             DoLog(2) && (Log() << Verbose(2) << "VirtualNormalVector is " << VirtualNormalVector << " and PropagationVector is " << PropagationVector << "." << endl);
     293            LOG(2, "VirtualNormalVector is " << VirtualNormalVector << " and PropagationVector is " << PropagationVector << ".");
    290294            if (TempAngle > (M_PI / 2.)) { // no bends bigger than Pi/2 (90 degrees)
    291               DoLog(2) && (Log() << Verbose(2) << "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", bad direction!" << endl);
     295              LOG(2, "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", bad direction!");
    292296              continue;
    293297            } else
    294               DoLog(2) && (Log() << Verbose(2) << "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", good direction!" << endl);
     298              LOG(2, "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", good direction!");
    295299
    296300            // check first and second endpoint (if any connecting line goes to target has at least not more than 1 triangle)
     
    298302            LineChecker[1] = baseline->second->endpoints[1]->lines.find(target->first);
    299303            if (((LineChecker[0] != baseline->second->endpoints[0]->lines.end()) && (LineChecker[0]->second->triangles.size() == 2))) {
    300               DoLog(2) && (Log() << Verbose(2) << *(baseline->second->endpoints[0]) << " has line " << *(LineChecker[0]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[0]->second->triangles.size() << " triangles." << endl);
     304              LOG(2, *(baseline->second->endpoints[0]) << " has line " << *(LineChecker[0]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[0]->second->triangles.size() << " triangles.");
    301305              continue;
    302306            }
    303307            if (((LineChecker[1] != baseline->second->endpoints[1]->lines.end()) && (LineChecker[1]->second->triangles.size() == 2))) {
    304               DoLog(2) && (Log() << Verbose(2) << *(baseline->second->endpoints[1]) << " has line " << *(LineChecker[1]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[1]->second->triangles.size() << " triangles." << endl);
     308              LOG(2, *(baseline->second->endpoints[1]) << " has line " << *(LineChecker[1]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[1]->second->triangles.size() << " triangles.");
    305309              continue;
    306310            }
     
    308312            // check whether the envisaged triangle does not already exist (if both lines exist and have same endpoint)
    309313            if ((((LineChecker[0] != baseline->second->endpoints[0]->lines.end()) && (LineChecker[1] != baseline->second->endpoints[1]->lines.end()) && (GetCommonEndpoint(LineChecker[0]->second, LineChecker[1]->second) == peak)))) {
    310               DoLog(4) && (Log() << Verbose(4) << "Current target is peak!" << endl);
     314              LOG(4, "Current target is peak!");
    311315              continue;
    312316            }
     
    317321            helper.ProjectOntoPlane(TempVector);
    318322            if (fabs(helper.NormSquared()) < MYEPSILON) {
    319               DoLog(2) && (Log() << Verbose(2) << "Chosen set of vectors is linear dependent." << endl);
     323              LOG(2, "Chosen set of vectors is linear dependent.");
    320324              continue;
    321325            }
     
    335339            // calculate angle
    336340            TempAngle = NormalVector.Angle(VirtualNormalVector);
    337             DoLog(2) && (Log() << Verbose(2) << "NormalVector is " << VirtualNormalVector << " and the angle is " << TempAngle << "." << endl);
     341            LOG(2, "NormalVector is " << VirtualNormalVector << " and the angle is " << TempAngle << ".");
    338342            if ((SmallestAngle - TempAngle) > MYEPSILON) { // set to new possible winner
    339343              SmallestAngle = TempAngle;
    340344              winner = target;
    341               DoLog(2) && (Log() << Verbose(2) << "New winner " << *winner->second->node << " due to smaller angle between normal vectors." << endl);
     345              LOG(2, "New winner " << *winner->second->node << " due to smaller angle between normal vectors.");
    342346            } else if (fabs(SmallestAngle - TempAngle) < MYEPSILON) { // check the angle to propagation, both possible targets are in one plane! (their normals have same angle)
    343347              // hence, check the angles to some normal direction from our base line but in this common plane of both targets...
     
    354358                SmallestAngle = TempAngle;
    355359                winner = target;
    356                 DoLog(2) && (Log() << Verbose(2) << "New winner " << *winner->second->node << " due to smaller angle " << TempAngle << " to propagation direction." << endl);
     360                LOG(2, "New winner " << *winner->second->node << " due to smaller angle " << TempAngle << " to propagation direction.");
    357361              } else
    358                 DoLog(2) && (Log() << Verbose(2) << "Keeping old winner " << *winner->second->node << " due to smaller angle to propagation direction." << endl);
     362                LOG(2, "Keeping old winner " << *winner->second->node << " due to smaller angle to propagation direction.");
    359363            } else
    360               DoLog(2) && (Log() << Verbose(2) << "Keeping old winner " << *winner->second->node << " due to smaller angle between normal vectors." << endl);
     364              LOG(2, "Keeping old winner " << *winner->second->node << " due to smaller angle between normal vectors.");
    361365          }
    362366        } // end of loop over all boundary points
     
    364368        // 5b. The point of the above whose triangle has the greatest angle with the triangle the current line belongs to (it only belongs to one, remember!): New triangle
    365369        if (winner != PointsOnBoundary.end()) {
    366           DoLog(0) && (Log() << Verbose(0) << "Winning target point is " << *(winner->second) << " with angle " << SmallestAngle << "." << endl);
     370          LOG(0, "Winning target point is " << *(winner->second) << " with angle " << SmallestAngle << ".");
    367371          // create the lins of not yet present
    368372          BLS[0] = baseline->second;
     
    394398          TrianglesOnBoundaryCount++;
    395399        } else {
    396           DoeLog(2) && (eLog() << Verbose(2) << "I could not determine a winner for this baseline " << *(baseline->second) << "." << endl);
     400          ELOG(2, "I could not determine a winner for this baseline " << *(baseline->second) << ".");
    397401        }
    398402
    399403        // 5d. If the set of lines is not yet empty, go to 5. and continue
    400404      } else
    401         DoLog(0) && (Log() << Verbose(0) << "Baseline candidate " << *(baseline->second) << " has a triangle count of " << baseline->second->triangles.size() << "." << endl);
     405        LOG(0, "Baseline candidate " << *(baseline->second) << " has a triangle count of " << baseline->second->triangles.size() << ".");
    402406  } while (flag);
    403407
     
    434438    }
    435439    Walker = cloud.GetPoint();
    436     DoLog(0) && (Log() << Verbose(0) << "Current point is " << *Walker << "." << endl);
     440    LOG(0, "Current point is " << *Walker << ".");
    437441    // get the next triangle
    438442    triangles = FindClosestTrianglesToVector(Walker->getPosition(), BoundaryPoints);
     
    443447    delete triangles;
    444448    if ((BTS == NULL) || (BTS->ContainsBoundaryPoint(Walker))) {
    445       DoLog(0) && (Log() << Verbose(0) << "No triangles found, probably a tesselation point itself." << endl);
     449      LOG(0, "No triangles found, probably a tesselation point itself.");
    446450      cloud.GoToNext();
    447451      continue;
    448452    } else {
    449453    }
    450     DoLog(0) && (Log() << Verbose(0) << "Closest triangle is " << *BTS << "." << endl);
     454    LOG(0, "Closest triangle is " << *BTS << ".");
    451455    // get the intersection point
    452456    if (BTS->GetIntersectionInsideTriangle(*Center, Walker->getPosition(), Intersection)) {
    453       DoLog(0) && (Log() << Verbose(0) << "We have an intersection at " << Intersection << "." << endl);
     457      LOG(0, "We have an intersection at " << Intersection << ".");
    454458      // we have the intersection, check whether in- or outside of boundary
    455459      if ((Center->DistanceSquared(Walker->getPosition()) - Center->DistanceSquared(Intersection)) < -MYEPSILON) {
    456460        // inside, next!
    457         DoLog(0) && (Log() << Verbose(0) << *Walker << " is inside wrt triangle " << *BTS << "." << endl);
     461        LOG(0, *Walker << " is inside wrt triangle " << *BTS << ".");
    458462      } else {
    459463        // outside!
    460         DoLog(0) && (Log() << Verbose(0) << *Walker << " is outside wrt triangle " << *BTS << "." << endl);
     464        LOG(0, *Walker << " is outside wrt triangle " << *BTS << ".");
    461465        class BoundaryLineSet *OldLines[3], *NewLines[3];
    462466        class BoundaryPointSet *OldPoints[3], *NewPoint;
     
    468472        Normal = BTS->NormalVector;
    469473        // add Walker to boundary points
    470         DoLog(0) && (Log() << Verbose(0) << "Adding " << *Walker << " to BoundaryPoints." << endl);
     474        LOG(0, "Adding " << *Walker << " to BoundaryPoints.");
    471475        AddFlag = true;
    472476        if (AddBoundaryPoint(Walker, 0))
     
    475479          continue;
    476480        // remove triangle
    477         DoLog(0) && (Log() << Verbose(0) << "Erasing triangle " << *BTS << "." << endl);
     481        LOG(0, "Erasing triangle " << *BTS << ".");
    478482        TrianglesOnBoundary.erase(BTS->Nr);
    479483        delete (BTS);
     
    483487          BPS[1] = OldPoints[i];
    484488          NewLines[i] = new class BoundaryLineSet(BPS, LinesOnBoundaryCount);
    485           DoLog(1) && (Log() << Verbose(1) << "Creating new line " << *NewLines[i] << "." << endl);
     489          LOG(1, "Creating new line " << *NewLines[i] << ".");
    486490          LinesOnBoundary.insert(LinePair(LinesOnBoundaryCount, NewLines[i])); // no need for check for unique insertion as BPS[0] is definitely a new one
    487491          LinesOnBoundaryCount++;
     
    494498            if (NewLines[j]->IsConnectedTo(BLS[0])) {
    495499              if (n > 2) {
    496                 DoeLog(2) && (eLog() << Verbose(2) << BLS[0] << " connects to all of the new lines?!" << endl);
     500                ELOG(2, BLS[0] << " connects to all of the new lines?!");
    497501                return false;
    498502              } else
     
    505509          BTS->GetNormalVector(Normal);
    506510          Normal.Scale(-1.);
    507           DoLog(0) && (Log() << Verbose(0) << "Created new triangle " << *BTS << "." << endl);
     511          LOG(0, "Created new triangle " << *BTS << ".");
    508512          TrianglesOnBoundary.insert(TrianglePair(TrianglesOnBoundaryCount, BTS));
    509513          TrianglesOnBoundaryCount++;
     
    511515      }
    512516    } else { // something is wrong with FindClosestTriangleToPoint!
    513       DoeLog(1) && (eLog() << Verbose(1) << "The closest triangle did not produce an intersection!" << endl);
     517      ELOG(1, "The closest triangle did not produce an intersection!");
    514518      SuccessFlag = false;
    515519      break;
     
    562566  } else {
    563567    delete TPS[n];
    564     DoLog(0) && (Log() << Verbose(0) << "Node " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary." << endl);
     568    LOG(0, "Node " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary.");
    565569    TPS[n] = (InsertUnique.first)->second;
    566570  }
     
    599603  BoundaryLineSet *WinningLine = NULL;
    600604  if (FindLine != a->lines.end()) {
    601     DoLog(1) && (Log() << Verbose(1) << "INFO: There is at least one line between " << *a << " and " << *b << ": " << *(FindLine->second) << "." << endl);
     605    LOG(1, "INFO: There is at least one line between " << *a << " and " << *b << ": " << *(FindLine->second) << ".");
    602606
    603607    pair<LineMap::iterator, LineMap::iterator> FindPair;
     
    605609
    606610    for (FindLine = FindPair.first; (FindLine != FindPair.second) && (insertNewLine); FindLine++) {
    607       DoLog(1) && (Log() << Verbose(1) << "INFO: Checking line " << *(FindLine->second) << " ..." << endl);
     611      LOG(1, "INFO: Checking line " << *(FindLine->second) << " ...");
    608612      // If there is a line with less than two attached triangles, we don't need a new line.
    609613      if (FindLine->second->triangles.size() == 1) {
    610614        CandidateMap::iterator Finder = OpenLines.find(FindLine->second);
    611615        if (!Finder->second->pointlist.empty())
    612           DoLog(1) && (Log() << Verbose(1) << "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << "." << endl);
     616          LOG(1, "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
    613617        else
    614           DoLog(1) && (Log() << Verbose(1) << "INFO: line " << *(FindLine->second) << " is open with no candidate." << endl);
     618          LOG(1, "INFO: line " << *(FindLine->second) << " is open with no candidate.");
    615619        // get open line
    616620        for (TesselPointList::const_iterator CandidateChecker = Finder->second->pointlist.begin(); CandidateChecker != Finder->second->pointlist.end(); ++CandidateChecker) {
    617621          if ((*(CandidateChecker) == candidate->node) && (OptCenter == NULL || OptCenter->DistanceSquared(Finder->second->OptCenter) < MYEPSILON )) { // stop searching if candidate matches
    618             DoLog(1) && (Log() << Verbose(1) << "ACCEPT: Candidate " << *(*CandidateChecker) << " has the right center " << Finder->second->OptCenter << "." << endl);
     622            LOG(1, "ACCEPT: Candidate " << *(*CandidateChecker) << " has the right center " << Finder->second->OptCenter << ".");
    619623            insertNewLine = false;
    620624            WinningLine = FindLine->second;
    621625            break;
    622626          } else {
    623             DoLog(1) && (Log() << Verbose(1) << "REJECT: Candidate " << *(*CandidateChecker) << "'s center " << Finder->second->OptCenter << " does not match desired on " << *OptCenter << "." << endl);
     627            LOG(1, "REJECT: Candidate " << *(*CandidateChecker) << "'s center " << Finder->second->OptCenter << " does not match desired on " << *OptCenter << ".");
    624628          }
    625629        }
     
    647651{
    648652  Info FunctionInfo(__func__);
    649   DoLog(0) && (Log() << Verbose(0) << "Adding open line [" << LinesOnBoundaryCount << "|" << *(a->node) << " and " << *(b->node) << "." << endl);
     653  LOG(0, "Adding open line [" << LinesOnBoundaryCount << "|" << *(a->node) << " and " << *(b->node) << ".");
    650654  BPS[0] = a;
    651655  BPS[1] = b;
     
    669673{
    670674  Info FunctionInfo(__func__);
    671   DoLog(0) && (Log() << Verbose(0) << "Using existing line " << *Line << endl);
     675  LOG(0, "Using existing line " << *Line);
    672676
    673677  // set endpoints and line
     
    678682  CandidateMap::iterator CandidateLine = OpenLines.find(BLS[n]);
    679683  if (CandidateLine != OpenLines.end()) {
    680     DoLog(1) && (Log() << Verbose(1) << " Removing line from OpenLines." << endl);
     684    LOG(1, " Removing line from OpenLines.");
    681685    delete (CandidateLine->second);
    682686    OpenLines.erase(CandidateLine);
    683687  } else {
    684     DoeLog(1) && (eLog() << Verbose(1) << "Line exists and is attached to less than two triangles, but not in OpenLines!" << endl);
     688    ELOG(1, "Line exists and is attached to less than two triangles, but not in OpenLines!");
    685689  }
    686690}
     
    693697{
    694698  Info FunctionInfo(__func__);
    695   DoLog(1) && (Log() << Verbose(1) << "Adding triangle to global TrianglesOnBoundary map." << endl);
     699  LOG(1, "Adding triangle to global TrianglesOnBoundary map.");
    696700
    697701  // add triangle to global map
     
    713717{
    714718  Info FunctionInfo(__func__);
    715   DoLog(0) && (Log() << Verbose(0) << "Adding triangle to global TrianglesOnBoundary map." << endl);
     719  LOG(0, "Adding triangle to global TrianglesOnBoundary map.");
    716720
    717721  // add triangle to global map
     
    737741  for (int i = 0; i < 3; i++) {
    738742    if (triangle->lines[i] != NULL) {
    739       DoLog(0) && (Log() << Verbose(0) << "Removing triangle Nr." << triangle->Nr << " in line " << *triangle->lines[i] << "." << endl);
     743      LOG(0, "Removing triangle Nr." << triangle->Nr << " in line " << *triangle->lines[i] << ".");
    740744      triangle->lines[i]->triangles.erase(triangle->Nr);
     745      std::stringstream output;
     746      output << "INFO: " << *triangle->lines[i] << " is ";
    741747      if (triangle->lines[i]->triangles.empty()) {
    742         DoLog(0) && (Log() << Verbose(0) << *triangle->lines[i] << " is no more attached to any triangle, erasing." << endl);
     748        output << "no more attached to any triangle, erasing.";
    743749        RemoveTesselationLine(triangle->lines[i]);
    744750      } else {
    745         DoLog(0) && (Log() << Verbose(0) << *triangle->lines[i] << " is still attached to another triangle: " << endl);
     751        output << "still attached to another triangle: ";
    746752        OpenLines.insert(pair<BoundaryLineSet *, CandidateForTesselation *> (triangle->lines[i], NULL));
    747753        for (TriangleMap::iterator TriangleRunner = triangle->lines[i]->triangles.begin(); TriangleRunner != triangle->lines[i]->triangles.end(); TriangleRunner++)
    748           DoLog(0) && (Log() << Verbose(0) << "\t[" << (TriangleRunner->second)->Nr << "|" << *((TriangleRunner->second)->endpoints[0]) << ", " << *((TriangleRunner->second)->endpoints[1]) << ", " << *((TriangleRunner->second)->endpoints[2]) << "] \t");
    749         DoLog(0) && (Log() << Verbose(0) << endl);
    750         //        for (int j=0;j<2;j++) {
    751         //          Log() << Verbose(0) << "Lines of endpoint " << *(triangle->lines[i]->endpoints[j]) << ": ";
    752         //          for(LineMap::iterator LineRunner = triangle->lines[i]->endpoints[j]->lines.begin(); LineRunner != triangle->lines[i]->endpoints[j]->lines.end(); LineRunner++)
    753         //            Log() << Verbose(0) << "[" << *(LineRunner->second) << "] \t";
    754         //          Log() << Verbose(0) << endl;
    755         //        }
     754          output << "\t[" << (TriangleRunner->second)->Nr << "|" << *((TriangleRunner->second)->endpoints[0]) << ", " << *((TriangleRunner->second)->endpoints[1]) << ", " << *((TriangleRunner->second)->endpoints[2]) << "] \t";
    756755      }
     756      LOG(1, output.str());
    757757      triangle->lines[i] = NULL; // free'd or not: disconnect
    758758    } else
    759       DoeLog(1) && (eLog() << Verbose(1) << "This line " << i << " has already been free'd." << endl);
     759      ELOG(1, "This line " << i << " has already been free'd.");
    760760  }
    761761
    762762  if (TrianglesOnBoundary.erase(triangle->Nr))
    763     DoLog(0) && (Log() << Verbose(0) << "Removing triangle Nr. " << triangle->Nr << "." << endl);
     763    LOG(0, "Removing triangle Nr. " << triangle->Nr << ".");
    764764  delete (triangle);
    765765}
     
    793793        for (LineMap::iterator Runner = erasor.first; Runner != erasor.second; Runner++)
    794794          if ((*Runner).second == line) {
    795             DoLog(0) && (Log() << Verbose(0) << "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << "." << endl);
     795            LOG(0, "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
    796796            line->endpoints[i]->lines.erase(Runner);
    797797            break;
     
    799799      } else { // there's just a single line left
    800800        if (line->endpoints[i]->lines.erase(line->Nr))
    801           DoLog(0) && (Log() << Verbose(0) << "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << "." << endl);
     801          LOG(0, "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
    802802      }
    803803      if (line->endpoints[i]->lines.empty()) {
    804         DoLog(0) && (Log() << Verbose(0) << *line->endpoints[i] << " has no more lines it's attached to, erasing." << endl);
     804        LOG(0, *line->endpoints[i] << " has no more lines it's attached to, erasing.");
    805805        RemoveTesselationPoint(line->endpoints[i]);
    806       } else {
    807         DoLog(0) && (Log() << Verbose(0) << *line->endpoints[i] << " has still lines it's attached to: ");
     806      } else if (DoLog(0)) {
     807        std::stringstream output;
     808        output << *line->endpoints[i] << " has still lines it's attached to: ";
    808809        for (LineMap::iterator LineRunner = line->endpoints[i]->lines.begin(); LineRunner != line->endpoints[i]->lines.end(); LineRunner++)
    809           DoLog(0) && (Log() << Verbose(0) << "[" << *(LineRunner->second) << "] \t");
    810         DoLog(0) && (Log() << Verbose(0) << endl);
     810          output << "[" << *(LineRunner->second) << "] \t";
     811        LOG(0, output.str());
    811812      }
    812813      line->endpoints[i] = NULL; // free'd or not: disconnect
    813814    } else
    814       DoeLog(1) && (eLog() << Verbose(1) << "Endpoint " << i << " has already been free'd." << endl);
     815      ELOG(1, "Endpoint " << i << " has already been free'd.");
    815816  }
    816817  if (!line->triangles.empty())
    817     DoeLog(2) && (eLog() << Verbose(2) << "Memory Leak! I " << *line << " am still connected to some triangles." << endl);
     818    ELOG(2, "Memory Leak! I " << *line << " am still connected to some triangles.");
    818819
    819820  if (LinesOnBoundary.erase(line->Nr))
    820     DoLog(0) && (Log() << Verbose(0) << "Removing line Nr. " << line->Nr << "." << endl);
     821    LOG(0, "Removing line Nr. " << line->Nr << ".");
    821822  delete (line);
    822823}
     
    834835    return;
    835836  if (PointsOnBoundary.erase(point->Nr))
    836     DoLog(0) && (Log() << Verbose(0) << "Removing point Nr. " << point->Nr << "." << endl);
     837    LOG(0, "Removing point Nr. " << point->Nr << ".");
    837838  delete (point);
    838839}
     
    851852  Info FunctionInfo(__func__);
    852853
    853   DoLog(1) && (Log() << Verbose(1) << "INFO: Checking whether sphere contains no others points ..." << endl);
     854  LOG(1, "INFO: Checking whether sphere contains no others points ...");
    854855  bool flag = true;
    855856
    856   DoLog(1) && (Log() << Verbose(1) << "Check by: draw sphere {" << CandidateLine.OtherOptCenter[0] << " " << CandidateLine.OtherOptCenter[1] << " " << CandidateLine.OtherOptCenter[2] << "} radius " << RADIUS << " resolution 30" << endl);
     857  LOG(1, "Check by: draw sphere {" << CandidateLine.OtherOptCenter[0] << " " << CandidateLine.OtherOptCenter[1] << " " << CandidateLine.OtherOptCenter[2] << "} radius " << RADIUS << " resolution 30");
    857858  // get all points inside the sphere
    858859  TesselPointList *ListofPoints = LC->GetPointsInsideSphere(RADIUS, &CandidateLine.OtherOptCenter);
    859860
    860   DoLog(1) && (Log() << Verbose(1) << "The following atoms are inside sphere at " << CandidateLine.OtherOptCenter << ":" << endl);
     861  LOG(1, "The following atoms are inside sphere at " << CandidateLine.OtherOptCenter << ":");
    861862  for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    862     DoLog(1) && (Log() << Verbose(1) << "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << "." << endl);
     863    LOG(1, "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
    863864
    864865  // remove triangles's endpoints
     
    872873  // check for other points
    873874  if (!ListofPoints->empty()) {
    874     DoLog(1) && (Log() << Verbose(1) << "CheckDegeneracy: There are still " << ListofPoints->size() << " points inside the sphere." << endl);
     875    LOG(1, "CheckDegeneracy: There are still " << ListofPoints->size() << " points inside the sphere.");
    875876    flag = false;
    876     DoLog(1) && (Log() << Verbose(1) << "External atoms inside of sphere at " << CandidateLine.OtherOptCenter << ":" << endl);
     877    LOG(1, "External atoms inside of sphere at " << CandidateLine.OtherOptCenter << ":");
    877878    for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    878       DoLog(1) && (Log() << Verbose(1) << "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << "." << endl);
     879      LOG(1, "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
    879880  }
    880881  delete (ListofPoints);
     
    917918          for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) {
    918919            TriangleMap *triangles = &FindLine->second->triangles;
    919             DoLog(1) && (Log() << Verbose(1) << "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << "." << endl);
     920            LOG(1, "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << ".");
    920921            for (TriangleMap::const_iterator FindTriangle = triangles->begin(); FindTriangle != triangles->end(); FindTriangle++) {
    921922              if (FindTriangle->second->IsPresentTupel(Points)) {
     
    923924              }
    924925            }
    925             DoLog(1) && (Log() << Verbose(1) << "end." << endl);
     926            LOG(1, "end.");
    926927          }
    927928          // Only one of the triangle lines must be considered for the triangle count.
    928           //Log() << Verbose(0) << "Found " << adjacentTriangleCount << " adjacent triangles for the point set." << endl;
     929          //LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    929930          //return adjacentTriangleCount;
    930931        }
     
    933934  }
    934935
    935   DoLog(0) && (Log() << Verbose(0) << "Found " << adjacentTriangleCount << " adjacent triangles for the point set." << endl);
     936  LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    936937  return adjacentTriangleCount;
    937938}
     
    978979          }
    979980          // Only one of the triangle lines must be considered for the triangle count.
    980           //Log() << Verbose(0) << "Found " << adjacentTriangleCount << " adjacent triangles for the point set." << endl;
     981          //LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    981982          //return adjacentTriangleCount;
    982983        }
     
    10281029      for (LC->n[map[2]] = 0; LC->n[map[2]] < LC->N[map[2]]; LC->n[map[2]]++) {
    10291030        const TesselPointSTLList *List = LC->GetCurrentCell();
    1030         //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
     1031        //LOG(1, "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << ".");
    10311032        if (List != NULL) {
    10321033          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
    10331034            if ((*Runner)->at(map[0]) > maxCoordinate[map[0]]) {
    1034               DoLog(1) && (Log() << Verbose(1) << "New maximal for axis " << map[0] << " node is " << *(*Runner) << " at " << (*Runner)->getPosition() << "." << endl);
     1035              LOG(1, "New maximal for axis " << map[0] << " node is " << *(*Runner) << " at " << (*Runner)->getPosition() << ".");
    10351036              maxCoordinate[map[0]] = (*Runner)->at(map[0]);
    10361037              MaxPoint[map[0]] = (*Runner);
     
    10381039          }
    10391040        } else {
    1040           DoeLog(1) && (eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
     1041          ELOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!");
    10411042        }
    10421043      }
    10431044  }
    10441045
    1045   DoLog(1) && (Log() << Verbose(1) << "Found maximum coordinates: ");
    1046   for (int i = 0; i < NDIM; i++)
    1047     DoLog(0) && (Log() << Verbose(0) << i << ": " << *MaxPoint[i] << "\t");
    1048   DoLog(0) && (Log() << Verbose(0) << endl);
     1046  if (DoLog(1)) {
     1047    std::stringstream output;
     1048    output << "Found maximum coordinates: ";
     1049    for (int i = 0; i < NDIM; i++)
     1050      output << i << ": " << *MaxPoint[i] << "\t";
     1051    LOG(1, output.str());
     1052  }
    10491053
    10501054  BTS = NULL;
     
    10541058    BaseLine = new BoundaryLineSet();
    10551059    BaseLine->endpoints[0] = new BoundaryPointSet(MaxPoint[k]);
    1056     DoLog(0) && (Log() << Verbose(0) << "Coordinates of start node at " << *BaseLine->endpoints[0]->node << "." << endl);
     1060    LOG(0, "Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
    10571061
    10581062    double ShortestAngle;
     
    10881092
    10891093    // adding point 1 and point 2 and add the line between them
    1090     DoLog(0) && (Log() << Verbose(0) << "Coordinates of start node at " << *BaseLine->endpoints[0]->node << "." << endl);
    1091     DoLog(0) && (Log() << Verbose(0) << "Found second point is at " << *BaseLine->endpoints[1]->node << ".\n");
    1092 
    1093     //Log() << Verbose(1) << "INFO: OldSphereCenter is at " << helper << ".\n";
     1094    LOG(0, "Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
     1095    LOG(0, "Found second point is at " << *BaseLine->endpoints[1]->node << ".");
     1096
     1097    //LOG(1, "INFO: OldSphereCenter is at " << helper << ".");
    10941098    CandidateForTesselation OptCandidates(BaseLine);
    10951099    FindThirdPointForTesselation(NormalVector, SearchDirection, SphereCenter, OptCandidates, NULL, RADIUS, LC);
    1096     DoLog(0) && (Log() << Verbose(0) << "List of third Points is:" << endl);
     1100    LOG(0, "List of third Points is:");
    10971101    for (TesselPointList::iterator it = OptCandidates.pointlist.begin(); it != OptCandidates.pointlist.end(); it++) {
    1098       DoLog(0) && (Log() << Verbose(0) << " " << *(*it) << endl);
     1102      LOG(0, " " << *(*it));
    10991103    }
    11001104    if (!OptCandidates.pointlist.empty()) {
     
    11501154//      if (FindLine != (FindPoint->second)->lines.end()) {
    11511155//        Line = FindLine->second;
    1152 //        Log() << Verbose(0) << "Found line " << *Line << "." << endl;
     1156//        LOG(0, "Found line " << *Line << ".");
    11531157//        if (Line->triangles.size() == 1) {
    11541158//          T = Line->triangles.begin()->second;
     
    11671171//            CircleRadius = RADIUS*RADIUS - radius/4.;
    11681172//            CirclePlaneNormal.Normalize();
    1169 //            //Log() << Verbose(1) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl;
     1173//            //LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
    11701174//
    11711175//            // construct old center
     
    11761180//            OldSphereCenter.AddVector(&helper);
    11771181//            OldSphereCenter.SubtractVector(&CircleCenter);
    1178 //            //Log() << Verbose(1) << "INFO: OldSphereCenter is at " << OldSphereCenter << "." << endl;
     1182//            //LOG(1, "INFO: OldSphereCenter is at " << OldSphereCenter << ".");
    11791183//
    11801184//            // construct SearchDirection
     
    11861190//            SearchDirection.ProjectOntoPlane(&OldSphereCenter);
    11871191//            SearchDirection.Normalize();
    1188 //            Log() << Verbose(1) << "INFO: SearchDirection is " << SearchDirection << "." << endl;
     1192//            LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
    11891193//            if (fabs(OldSphereCenter.ScalarProduct(&SearchDirection)) > HULLEPSILON) {
    11901194//              // rotated the wrong way!
    1191 //              DoeLog(1) && (eLog()<< Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl);
     1195//              ELOG(1, "SearchDirection and RelativeOldSphereCenter are still not orthogonal!");
    11921196//            }
    11931197//
     
    11971201//              if (((*it) == BaseRay->endpoints[0]->node) || ((*it) == BaseRay->endpoints[1]->node)) // skip if it's the same triangle than suggested
    11981202//                continue;
    1199 //              Log() << Verbose(0) << " Third point candidate is " << (*it)
    1200 //              << " with circumsphere's center at " << (*it)->OptCenter << "." << endl;
    1201 //              Log() << Verbose(0) << " Baseline is " << *BaseRay << endl;
     1203//              LOG(1, "INFO: Third point candidate is " << (*it)
     1204//              << " with circumsphere's center at " << (*it)->OptCenter << ".");
     1205//              LOG(1, "INFO: Baseline is " << *BaseRay);
    12021206//
    12031207//              // check whether all edges of the new triangle still have space for one more triangle (i.e. TriangleCount <2)
     
    12331237//              if (check) {
    12341238//                if (ShortestAngle > OtherShortestAngle) {
    1235 //                  Log() << Verbose(0) << "There is a better candidate than " << *ThirdNode << " with " << ShortestAngle << " from baseline " << *Line << ": " << *OtherOptCandidate << " with " << OtherShortestAngle << "." << endl;
     1239//                  LOG(0, "There is a better candidate than " << *ThirdNode << " with " << ShortestAngle << " from baseline " << *Line << ": " << *OtherOptCandidate << " with " << OtherShortestAngle << ".");
    12361240//                  result = true;
    12371241//                  break;
     
    12431247//              break;
    12441248//          } else {
    1245 //            Log() << Verbose(0) << "Circumcircle for base line " << *Line << " and base triangle " << T << " is too big!" << endl;
     1249//            LOG(0, "Circumcircle for base line " << *Line << " and base triangle " << T << " is too big!");
    12461250//          }
    12471251//        } else {
    1248 //          DoeLog(2) && (eLog()<< Verbose(2) << "Baseline is connected to two triangles already?" << endl);
     1252//          ELOG(2, "Baseline is connected to two triangles already?");
    12491253//        }
    12501254//      } else {
    1251 //        Log() << Verbose(1) << "No present baseline between " << BaseRay->endpoints[0] << " and candidate " << *ThirdNode << "." << endl;
     1255//        LOG(1, "No present baseline between " << BaseRay->endpoints[0] << " and candidate " << *ThirdNode << ".");
    12521256//      }
    12531257//    }
    12541258//  } else {
    1255 //    DoeLog(1) && (eLog()<< Verbose(1) << "Could not find the TesselPoint " << *ThirdNode << "." << endl);
     1259//    ELOG(1, "Could not find the TesselPoint " << *ThirdNode << ".");
    12561260//  }
    12571261//
     
    12841288      break;
    12851289    }
    1286   DoLog(0) && (Log() << Verbose(0) << "Current baseline is " << *CandidateLine.BaseLine << " with ThirdPoint " << *ThirdPoint << " of triangle " << T << "." << endl);
     1290  LOG(0, "Current baseline is " << *CandidateLine.BaseLine << " with ThirdPoint " << *ThirdPoint << " of triangle " << T << ".");
    12871291
    12881292  CandidateLine.T = &T;
     
    13041308    CircleRadius = RADIUS * RADIUS - radius / 4.;
    13051309    CirclePlaneNormal.Normalize();
    1306     DoLog(1) && (Log() << Verbose(1) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl);
    1307 
    1308     DoLog(1) && (Log() << Verbose(1) << "INFO: OldSphereCenter is at " << T.SphereCenter << "." << endl);
     1310    LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
     1311
     1312    LOG(1, "INFO: OldSphereCenter is at " << T.SphereCenter << ".");
    13091313
    13101314    // construct SearchDirection and an "outward pointer"
     
    13131317    if (helper.ScalarProduct(SearchDirection) < -HULLEPSILON)// ohoh, SearchDirection points inwards!
    13141318      SearchDirection.Scale(-1.);
    1315     DoLog(1) && (Log() << Verbose(1) << "INFO: SearchDirection is " << SearchDirection << "." << endl);
     1319    LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
    13161320    if (fabs(RelativeSphereCenter.ScalarProduct(SearchDirection)) > HULLEPSILON) {
    13171321      // rotated the wrong way!
    1318       DoeLog(1) && (eLog() << Verbose(1) << "SearchDirection and RelativeOldSphereCenter are still not orthogonal!" << endl);
     1322      ELOG(1, "SearchDirection and RelativeOldSphereCenter are still not orthogonal!");
    13191323    }
    13201324
     
    13231327
    13241328  } else {
    1325     DoLog(0) && (Log() << Verbose(0) << "Circumcircle for base line " << *CandidateLine.BaseLine << " and base triangle " << T << " is too big!" << endl);
     1329    LOG(0, "Circumcircle for base line " << *CandidateLine.BaseLine << " and base triangle " << T << " is too big!");
    13261330  }
    13271331
    13281332  if (CandidateLine.pointlist.empty()) {
    1329     DoeLog(2) && (eLog() << Verbose(2) << "Could not find a suitable candidate." << endl);
     1333    ELOG(2, "Could not find a suitable candidate.");
    13301334    return false;
    13311335  }
    1332   DoLog(0) && (Log() << Verbose(0) << "Third Points are: " << endl);
     1336  LOG(0, "Third Points are: ");
    13331337  for (TesselPointList::iterator it = CandidateLine.pointlist.begin(); it != CandidateLine.pointlist.end(); ++it) {
    1334     DoLog(0) && (Log() << Verbose(0) << " " << *(*it) << endl);
     1338    LOG(0, " " << *(*it));
    13351339  }
    13361340
     
    13561360      ASSERT((baseline->BaseLine->triangles.size() == 1),"Open line without exactly one attached triangle");
    13571361      T = (((baseline->BaseLine->triangles.begin()))->second);
    1358       DoLog(1) && (Log() << Verbose(1) << "Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T << endl);
     1362      LOG(1, "Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T);
    13591363      TesselationFailFlag = TesselationFailFlag && FindNextSuitableTriangle(*baseline, *T, RADIUS, LCList); //the line is there, so there is a triangle, but only one.
    13601364    }
     
    13871391  TesselPointList *connectedClosestPoints = GetCircleOfSetOfPoints(&SetOfNeighbours, TurningPoint, CandidateLine.BaseLine->endpoints[1]->node->getPosition());
    13881392
    1389   DoLog(0) && (Log() << Verbose(0) << "List of Candidates for Turning Point " << *TurningPoint << ":" << endl);
     1393  LOG(0, "List of Candidates for Turning Point " << *TurningPoint << ":");
    13901394  for (TesselPointList::iterator TesselRunner = connectedClosestPoints->begin(); TesselRunner != connectedClosestPoints->end(); ++TesselRunner)
    1391     DoLog(0) && (Log() << Verbose(0) << " " << **TesselRunner << endl);
     1395    LOG(0, " " << **TesselRunner);
    13921396
    13931397  // go through all angle-sorted candidates (in degenerate n-nodes case we may have to add multiple triangles)
     
    13961400  Sprinter++;
    13971401  while (Sprinter != connectedClosestPoints->end()) {
    1398     DoLog(0) && (Log() << Verbose(0) << "Current Runner is " << *(*Runner) << " and sprinter is " << *(*Sprinter) << "." << endl);
     1402    LOG(0, "Current Runner is " << *(*Runner) << " and sprinter is " << *(*Sprinter) << ".");
    13991403
    14001404    AddTesselationPoint(TurningPoint, 0);
     
    14091413      // fill the internal open lines with its respective candidate (otherwise lines in degenerate case are not picked)
    14101414      FindDegeneratedCandidatesforOpenLines(*Sprinter, &CandidateLine.OptCenter); // Assume BTS contains last triangle
    1411       DoLog(0) && (Log() << Verbose(0) << " There are still more triangles to add." << endl);
     1415      LOG(0, " There are still more triangles to add.");
    14121416    }
    14131417    // pick candidates for other open lines as well
     
    14171421    if (CheckDegeneracy(CandidateLine, RADIUS, LC)) {
    14181422      // add normal and degenerate triangles
    1419       DoLog(1) && (Log() << Verbose(1) << "Triangle of endpoints " << *TPS[0] << "," << *TPS[1] << " and " << *TPS[2] << " is degenerated, adding both sides." << endl);
     1423      LOG(1, "Triangle of endpoints " << *TPS[0] << "," << *TPS[1] << " and " << *TPS[2] << " is degenerated, adding both sides.");
    14201424      AddCandidateTriangle(CandidateLine, OtherOpt);
    14211425
     
    14411445  pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node->getNr());
    14421446  for (LineMap::const_iterator FindLine = FindPair.first; FindLine != FindPair.second; FindLine++) {
    1443     DoLog(1) && (Log() << Verbose(1) << "INFO: Checking line " << *(FindLine->second) << " ..." << endl);
     1447    LOG(1, "INFO: Checking line " << *(FindLine->second) << " ...");
    14441448    // If there is a line with less than two attached triangles, we don't need a new line.
    14451449    if (FindLine->second->triangles.size() == 1) {
    14461450      CandidateMap::iterator Finder = OpenLines.find(FindLine->second);
    14471451      if (!Finder->second->pointlist.empty())
    1448         DoLog(1) && (Log() << Verbose(1) << "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << "." << endl);
     1452        LOG(1, "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
    14491453      else {
    1450         DoLog(1) && (Log() << Verbose(1) << "INFO: line " << *(FindLine->second) << " is open with no candidate, setting to next Sprinter" << (*Sprinter) << endl);
     1454        LOG(1, "INFO: line " << *(FindLine->second) << " is open with no candidate, setting to next Sprinter" << (*Sprinter));
    14511455        Finder->second->T = BTS;  // is last triangle
    14521456        Finder->second->pointlist.push_back(Sprinter);
     
    14731477
    14741478  /// 1. Create or pick the lines for the first triangle
    1475   DoLog(0) && (Log() << Verbose(0) << "INFO: Creating/Picking lines for first triangle ..." << endl);
     1479  LOG(0, "INFO: Creating/Picking lines for first triangle ...");
    14761480  for (int i = 0; i < 3; i++) {
    14771481    BLS[i] = NULL;
    1478     DoLog(0) && (Log() << Verbose(0) << "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":" << endl);
     1482    LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    14791483    AddTesselationLine(&CandidateLine.OptCenter, TPS[(i + 2) % 3], TPS[(i + 0) % 3], TPS[(i + 1) % 3], i);
    14801484  }
    14811485
    14821486  /// 2. create the first triangle and NormalVector and so on
    1483   DoLog(0) && (Log() << Verbose(0) << "INFO: Adding first triangle with center at " << CandidateLine.OptCenter << " ..." << endl);
     1487  LOG(0, "INFO: Adding first triangle with center at " << CandidateLine.OptCenter << " ...");
    14841488  BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount);
    14851489  AddTesselationTriangle();
     
    14921496  // give some verbose output about the whole procedure
    14931497  if (CandidateLine.T != NULL)
    1494     DoLog(0) && (Log() << Verbose(0) << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << "." << endl);
     1498    LOG(0, "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    14951499  else
    1496     DoLog(0) && (Log() << Verbose(0) << "--> New starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle." << endl);
     1500    LOG(0, "--> New starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    14971501  triangle = BTS;
    14981502
    14991503  /// 3. Gather candidates for each new line
    1500   DoLog(0) && (Log() << Verbose(0) << "INFO: Adding candidates to new lines ..." << endl);
     1504  LOG(0, "INFO: Adding candidates to new lines ...");
    15011505  for (int i = 0; i < 3; i++) {
    1502     DoLog(0) && (Log() << Verbose(0) << "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":" << endl);
     1506    LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    15031507    CandidateCheck = OpenLines.find(BLS[i]);
    15041508    if ((CandidateCheck != OpenLines.end()) && (CandidateCheck->second->pointlist.empty())) {
     
    15101514
    15111515  /// 4. Create or pick the lines for the second triangle
    1512   DoLog(0) && (Log() << Verbose(0) << "INFO: Creating/Picking lines for second triangle ..." << endl);
     1516  LOG(0, "INFO: Creating/Picking lines for second triangle ...");
    15131517  for (int i = 0; i < 3; i++) {
    1514     DoLog(0) && (Log() << Verbose(0) << "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":" << endl);
     1518    LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    15151519    AddTesselationLine(&CandidateLine.OtherOptCenter, TPS[(i + 2) % 3], TPS[(i + 0) % 3], TPS[(i + 1) % 3], i);
    15161520  }
    15171521
    15181522  /// 5. create the second triangle and NormalVector and so on
    1519   DoLog(0) && (Log() << Verbose(0) << "INFO: Adding second triangle with center at " << CandidateLine.OtherOptCenter << " ..." << endl);
     1523  LOG(0, "INFO: Adding second triangle with center at " << CandidateLine.OtherOptCenter << " ...");
    15201524  BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount);
    15211525  AddTesselationTriangle();
     
    15271531  // give some verbose output about the whole procedure
    15281532  if (CandidateLine.T != NULL)
    1529     DoLog(0) && (Log() << Verbose(0) << "--> New degenerate triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << "." << endl);
     1533    LOG(0, "--> New degenerate triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    15301534  else
    1531     DoLog(0) && (Log() << Verbose(0) << "--> New degenerate starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle." << endl);
     1535    LOG(0, "--> New degenerate starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    15321536
    15331537  /// 6. Adding triangle to new lines
    1534   DoLog(0) && (Log() << Verbose(0) << "INFO: Adding second triangles to new lines ..." << endl);
     1538  LOG(0, "INFO: Adding second triangles to new lines ...");
    15351539  for (int i = 0; i < 3; i++) {
    1536     DoLog(0) && (Log() << Verbose(0) << "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":" << endl);
     1540    LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    15371541    CandidateCheck = OpenLines.find(BLS[i]);
    15381542    if ((CandidateCheck != OpenLines.end()) && (CandidateCheck->second->pointlist.empty())) {
     
    15721576  // give some verbose output about the whole procedure
    15731577  if (CandidateLine.T != NULL)
    1574     DoLog(0) && (Log() << Verbose(0) << "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << "." << endl);
     1578    LOG(0, "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    15751579  else
    1576     DoLog(0) && (Log() << Verbose(0) << "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle." << endl);
     1580    LOG(0, "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    15771581}
    15781582;
     
    15991603  OtherBase = new class BoundaryLineSet(BPS, -1);
    16001604
    1601   DoLog(1) && (Log() << Verbose(1) << "INFO: Current base line is " << *Base << "." << endl);
    1602   DoLog(1) && (Log() << Verbose(1) << "INFO: Other base line is " << *OtherBase << "." << endl);
     1605  LOG(1, "INFO: Current base line is " << *Base << ".");
     1606  LOG(1, "INFO: Other base line is " << *OtherBase << ".");
    16031607
    16041608  // get the closest point on each line to the other line
     
    16181622  delete (ClosestPoint);
    16191623  if ((distance[0] * distance[1]) > 0) { // have same sign?
    1620     DoLog(1) && (Log() << Verbose(1) << "REJECT: Both SKPs have same sign: " << distance[0] << " and " << distance[1] << ". " << *Base << "' rectangle is concave." << endl);
     1624    LOG(1, "REJECT: Both SKPs have same sign: " << distance[0] << " and " << distance[1] << ". " << *Base << "' rectangle is concave.");
    16211625    if (distance[0] < distance[1]) {
    16221626      Spot = Base->endpoints[0];
     
    16261630    return Spot;
    16271631  } else { // different sign, i.e. we are in between
    1628     DoLog(0) && (Log() << Verbose(0) << "ACCEPT: Rectangle of triangles of base line " << *Base << " is convex." << endl);
     1632    LOG(0, "ACCEPT: Rectangle of triangles of base line " << *Base << " is convex.");
    16291633    return NULL;
    16301634  }
     
    16371641  Info FunctionInfo(__func__);
    16381642  // print all lines
    1639   DoLog(0) && (Log() << Verbose(0) << "Printing all boundary points for debugging:" << endl);
     1643  LOG(0, "Printing all boundary points for debugging:");
    16401644  for (PointMap::const_iterator PointRunner = PointsOnBoundary.begin(); PointRunner != PointsOnBoundary.end(); PointRunner++)
    1641     DoLog(0) && (Log() << Verbose(0) << *(PointRunner->second) << endl);
     1645    LOG(0, *(PointRunner->second));
    16421646}
    16431647;
     
    16471651  Info FunctionInfo(__func__);
    16481652  // print all lines
    1649   DoLog(0) && (Log() << Verbose(0) << "Printing all boundary lines for debugging:" << endl);
     1653  LOG(0, "Printing all boundary lines for debugging:");
    16501654  for (LineMap::const_iterator LineRunner = LinesOnBoundary.begin(); LineRunner != LinesOnBoundary.end(); LineRunner++)
    1651     DoLog(0) && (Log() << Verbose(0) << *(LineRunner->second) << endl);
     1655    LOG(0, *(LineRunner->second));
    16521656}
    16531657;
     
    16571661  Info FunctionInfo(__func__);
    16581662  // print all triangles
    1659   DoLog(0) && (Log() << Verbose(0) << "Printing all boundary triangles for debugging:" << endl);
     1663  LOG(0, "Printing all boundary triangles for debugging:");
    16601664  for (TriangleMap::const_iterator TriangleRunner = TrianglesOnBoundary.begin(); TriangleRunner != TrianglesOnBoundary.end(); TriangleRunner++)
    1661     DoLog(0) && (Log() << Verbose(0) << *(TriangleRunner->second) << endl);
     1665    LOG(0, *(TriangleRunner->second));
    16621666}
    16631667;
     
    16821686  OtherBase = new class BoundaryLineSet(BPS, -1);
    16831687
    1684   DoLog(0) && (Log() << Verbose(0) << "INFO: Current base line is " << *Base << "." << endl);
    1685   DoLog(0) && (Log() << Verbose(0) << "INFO: Other base line is " << *OtherBase << "." << endl);
     1688  LOG(0, "INFO: Current base line is " << *Base << ".");
     1689  LOG(0, "INFO: Other base line is " << *OtherBase << ".");
    16861690
    16871691  // get the closest point on each line to the other line
     
    17011705
    17021706  if (Distance.NormSquared() < MYEPSILON) { // check for intersection
    1703     DoLog(0) && (Log() << Verbose(0) << "REJECT: Both lines have an intersection: Nothing to do." << endl);
     1707    LOG(0, "REJECT: Both lines have an intersection: Nothing to do.");
    17041708    return false;
    17051709  } else { // check for sign against BaseLineNormal
     
    17071711    BaseLineNormal.Zero();
    17081712    if (Base->triangles.size() < 2) {
    1709       DoeLog(1) && (eLog() << Verbose(1) << "Less than two triangles are attached to this baseline!" << endl);
     1713      ELOG(1, "Less than two triangles are attached to this baseline!");
    17101714      return 0.;
    17111715    }
    17121716    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++) {
    1713     DoLog(1) && (Log() << Verbose(1) << "INFO: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << "." << endl);
     1717    LOG(1, "INFO: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << ".");
    17141718      BaseLineNormal += (runner->second->NormalVector);
    17151719    }
     
    17171721
    17181722    if (Distance.ScalarProduct(BaseLineNormal) > MYEPSILON) { // Distance points outwards, hence OtherBase higher than Base -> flip
    1719       DoLog(0) && (Log() << Verbose(0) << "ACCEPT: Other base line would be higher: Flipping baseline." << endl);
     1723      LOG(0, "ACCEPT: Other base line would be higher: Flipping baseline.");
    17201724      // calculate volume summand as a general tetraeder
    17211725      return volume;
    17221726    } else { // Base higher than OtherBase -> do nothing
    1723       DoLog(0) && (Log() << Verbose(0) << "REJECT: Base line is higher: Nothing to do." << endl);
     1727      LOG(0, "REJECT: Base line is higher: Nothing to do.");
    17241728      return 0.;
    17251729    }
     
    17471751  BaseLineNormal.Zero();
    17481752  if (Base->triangles.size() < 2) {
    1749     DoeLog(1) && (eLog() << Verbose(1) << "Less than two triangles are attached to this baseline!" << endl);
     1753    ELOG(1, "Less than two triangles are attached to this baseline!");
    17501754    return NULL;
    17511755  }
    17521756  for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++) {
    1753     DoLog(1) && (Log() << Verbose(1) << "INFO: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << "." << endl);
     1757    LOG(1, "INFO: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << ".");
    17541758    BaseLineNormal += (runner->second->NormalVector);
    17551759  }
     
    17641768  i = 0;
    17651769  m = 0;
    1766   DoLog(0) && (Log() << Verbose(0) << "The four old lines are: ");
     1770
     1771  // print OldLines and OldPoints for debugging
     1772  if (DoLog(0)) {
     1773    std::stringstream output;
     1774    output << "The four old lines are: ";
     1775    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
     1776      for (int j = 0; j < 3; j++) // all of their endpoints and baselines
     1777        if (runner->second->lines[j] != Base) // pick not the central baseline
     1778          output << *runner->second->lines[j] << "\t";
     1779    LOG(0, output.str());
     1780  }
     1781  if (DoLog(0)) {
     1782    std::stringstream output;
     1783    output << "The two old points are: ";
     1784    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
     1785      for (int j = 0; j < 3; j++) // all of their endpoints and baselines
     1786        if (!Base->ContainsBoundaryPoint(runner->second->endpoints[j])) // and neither of its endpoints
     1787          output << *runner->second->endpoints[j] << "\t";
     1788    LOG(0, output.str());
     1789  }
     1790
     1791  // index OldLines and OldPoints
    17671792  for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
    17681793    for (int j = 0; j < 3; j++) // all of their endpoints and baselines
    1769       if (runner->second->lines[j] != Base) { // pick not the central baseline
     1794      if (runner->second->lines[j] != Base) // pick not the central baseline
    17701795        OldLines[i++] = runner->second->lines[j];
    1771         DoLog(0) && (Log() << Verbose(0) << *runner->second->lines[j] << "\t");
    1772       }
    1773   DoLog(0) && (Log() << Verbose(0) << endl);
    1774   DoLog(0) && (Log() << Verbose(0) << "The two old points are: ");
    17751796  for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
    17761797    for (int j = 0; j < 3; j++) // all of their endpoints and baselines
    1777       if (!Base->ContainsBoundaryPoint(runner->second->endpoints[j])) { // and neither of its endpoints
     1798      if (!Base->ContainsBoundaryPoint(runner->second->endpoints[j])) // and neither of its endpoints
    17781799        OldPoints[m++] = runner->second->endpoints[j];
    1779         DoLog(0) && (Log() << Verbose(0) << *runner->second->endpoints[j] << "\t");
    1780       }
    1781   DoLog(0) && (Log() << Verbose(0) << endl);
    17821800
    17831801  // check whether everything is in place to create new lines and triangles
    17841802  if (i < 4) {
    1785     DoeLog(1) && (eLog() << Verbose(1) << "We have not gathered enough baselines!" << endl);
     1803    ELOG(1, "We have not gathered enough baselines!");
    17861804    return NULL;
    17871805  }
    17881806  for (int j = 0; j < 4; j++)
    17891807    if (OldLines[j] == NULL) {
    1790       DoeLog(1) && (eLog() << Verbose(1) << "We have not gathered enough baselines!" << endl);
     1808      ELOG(1, "We have not gathered enough baselines!");
    17911809      return NULL;
    17921810    }
    17931811  for (int j = 0; j < 2; j++)
    17941812    if (OldPoints[j] == NULL) {
    1795       DoeLog(1) && (eLog() << Verbose(1) << "We have not gathered enough endpoints!" << endl);
     1813      ELOG(1, "We have not gathered enough endpoints!");
    17961814      return NULL;
    17971815    }
    17981816
    17991817  // remove triangles and baseline removes itself
    1800   DoLog(0) && (Log() << Verbose(0) << "INFO: Deleting baseline " << *Base << " from global list." << endl);
     1818  LOG(0, "INFO: Deleting baseline " << *Base << " from global list.");
    18011819  OldBaseLineNr = Base->Nr;
    18021820  m = 0;
     
    18071825  // .. then delete each triangle (which deletes the line as well)
    18081826  for (list <BoundaryTriangleSet *>::iterator runner = TrianglesOfBase.begin(); !TrianglesOfBase.empty(); runner = TrianglesOfBase.begin()) {
    1809     DoLog(0) && (Log() << Verbose(0) << "INFO: Deleting triangle " << *(*runner) << "." << endl);
     1827    LOG(0, "INFO: Deleting triangle " << *(*runner) << ".");
    18101828    OldTriangleNrs[m++] = (*runner)->Nr;
    18111829    RemoveTesselationTriangle((*runner));
     
    18181836  NewLine = new class BoundaryLineSet(BPS, OldBaseLineNr);
    18191837  LinesOnBoundary.insert(LinePair(OldBaseLineNr, NewLine)); // no need for check for unique insertion as NewLine is definitely a new one
    1820   DoLog(0) && (Log() << Verbose(0) << "INFO: Created new baseline " << *NewLine << "." << endl);
     1838  LOG(0, "INFO: Created new baseline " << *NewLine << ".");
    18211839
    18221840  // construct new triangles with flipped baseline
     
    18331851    BTS->GetNormalVector(BaseLineNormal);
    18341852    AddTesselationTriangle(OldTriangleNrs[0]);
    1835     DoLog(0) && (Log() << Verbose(0) << "INFO: Created new triangle " << *BTS << "." << endl);
     1853    LOG(0, "INFO: Created new triangle " << *BTS << ".");
    18361854
    18371855    BLS[0] = (i == 2 ? OldLines[3] : OldLines[2]);
     
    18411859    BTS->GetNormalVector(BaseLineNormal);
    18421860    AddTesselationTriangle(OldTriangleNrs[1]);
    1843     DoLog(0) && (Log() << Verbose(0) << "INFO: Created new triangle " << *BTS << "." << endl);
     1861    LOG(0, "INFO: Created new triangle " << *BTS << ".");
    18441862  } else {
    1845     DoeLog(0) && (eLog() << Verbose(0) << "The four old lines do not connect, something's utterly wrong here!" << endl);
     1863    ELOG(0, "The four old lines do not connect, something's utterly wrong here!");
    18461864    return NULL;
    18471865  }
     
    18741892      N[i] = LC->n[i];
    18751893  } else {
    1876     DoeLog(1) && (eLog() << Verbose(1) << "Point " << *a << " is not found in cell " << LC->index << "." << endl);
     1894    ELOG(1, "Point " << *a << " is not found in cell " << LC->index << ".");
    18771895    return;
    18781896  }
     
    18821900    Nupper[i] = ((N[i] + 1) < LC->N[i]) ? N[i] + 1 : LC->N[i] - 1;
    18831901  }
    1884   DoLog(0) && (Log() << Verbose(0) << "LC Intervals from [" << N[0] << "<->" << LC->N[0] << ", " << N[1] << "<->" << LC->N[1] << ", " << N[2] << "<->" << LC->N[2] << "] :" << " [" << Nlower[0] << "," << Nupper[0] << "], " << " [" << Nlower[1] << "," << Nupper[1] << "], " << " [" << Nlower[2] << "," << Nupper[2] << "], " << endl);
     1902  LOG(0, "LC Intervals from [" << N[0] << "<->" << LC->N[0] << ", " << N[1] << "<->" << LC->N[1] << ", " << N[2] << "<->" << LC->N[2] << "] :" << " [" << Nlower[0] << "," << Nupper[0] << "], " << " [" << Nlower[1] << "," << Nupper[1] << "], " << " [" << Nlower[2] << "," << Nupper[2] << "], ");
    18851903
    18861904  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
     
    18881906      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    18891907        const TesselPointSTLList *List = LC->GetCurrentCell();
    1890         //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
     1908        //LOG(1, "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << ".");
    18911909        if (List != NULL) {
    18921910          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    19151933                angle = AngleCheck.Angle(Oben);
    19161934                if (angle < Storage[0]) {
    1917                   //Log() << Verbose(1) << "Old values of Storage: %lf %lf \n", Storage[0], Storage[1]);
    1918                   DoLog(1) && (Log() << Verbose(1) << "Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".\n");
     1935                  //LOG(1, "INFO: Old values of Storage is " << Storage[0] << ", " << Storage[1]);
     1936                  LOG(1, "INFO: Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".");
    19191937                  OptCandidate = Candidate;
    19201938                  Storage[0] = angle;
    1921                   //Log() << Verbose(1) << "Changing something in Storage: %lf %lf. \n", Storage[0], Storage[2]);
     1939                  //LOG(1, "INFO: Changing something in  Storage is " << Storage[0] << ", " << Storage[1]);
    19221940                } else {
    1923                   //Log() << Verbose(1) << "Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *OptCandidate << endl;
     1941                  //LOG(1, "INFO: Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *OptCandidate);
    19241942                }
    19251943              } else {
    1926                 //Log() << Verbose(1) << "Current candidate is " << *Candidate << ": Refused due to Radius " << norm << endl;
     1944                //LOG(1, "INFO: Current candidate is " << *Candidate << ": Refused due to Radius " << norm);
    19271945              }
    19281946            } else {
    1929               //Log() << Verbose(1) << "Current candidate is " << *Candidate << ": Candidate is equal to first endpoint." << *a << "." << endl;
     1947              //LOG(1, "INFO: Current candidate is " << *Candidate << ": Candidate is equal to first endpoint." << *a << ".");
    19301948            }
    19311949          }
    19321950        } else {
    1933           DoLog(0) && (Log() << Verbose(0) << "Linked cell list is empty." << endl);
     1951          LOG(0, "Linked cell list is empty.");
    19341952        }
    19351953      }
     
    19862004  TesselPoint *Candidate = NULL;
    19872005
    1988   DoLog(1) && (Log() << Verbose(1) << "INFO: NormalVector of BaseTriangle is " << NormalVector << "." << endl);
     2006  LOG(1, "INFO: NormalVector of BaseTriangle is " << NormalVector << ".");
    19892007
    19902008  // copy old center
     
    20082026    CircleRadius = RADIUS * RADIUS - radius;
    20092027    CirclePlaneNormal.Normalize();
    2010     DoLog(1) && (Log() << Verbose(1) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl);
     2028    LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
    20112029
    20122030    // test whether old center is on the band's plane
    20132031    if (fabs(RelativeOldSphereCenter.ScalarProduct(CirclePlaneNormal)) > HULLEPSILON) {
    2014       DoeLog(1) && (eLog() << Verbose(1) << "Something's very wrong here: RelativeOldSphereCenter is not on the band's plane as desired by " << fabs(RelativeOldSphereCenter.ScalarProduct(CirclePlaneNormal)) << "!" << endl);
     2032      ELOG(1, "Something's very wrong here: RelativeOldSphereCenter is not on the band's plane as desired by " << fabs(RelativeOldSphereCenter.ScalarProduct(CirclePlaneNormal)) << "!");
    20152033      RelativeOldSphereCenter.ProjectOntoPlane(CirclePlaneNormal);
    20162034    }
    20172035    radius = RelativeOldSphereCenter.NormSquared();
    20182036    if (fabs(radius - CircleRadius) < HULLEPSILON) {
    2019       DoLog(1) && (Log() << Verbose(1) << "INFO: RelativeOldSphereCenter is at " << RelativeOldSphereCenter << "." << endl);
     2037      LOG(1, "INFO: RelativeOldSphereCenter is at " << RelativeOldSphereCenter << ".");
    20202038
    20212039      // check SearchDirection
    2022       DoLog(1) && (Log() << Verbose(1) << "INFO: SearchDirection is " << SearchDirection << "." << endl);
     2040      LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
    20232041      if (fabs(RelativeOldSphereCenter.ScalarProduct(SearchDirection)) > HULLEPSILON) { // rotated the wrong way!
    2024         DoeLog(1) && (eLog() << Verbose(1) << "SearchDirection and RelativeOldSphereCenter are not orthogonal!" << endl);
     2042        ELOG(1, "SearchDirection and RelativeOldSphereCenter are not orthogonal!");
    20252043      }
    20262044
     
    20292047        for (int i = 0; i < NDIM; i++) // store indices of this cell
    20302048          N[i] = LC->n[i];
    2031         //Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
     2049        //LOG(1, "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
    20322050      } else {
    2033         DoeLog(1) && (eLog() << Verbose(1) << "Vector " << CircleCenter << " is outside of LinkedCell's bounding box." << endl);
     2051        ELOG(1, "Vector " << CircleCenter << " is outside of LinkedCell's bounding box.");
    20342052        return;
    20352053      }
    20362054      // then go through the current and all neighbouring cells and check the contained points for possible candidates
    2037       //Log() << Verbose(1) << "LC Intervals:";
     2055//      if (DoLog(0)) {
     2056//        std::stringstream output;
     2057//        output << "LC Intervals:";
     2058//        for (int i = 0; i < NDIM; i++)
     2059//          output << " [" << Nlower[i] << "," << Nupper[i] << "] ";
     2060//        LOG(0, output.str());
     2061//      }
    20382062      for (int i = 0; i < NDIM; i++) {
    20392063        Nlower[i] = ((N[i] - 1) >= 0) ? N[i] - 1 : 0;
    20402064        Nupper[i] = ((N[i] + 1) < LC->N[i]) ? N[i] + 1 : LC->N[i] - 1;
    2041         //Log() << Verbose(0) << " [" << Nlower[i] << "," << Nupper[i] << "] ";
    20422065      }
    2043       //Log() << Verbose(0) << endl;
    20442066      for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    20452067        for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    20462068          for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    20472069            const TesselPointSTLList *List = LC->GetCurrentCell();
    2048             //Log() << Verbose(1) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;
     2070            //LOG(1, "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << ".");
    20492071            if (List != NULL) {
    20502072              for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    20522074
    20532075                // check for three unique points
    2054                 DoLog(2) && (Log() << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " for BaseLine " << *CandidateLine.BaseLine << " with OldSphereCenter " << OldSphereCenter << "." << endl);
     2076                LOG(2, "INFO: Current Candidate is " << *Candidate << " for BaseLine " << *CandidateLine.BaseLine << " with OldSphereCenter " << OldSphereCenter << ".");
    20552077                if ((Candidate != CandidateLine.BaseLine->endpoints[0]->node) && (Candidate != CandidateLine.BaseLine->endpoints[1]->node)) {
    20562078
    20572079                  // find center on the plane
    20582080                  GetCenterofCircumcircle(NewPlaneCenter, CandidateLine.BaseLine->endpoints[0]->node->getPosition(), CandidateLine.BaseLine->endpoints[1]->node->getPosition(), Candidate->getPosition());
    2059                   DoLog(1) && (Log() << Verbose(1) << "INFO: NewPlaneCenter is " << NewPlaneCenter << "." << endl);
     2081                  LOG(1, "INFO: NewPlaneCenter is " << NewPlaneCenter << ".");
    20602082
    20612083                  try {
     
    20632085                                            (CandidateLine.BaseLine->endpoints[1]->node->getPosition()),
    20642086                                            (Candidate->getPosition())).getNormal();
    2065                     DoLog(1) && (Log() << Verbose(1) << "INFO: NewNormalVector is " << NewNormalVector << "." << endl);
     2087                    LOG(1, "INFO: NewNormalVector is " << NewNormalVector << ".");
    20662088                    radius = CandidateLine.BaseLine->endpoints[0]->node->DistanceSquared(NewPlaneCenter);
    2067                     DoLog(1) && (Log() << Verbose(1) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl);
    2068                     DoLog(1) && (Log() << Verbose(1) << "INFO: SearchDirection is " << SearchDirection << "." << endl);
    2069                     DoLog(1) && (Log() << Verbose(1) << "INFO: Radius of CircumCenterCircle is " << radius << "." << endl);
     2089                    LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
     2090                    LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
     2091                    LOG(1, "INFO: Radius of CircumCenterCircle is " << radius << ".");
    20702092                    if (radius < RADIUS * RADIUS) {
    20712093                      otherradius = CandidateLine.BaseLine->endpoints[1]->node->DistanceSquared(NewPlaneCenter);
     
    20762098                        helper = NewNormalVector;
    20772099                        helper.Scale(sqrt(RADIUS * RADIUS - radius));
    2078                         DoLog(2) && (Log() << Verbose(2) << "INFO: Distance of NewPlaneCenter " << NewPlaneCenter << " to either NewSphereCenter is " << helper.Norm() << " of vector " << helper << " with sphere radius " << RADIUS << "." << endl);
     2100                        LOG(2, "INFO: Distance of NewPlaneCenter " << NewPlaneCenter << " to either NewSphereCenter is " << helper.Norm() << " of vector " << helper << " with sphere radius " << RADIUS << ".");
    20792101                        NewSphereCenter += helper;
    2080                         DoLog(2) && (Log() << Verbose(2) << "INFO: NewSphereCenter is at " << NewSphereCenter << "." << endl);
     2102                        LOG(2, "INFO: NewSphereCenter is at " << NewSphereCenter << ".");
    20812103                        // OtherNewSphereCenter is created by the same vector just in the other direction
    20822104                        helper.Scale(-1.);
    20832105                        OtherNewSphereCenter += helper;
    2084                         DoLog(2) && (Log() << Verbose(2) << "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << "." << endl);
     2106                        LOG(2, "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << ".");
    20852107                        alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection, HULLEPSILON);
    20862108                        Otheralpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, OtherNewSphereCenter, OldSphereCenter, NormalVector, SearchDirection, HULLEPSILON);
     
    21032125                          if ((CandidateLine.ShortestAngle - HULLEPSILON) < alpha) {
    21042126                            CandidateLine.pointlist.push_back(Candidate);
    2105                             DoLog(0) && (Log() << Verbose(0) << "ACCEPT: We have found an equally good candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << "." << endl);
     2127                            LOG(0, "ACCEPT: We have found an equally good candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
    21062128                          } else {
    21072129                            // remove all candidates from the list and then the list itself
    21082130                            CandidateLine.pointlist.clear();
    21092131                            CandidateLine.pointlist.push_back(Candidate);
    2110                             DoLog(0) && (Log() << Verbose(0) << "ACCEPT: We have found a better candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << "." << endl);
     2132                            LOG(0, "ACCEPT: We have found a better candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
    21112133                          }
    21122134                          CandidateLine.ShortestAngle = alpha;
    2113                           DoLog(0) && (Log() << Verbose(0) << "INFO: There are " << CandidateLine.pointlist.size() << " candidates in the list now." << endl);
     2135                          LOG(0, "INFO: There are " << CandidateLine.pointlist.size() << " candidates in the list now.");
    21142136                        } else {
    21152137                          if ((Candidate != NULL) && (CandidateLine.pointlist.begin() != CandidateLine.pointlist.end())) {
    2116                             DoLog(1) && (Log() << Verbose(1) << "REJECT: Old candidate " << *(*CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl);
     2138                            LOG(1, "REJECT: Old candidate " << *(*CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " .");
    21172139                          } else {
    2118                             DoLog(1) && (Log() << Verbose(1) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl);
     2140                            LOG(1, "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected.");
    21192141                          }
    21202142                        }
    21212143                      } else {
    2122                         DoeLog(0) && (eLog() << Verbose(1) << "REJECT: Distance to center of circumcircle is not the same from each corner of the triangle: " << fabs(radius - otherradius) << endl);
     2144                        ELOG(0, "REJECT: Distance to center of circumcircle is not the same from each corner of the triangle: " << fabs(radius - otherradius));
    21232145                      }
    21242146                    } else {
    2125                       DoLog(1) && (Log() << Verbose(1) << "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << "." << endl);
     2147                      LOG(1, "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << ".");
    21262148                    }
    21272149                  }
    21282150                  catch (LinearDependenceException &excp){
    2129                     Log() << Verbose(1) << boost::diagnostic_information(excp);
    2130                     Log() << Verbose(1) << "REJECT: Three points from " << *CandidateLine.BaseLine << " and Candidate " << *Candidate << " are linear-dependent." << endl;
     2151                    LOG(1, boost::diagnostic_information(excp));
     2152                    LOG(1, "REJECT: Three points from " << *CandidateLine.BaseLine << " and Candidate " << *Candidate << " are linear-dependent.");
    21312153                  }
    21322154                } else {
    21332155                  if (ThirdPoint != NULL) {
    2134                     DoLog(1) && (Log() << Verbose(1) << "REJECT: Base triangle " << *CandidateLine.BaseLine << " and " << *ThirdPoint << " contains Candidate " << *Candidate << "." << endl);
     2156                    LOG(1, "REJECT: Base triangle " << *CandidateLine.BaseLine << " and " << *ThirdPoint << " contains Candidate " << *Candidate << ".");
    21352157                  } else {
    2136                     DoLog(1) && (Log() << Verbose(1) << "REJECT: Base triangle " << *CandidateLine.BaseLine << " contains Candidate " << *Candidate << "." << endl);
     2158                    LOG(1, "REJECT: Base triangle " << *CandidateLine.BaseLine << " contains Candidate " << *Candidate << ".");
    21372159                  }
    21382160                }
     
    21412163          }
    21422164    } else {
    2143       DoeLog(1) && (eLog() << Verbose(1) << "The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << "." << endl);
     2165      ELOG(1, "The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << ".");
    21442166    }
    21452167  } else {
    21462168    if (ThirdPoint != NULL)
    2147       DoLog(1) && (Log() << Verbose(1) << "Circumcircle for base line " << *CandidateLine.BaseLine << " and third node " << *ThirdPoint << " is too big!" << endl);
     2169      LOG(1, "Circumcircle for base line " << *CandidateLine.BaseLine << " and third node " << *ThirdPoint << " is too big!");
    21482170    else
    2149       DoLog(1) && (Log() << Verbose(1) << "Circumcircle for base line " << *CandidateLine.BaseLine << " is too big!" << endl);
    2150   }
    2151 
    2152   DoLog(1) && (Log() << Verbose(1) << "INFO: Sorting candidate list ..." << endl);
     2171      LOG(1, "Circumcircle for base line " << *CandidateLine.BaseLine << " is too big!");
     2172  }
     2173
     2174  LOG(1, "INFO: Sorting candidate list ...");
    21532175  if (CandidateLine.pointlist.size() > 1) {
    21542176    CandidateLine.pointlist.unique();
     
    21572179
    21582180  if ((!CandidateLine.pointlist.empty()) && (!CandidateLine.CheckValidity(RADIUS, LC))) {
    2159     DoeLog(0) && (eLog() << Verbose(0) << "There were other points contained in the rolling sphere as well!" << endl);
     2181    ELOG(0, "There were other points contained in the rolling sphere as well!");
    21602182    performCriticalExit();
    21612183  }
     
    21812203      if (!OrderTest.second) { // if insertion fails, we have common endpoint
    21822204        node = OrderTest.first->second;
    2183         DoLog(1) && (Log() << Verbose(1) << "Common endpoint of lines " << *line1 << " and " << *line2 << " is: " << *node << "." << endl);
     2205        LOG(1, "Common endpoint of lines " << *line1 << " and " << *line2 << " is: " << *node << ".");
    21842206        j = 2;
    21852207        i = 2;
     
    22032225
    22042226  if (LinesOnBoundary.empty()) {
    2205     DoeLog(1) && (eLog() << Verbose(1) << "There is no tesselation structure to compare the point with, please create one first." << endl);
     2227    ELOG(1, "There is no tesselation structure to compare the point with, please create one first.");
    22062228    return NULL;
    22072229  }
     
    22112233  for (int i = 0; i < NDIM; i++) // store indices of this cell
    22122234    N[i] = LC->n[i];
    2213   DoLog(1) && (Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl);
     2235  LOG(1, "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
    22142236  DistanceToPointMap * points = new DistanceToPointMap;
    22152237  LC->GetNeighbourBounds(Nlower, Nupper);
    2216   //Log() << Verbose(1) << endl;
    22172238  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    22182239    for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    22192240      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    22202241        const TesselPointSTLList *List = LC->GetCurrentCell();
    2221         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
     2242        //LOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2]);
    22222243        if (List != NULL) {
    22232244          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    22252246            if (FindPoint != PointsOnBoundary.end()) {
    22262247              points->insert(DistanceToPointPair(FindPoint->second->node->DistanceSquared(x), FindPoint->second));
    2227               DoLog(1) && (Log() << Verbose(1) << "INFO: Putting " << *FindPoint->second << " into the list." << endl);
     2248              LOG(1, "INFO: Putting " << *FindPoint->second << " into the list.");
    22282249            }
    22292250          }
    22302251        } else {
    2231           DoeLog(1) && (eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
     2252          ELOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!");
    22322253        }
    22332254      }
     
    22352256  // check whether we found some points
    22362257  if (points->empty()) {
    2237     DoeLog(1) && (eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
     2258    ELOG(1, "There is no nearest point: too far away from the surface.");
    22382259    delete (points);
    22392260    return NULL;
     
    22542275  DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x, LC);
    22552276  if (points == NULL) {
    2256     DoeLog(1) && (eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
     2277    ELOG(1, "There is no nearest point: too far away from the surface.");
    22572278    return NULL;
    22582279  }
    22592280
    22602281  // for each point, check its lines, remember closest
    2261   DoLog(1) && (Log() << Verbose(1) << "Finding closest BoundaryLine to " << x << " ... " << endl);
     2282  LOG(1, "Finding closest BoundaryLine to " << x << " ... ");
    22622283  BoundaryLineSet *ClosestLine = NULL;
    22632284  double MinDistance = -1.;
     
    22842305          ClosestLine = LineRunner->second;
    22852306          MinDistance = distance;
    2286           DoLog(1) && (Log() << Verbose(1) << "ACCEPT: New closest line is " << *ClosestLine << " with projected distance " << MinDistance << "." << endl);
     2307          LOG(1, "ACCEPT: New closest line is " << *ClosestLine << " with projected distance " << MinDistance << ".");
    22872308        } else {
    2288           DoLog(1) && (Log() << Verbose(1) << "REJECT: Intersection is outside of the line section: " << lengthA << " and " << lengthB << "." << endl);
     2309          LOG(1, "REJECT: Intersection is outside of the line section: " << lengthA << " and " << lengthB << ".");
    22892310        }
    22902311      } else {
    2291         DoLog(1) && (Log() << Verbose(1) << "REJECT: Point is too further away than present line: " << distance << " >> " << MinDistance << "." << endl);
     2312        LOG(1, "REJECT: Point is too further away than present line: " << distance << " >> " << MinDistance << ".");
    22922313      }
    22932314    }
     
    22962317  // check whether closest line is "too close" :), then it's inside
    22972318  if (ClosestLine == NULL) {
    2298     DoLog(0) && (Log() << Verbose(0) << "Is the only point, no one else is closeby." << endl);
     2319    LOG(0, "Is the only point, no one else is closeby.");
    22992320    return NULL;
    23002321  }
     
    23142335  DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x, LC);
    23152336  if (points == NULL) {
    2316     DoeLog(1) && (eLog() << Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
     2337    ELOG(1, "There is no nearest point: too far away from the surface.");
    23172338    return NULL;
    23182339  }
    23192340
    23202341  // for each point, check its lines, remember closest
    2321   DoLog(1) && (Log() << Verbose(1) << "Finding closest BoundaryTriangle to " << x << " ... " << endl);
     2342  LOG(1, "Finding closest BoundaryTriangle to " << x << " ... ");
    23222343  LineSet ClosestLines;
    23232344  double MinDistance = 1e+16;
     
    23452366          ClosestLines.insert(LineRunner->second);
    23462367          MinDistance = lengthEnd;
    2347           DoLog(1) && (Log() << Verbose(1) << "ACCEPT: Line " << *LineRunner->second << " to endpoint " << *LineRunner->second->endpoints[0]->node << " is closer with " << lengthEnd << "." << endl);
     2368          LOG(1, "ACCEPT: Line " << *LineRunner->second << " to endpoint " << *LineRunner->second->endpoints[0]->node << " is closer with " << lengthEnd << ".");
    23482369        } else if (fabs(lengthEnd - MinDistance) < MYEPSILON) { // additional best candidate
    23492370          ClosestLines.insert(LineRunner->second);
    2350           DoLog(1) && (Log() << Verbose(1) << "ACCEPT: Line " << *LineRunner->second << " to endpoint " << *LineRunner->second->endpoints[1]->node << " is equally good with " << lengthEnd << "." << endl);
     2371          LOG(1, "ACCEPT: Line " << *LineRunner->second << " to endpoint " << *LineRunner->second->endpoints[1]->node << " is equally good with " << lengthEnd << ".");
    23512372        } else { // line is worse
    2352           DoLog(1) && (Log() << Verbose(1) << "REJECT: Line " << *LineRunner->second << " to either endpoints is further away than present closest line candidate: " << lengthEndA << ", " << lengthEndB << ", and distance is longer than baseline:" << lengthBase << "." << endl);
     2373          LOG(1, "REJECT: Line " << *LineRunner->second << " to either endpoints is further away than present closest line candidate: " << lengthEndA << ", " << lengthEndB << ", and distance is longer than baseline:" << lengthBase << ".");
    23532374        }
    23542375      } else { // intersection is closer, calculate
     
    23602381        const double distance = BaseLineIntersection.NormSquared();
    23612382        if (Center.NormSquared() > BaseLine.NormSquared()) {
    2362           DoeLog(0) && (eLog() << Verbose(0) << "Algorithmic error: In second case we have intersection outside of baseline!" << endl);
     2383          ELOG(0, "Algorithmic error: In second case we have intersection outside of baseline!");
    23632384        }
    23642385        if ((ClosestLines.empty()) || (distance < MinDistance)) {
    23652386          ClosestLines.insert(LineRunner->second);
    23662387          MinDistance = distance;
    2367           DoLog(1) && (Log() << Verbose(1) << "ACCEPT: Intersection in between endpoints, new closest line " << *LineRunner->second << " is " << *ClosestLines.begin() << " with projected distance " << MinDistance << "." << endl);
     2388          LOG(1, "ACCEPT: Intersection in between endpoints, new closest line " << *LineRunner->second << " is " << *ClosestLines.begin() << " with projected distance " << MinDistance << ".");
    23682389        } else {
    2369           DoLog(2) && (Log() << Verbose(2) << "REJECT: Point is further away from line " << *LineRunner->second << " than present closest line: " << distance << " >> " << MinDistance << "." << endl);
     2390          LOG(2, "REJECT: Point is further away from line " << *LineRunner->second << " than present closest line: " << distance << " >> " << MinDistance << ".");
    23702391        }
    23712392      }
     
    23762397  // check whether closest line is "too close" :), then it's inside
    23772398  if (ClosestLines.empty()) {
    2378     DoLog(0) && (Log() << Verbose(0) << "Is the only point, no one else is closeby." << endl);
     2399    LOG(0, "Is the only point, no one else is closeby.");
    23792400    return NULL;
    23802401  }
     
    24162437      result = *Runner;
    24172438      MinAlignment = Alignment;
    2418       DoLog(1) && (Log() << Verbose(1) << "ACCEPT: Triangle " << *result << " is better aligned with " << MinAlignment << "." << endl);
     2439      LOG(1, "ACCEPT: Triangle " << *result << " is better aligned with " << MinAlignment << ".");
    24192440    } else {
    2420       DoLog(1) && (Log() << Verbose(1) << "REJECT: Triangle " << *result << " is worse aligned with " << MinAlignment << "." << endl);
     2441      LOG(1, "REJECT: Triangle " << *result << " is worse aligned with " << MinAlignment << ".");
    24212442    }
    24222443  }
     
    24712492
    24722493  if (triangle == NULL) {// is boundary point or only point in point cloud?
    2473     DoLog(1) && (Log() << Verbose(1) << "No triangle given!" << endl);
     2494    LOG(1, "No triangle given!");
    24742495    return -1.;
    24752496  } else {
    2476     DoLog(1) && (Log() << Verbose(1) << "INFO: Closest triangle found is " << *triangle << " with normal vector " << triangle->NormalVector << "." << endl);
     2497    LOG(1, "INFO: Closest triangle found is " << *triangle << " with normal vector " << triangle->NormalVector << ".");
    24772498  }
    24782499
    24792500  triangle->GetCenter(Center);
    2480   DoLog(2) && (Log() << Verbose(2) << "INFO: Central point of the triangle is " << Center << "." << endl);
     2501  LOG(2, "INFO: Central point of the triangle is " << Center << ".");
    24812502  DistanceToCenter = Center - Point;
    2482   DoLog(2) && (Log() << Verbose(2) << "INFO: Vector from point to test to center is " << DistanceToCenter << "." << endl);
     2503  LOG(2, "INFO: Vector from point to test to center is " << DistanceToCenter << ".");
    24832504
    24842505  // check whether we are on boundary
     
    24872508    DistanceToCenter = Point + triangle->NormalVector; // points outside
    24882509    Center = Point - triangle->NormalVector; // points towards MolCenter
    2489     DoLog(1) && (Log() << Verbose(1) << "INFO: Calling Intersection with " << Center << " and " << DistanceToCenter << "." << endl);
     2510    LOG(1, "INFO: Calling Intersection with " << Center << " and " << DistanceToCenter << ".");
    24902511    if (triangle->GetIntersectionInsideTriangle(Center, DistanceToCenter, Intersection)) {
    2491       DoLog(1) && (Log() << Verbose(1) << Point << " is inner point: sufficiently close to boundary, " << Intersection << "." << endl);
     2512      LOG(1, Point << " is inner point: sufficiently close to boundary, " << Intersection << ".");
    24922513      return 0.;
    24932514    } else {
    2494       DoLog(1) && (Log() << Verbose(1) << Point << " is NOT an inner point: on triangle plane but outside of triangle bounds." << endl);
     2515      LOG(1, Point << " is NOT an inner point: on triangle plane but outside of triangle bounds.");
    24952516      return false;
    24962517    }
     
    24982519    // calculate smallest distance
    24992520    distance = triangle->GetClosestPointInsideTriangle(Point, Intersection);
    2500     DoLog(1) && (Log() << Verbose(1) << "Closest point on triangle is " << Intersection << "." << endl);
     2521    LOG(1, "Closest point on triangle is " << Intersection << ".");
    25012522
    25022523    // then check direction to boundary
    25032524    if (DistanceToCenter.ScalarProduct(triangle->NormalVector) > MYEPSILON) {
    2504       DoLog(1) && (Log() << Verbose(1) << Point << " is an inner point, " << distance << " below surface." << endl);
     2525      LOG(1, Point << " is an inner point, " << distance << " below surface.");
    25052526      return -distance;
    25062527    } else {
    2507       DoLog(1) && (Log() << Verbose(1) << Point << " is NOT an inner point, " << distance << " above surface." << endl);
     2528      LOG(1, Point << " is NOT an inner point, " << distance << " above surface.");
    25082529      return +distance;
    25092530    }
     
    25602581    ReferencePoint = PointRunner->second;
    25612582  } else {
    2562     DoeLog(2) && (eLog() << Verbose(2) << "GetAllConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl);
     2583    ELOG(2, "GetAllConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << ".");
    25632584    ReferencePoint = NULL;
    25642585  }
     
    25852606
    25862607    if (takePoint) {
    2587       DoLog(1) && (Log() << Verbose(1) << "INFO: Endpoint " << *current << " of line " << *(findLines->second) << " is enlisted." << endl);
     2608      LOG(1, "INFO: Endpoint " << *current << " of line " << *(findLines->second) << " is enlisted.");
    25882609      connectedPoints->insert(current);
    25892610    }
     
    25932614
    25942615  if (connectedPoints->empty()) { // if have not found any points
    2595     DoeLog(1) && (eLog() << Verbose(1) << "We have not found any connected points to " << *Point << "." << endl);
     2616    ELOG(1, "We have not found any connected points to " << *Point << ".");
    25962617    return NULL;
    25972618  }
     
    26262647
    26272648  if (SetOfNeighbours == NULL) {
    2628     DoeLog(2) && (eLog() << Verbose(2) << "Could not find any connected points!" << endl);
     2649    ELOG(2, "Could not find any connected points!");
    26292650    delete (connectedCircle);
    26302651    return NULL;
     
    26372658      PlaneNormal += (*Runner)->NormalVector;
    26382659  } else {
    2639     DoeLog(0) && (eLog() << Verbose(0) << "Could not find any triangles for point " << *Point << "." << endl);
     2660    ELOG(0, "Could not find any triangles for point " << *Point << ".");
    26402661    performCriticalExit();
    26412662  }
    26422663  PlaneNormal.Scale(1.0 / triangles->size());
    2643   DoLog(1) && (Log() << Verbose(1) << "INFO: Calculated PlaneNormal of all circle points is " << PlaneNormal << "." << endl);
     2664  LOG(1, "INFO: Calculated PlaneNormal of all circle points is " << PlaneNormal << ".");
    26442665  PlaneNormal.Normalize();
    26452666
     
    26482669  AngleZero.ProjectOntoPlane(PlaneNormal);
    26492670  if ((AngleZero.NormSquared() < MYEPSILON)) {
    2650     DoLog(1) && (Log() << Verbose(1) << "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer." << endl);
     2671    LOG(1, "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
    26512672    AngleZero = ((*SetOfNeighbours->begin())->getPosition()) - (Point->getPosition());
    26522673    AngleZero.ProjectOntoPlane(PlaneNormal);
    26532674    if (AngleZero.NormSquared() < MYEPSILON) {
    2654       DoeLog(0) && (eLog() << Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl);
     2675      ELOG(0, "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!");
    26552676      performCriticalExit();
    26562677    }
    26572678  }
    2658   DoLog(1) && (Log() << Verbose(1) << "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << "." << endl);
     2679  LOG(1, "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
    26592680  if (AngleZero.NormSquared() > MYEPSILON)
    26602681    OrthogonalVector = Plane(PlaneNormal, AngleZero,0).getNormal();
    26612682  else
    26622683    OrthogonalVector.MakeNormalTo(PlaneNormal);
    2663   DoLog(1) && (Log() << Verbose(1) << "INFO: OrthogonalVector on plane is " << OrthogonalVector << "." << endl);
     2684  LOG(1, "INFO: OrthogonalVector on plane is " << OrthogonalVector << ".");
    26642685
    26652686  // go through all connected points and calculate angle
     
    26682689    helper.ProjectOntoPlane(PlaneNormal);
    26692690    double angle = GetAngle(helper, AngleZero, OrthogonalVector);
    2670     DoLog(0) && (Log() << Verbose(0) << "INFO: Calculated angle is " << angle << " for point " << **listRunner << "." << endl);
     2691    LOG(0, "INFO: Calculated angle is " << angle << " for point " << **listRunner << ".");
    26712692    anglesOfPoints.insert(pair<double, TesselPoint*> (angle, (*listRunner)));
    26722693  }
     
    27022723
    27032724  if (SetOfNeighbours == NULL) {
    2704     DoeLog(2) && (eLog() << Verbose(2) << "Could not find any connected points!" << endl);
     2725    ELOG(2, "Could not find any connected points!");
    27052726    delete (connectedCircle);
    27062727    return NULL;
     
    27142735  }
    27152736
    2716   DoLog(1) && (Log() << Verbose(1) << "INFO: Point is " << *Point << " and Reference is " << Reference << "." << endl);
     2737  LOG(1, "INFO: Point is " << *Point << " and Reference is " << Reference << ".");
    27172738  // calculate central point
    27182739  TesselPointSet::const_iterator TesselA = SetOfNeighbours->begin();
     
    27272748                   ((*TesselB)->getPosition()),
    27282749                   ((*TesselC)->getPosition())).getNormal();
    2729     DoLog(0) && (Log() << Verbose(0) << "Making normal vector out of " << *(*TesselA) << ", " << *(*TesselB) << " and " << *(*TesselC) << ":" << helper << endl);
     2750    LOG(0, "Making normal vector out of " << *(*TesselA) << ", " << *(*TesselB) << " and " << *(*TesselC) << ":" << helper);
    27302751    counter++;
    27312752    TesselA++;
     
    27342755    PlaneNormal += helper;
    27352756  }
    2736   //Log() << Verbose(0) << "Summed vectors " << center << "; number of points " << connectedPoints.size()
    2737   //  << "; scale factor " << counter;
     2757  //LOG(0, "Summed vectors " << center << "; number of points " << connectedPoints.size() << "; scale factor " << counter);
    27382758  PlaneNormal.Scale(1.0 / (double) counter);
    2739   //  Log() << Verbose(1) << "INFO: Calculated center of all circle points is " << center << "." << endl;
     2759  //  LOG(1, "INFO: Calculated center of all circle points is " << center << ".");
    27402760  //
    27412761  //  // projection plane of the circle is at the closes Point and normal is pointing away from center of all circle points
     
    27432763  //  PlaneNormal.SubtractVector(&center);
    27442764  //  PlaneNormal.Normalize();
    2745   DoLog(1) && (Log() << Verbose(1) << "INFO: Calculated plane normal of circle is " << PlaneNormal << "." << endl);
     2765  LOG(1, "INFO: Calculated plane normal of circle is " << PlaneNormal << ".");
    27462766
    27472767  // construct one orthogonal vector
     
    27512771  }
    27522772  if ((Reference.IsZero()) || (AngleZero.NormSquared() < MYEPSILON )) {
    2753     DoLog(1) && (Log() << Verbose(1) << "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer." << endl);
     2773    LOG(1, "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
    27542774    AngleZero = ((*SetOfNeighbours->begin())->getPosition()) - (Point->getPosition());
    27552775    AngleZero.ProjectOntoPlane(PlaneNormal);
    27562776    if (AngleZero.NormSquared() < MYEPSILON) {
    2757       DoeLog(0) && (eLog() << Verbose(0) << "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!" << endl);
     2777      ELOG(0, "CRITIAL: AngleZero is 0 even with alternative reference. The algorithm has to be changed here!");
    27582778      performCriticalExit();
    27592779    }
    27602780  }
    2761   DoLog(1) && (Log() << Verbose(1) << "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << "." << endl);
     2781  LOG(1, "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
    27622782  if (AngleZero.NormSquared() > MYEPSILON)
    27632783    OrthogonalVector = Plane(PlaneNormal, AngleZero,0).getNormal();
    27642784  else
    27652785    OrthogonalVector.MakeNormalTo(PlaneNormal);
    2766   DoLog(1) && (Log() << Verbose(1) << "INFO: OrthogonalVector on plane is " << OrthogonalVector << "." << endl);
     2786  LOG(1, "INFO: OrthogonalVector on plane is " << OrthogonalVector << ".");
    27672787
    27682788  // go through all connected points and calculate angle
     
    27742794    if (angle > M_PI) // the correction is of no use here (and not desired)
    27752795      angle = 2. * M_PI - angle;
    2776     DoLog(0) && (Log() << Verbose(0) << "INFO: Calculated angle between " << helper << " and " << AngleZero << " is " << angle << " for point " << **listRunner << "." << endl);
     2796    LOG(0, "INFO: Calculated angle between " << helper << " and " << AngleZero << " is " << angle << " for point " << **listRunner << ".");
    27772797    InserterTest = anglesOfPoints.insert(pair<double, TesselPoint*> (angle, (*listRunner)));
    27782798    if (!InserterTest.second) {
    2779       DoeLog(0) && (eLog() << Verbose(0) << "GetCircleOfSetOfPoints() got two atoms with same angle: " << *((InserterTest.first)->second) << " and " << (*listRunner) << endl);
     2799      ELOG(0, "GetCircleOfSetOfPoints() got two atoms with same angle: " << *((InserterTest.first)->second) << " and " << (*listRunner));
    27802800      performCriticalExit();
    27812801    }
     
    28162836    ReferencePoint = PointRunner->second;
    28172837  } else {
    2818     DoeLog(1) && (eLog() << Verbose(1) << "GetPathOfConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << "." << endl);
     2838    ELOG(1, "GetPathOfConnectedPoints() could not find the BoundaryPoint belonging to " << *Point << ".");
    28192839    return NULL;
    28202840  }
     
    28332853      LineRunner = TouchedLine.find(runner->second);
    28342854      if (LineRunner == TouchedLine.end()) {
    2835         DoeLog(1) && (eLog() << Verbose(1) << "I could not find " << *runner->second << " in the touched list." << endl);
     2855        ELOG(1, "I could not find " << *runner->second << " in the touched list.");
    28362856      } else if (!LineRunner->second) {
    28372857        LineRunner->second = true;
     
    28412861        StartLine = CurrentLine;
    28422862        CurrentPoint = CurrentLine->GetOtherEndpoint(ReferencePoint);
    2843         DoLog(1) && (Log() << Verbose(1) << "INFO: Beginning path retrieval at " << *CurrentPoint << " of line " << *CurrentLine << "." << endl);
     2863        LOG(1, "INFO: Beginning path retrieval at " << *CurrentPoint << " of line " << *CurrentLine << ".");
    28442864        do {
    28452865          // push current one
    2846           DoLog(1) && (Log() << Verbose(1) << "INFO: Putting " << *CurrentPoint << " at end of path." << endl);
     2866          LOG(1, "INFO: Putting " << *CurrentPoint << " at end of path.");
    28472867          connectedPath->push_back(CurrentPoint->node);
    28482868
    28492869          // find next triangle
    28502870          for (TriangleMap::iterator Runner = CurrentLine->triangles.begin(); Runner != CurrentLine->triangles.end(); Runner++) {
    2851             DoLog(1) && (Log() << Verbose(1) << "INFO: Inspecting triangle " << *Runner->second << "." << endl);
     2871            LOG(1, "INFO: Inspecting triangle " << *Runner->second << ".");
    28522872            if ((Runner->second != triangle)) { // look for first triangle not equal to old one
    28532873              triangle = Runner->second;
     
    28562876                if (!TriangleRunner->second) {
    28572877                  TriangleRunner->second = true;
    2858                   DoLog(1) && (Log() << Verbose(1) << "INFO: Connecting triangle is " << *triangle << "." << endl);
     2878                  LOG(1, "INFO: Connecting triangle is " << *triangle << ".");
    28592879                  break;
    28602880                } else {
    2861                   DoLog(1) && (Log() << Verbose(1) << "INFO: Skipping " << *triangle << ", as we have already visited it." << endl);
     2881                  LOG(1, "INFO: Skipping " << *triangle << ", as we have already visited it.");
    28622882                  triangle = NULL;
    28632883                }
    28642884              } else {
    2865                 DoeLog(1) && (eLog() << Verbose(1) << "I could not find " << *triangle << " in the touched list." << endl);
     2885                ELOG(1, "I could not find " << *triangle << " in the touched list.");
    28662886                triangle = NULL;
    28672887              }
     
    28742894            if ((triangle->lines[i] != CurrentLine) && (triangle->lines[i]->ContainsBoundaryPoint(ReferencePoint))) { // not the current line and still containing Point
    28752895              CurrentLine = triangle->lines[i];
    2876               DoLog(1) && (Log() << Verbose(1) << "INFO: Connecting line is " << *CurrentLine << "." << endl);
     2896              LOG(1, "INFO: Connecting line is " << *CurrentLine << ".");
    28772897              break;
    28782898            }
     
    28802900          LineRunner = TouchedLine.find(CurrentLine);
    28812901          if (LineRunner == TouchedLine.end())
    2882             DoeLog(1) && (eLog() << Verbose(1) << "I could not find " << *CurrentLine << " in the touched list." << endl);
     2902            ELOG(1, "I could not find " << *CurrentLine << " in the touched list.");
    28832903          else
    28842904            LineRunner->second = true;
     
    28882908        } while (CurrentLine != StartLine);
    28892909        // last point is missing, as it's on start line
    2890         DoLog(1) && (Log() << Verbose(1) << "INFO: Putting " << *CurrentPoint << " at end of path." << endl);
     2910        LOG(1, "INFO: Putting " << *CurrentPoint << " at end of path.");
    28912911        if (StartLine->GetOtherEndpoint(ReferencePoint)->node != connectedPath->back())
    28922912          connectedPath->push_back(StartLine->GetOtherEndpoint(ReferencePoint)->node);
     
    28942914        ListOfPaths->push_back(connectedPath);
    28952915      } else {
    2896         DoLog(1) && (Log() << Verbose(1) << "INFO: Skipping " << *runner->second << ", as we have already visited it." << endl);
     2916        LOG(1, "INFO: Skipping " << *runner->second << ", as we have already visited it.");
    28972917      }
    28982918    }
    28992919  } else {
    2900     DoeLog(1) && (eLog() << Verbose(1) << "There are no lines attached to " << *ReferencePoint << "." << endl);
     2920    ELOG(1, "There are no lines attached to " << *ReferencePoint << ".");
    29012921  }
    29022922
     
    29242944    connectedPath = *ListRunner;
    29252945
    2926     DoLog(1) && (Log() << Verbose(1) << "INFO: Current path is " << connectedPath << "." << endl);
     2946    LOG(1, "INFO: Current path is " << connectedPath << ".");
    29272947
    29282948    // go through list, look for reappearance of starting Point and count
     
    29332953      if ((*CircleRunner == *CircleStart) && (CircleRunner != CircleStart)) { // is not the very first point
    29342954        // we have a closed circle from Marker to new Marker
    2935         DoLog(1) && (Log() << Verbose(1) << count + 1 << ". closed path consists of: ");
     2955        if (DoLog(1)) {
     2956          std::stringstream output;
     2957          output << count + 1 << ". closed path consists of: ";
     2958          for (TesselPointList::iterator CircleSprinter = Marker;
     2959              CircleSprinter != CircleRunner;
     2960              CircleSprinter++)
     2961            output << (**CircleSprinter) << " <-> ";
     2962          LOG(1, output.str());
     2963        }
    29362964        newPath = new TesselPointList;
    29372965        TesselPointList::iterator CircleSprinter = Marker;
    2938         for (; CircleSprinter != CircleRunner; CircleSprinter++) {
     2966        for (; CircleSprinter != CircleRunner; CircleSprinter++)
    29392967          newPath->push_back(*CircleSprinter);
    2940           DoLog(0) && (Log() << Verbose(0) << (**CircleSprinter) << " <-> ");
    2941         }
    2942         DoLog(0) && (Log() << Verbose(0) << ".." << endl);
    29432968        count++;
    29442969        Marker = CircleRunner;
     
    29492974    }
    29502975  }
    2951   DoLog(1) && (Log() << Verbose(1) << "INFO: " << count << " closed additional path(s) have been created." << endl);
     2976  LOG(1, "INFO: " << count << " closed additional path(s) have been created.");
    29522977
    29532978  // delete list of paths
     
    29753000
    29763001  if (Point == NULL) {
    2977     DoeLog(1) && (eLog() << Verbose(1) << "Point given is NULL." << endl);
     3002    ELOG(1, "Point given is NULL.");
    29783003  } else {
    29793004    // go through its lines and insert all triangles
     
    30083033
    30093034  if (point == NULL) {
    3010     DoeLog(1) && (eLog() << Verbose(1) << "Cannot remove the point " << point << ", it's NULL!" << endl);
     3035    ELOG(1, "Cannot remove the point " << point << ", it's NULL!");
    30113036    return 0.;
    30123037  } else
    3013     DoLog(0) && (Log() << Verbose(0) << "Removing point " << *point << " from tesselated boundary ..." << endl);
     3038    LOG(0, "Removing point " << *point << " from tesselated boundary ...");
    30143039
    30153040  // copy old location for the volume
     
    30183043  // get list of connected points
    30193044  if (point->lines.empty()) {
    3020     DoeLog(1) && (eLog() << Verbose(1) << "Cannot remove the point " << *point << ", it's connected to no lines!" << endl);
     3045    ELOG(1, "Cannot remove the point " << *point << ", it's connected to no lines!");
    30213046    return 0.;
    30223047  }
     
    30413066  NormalVector.Zero();
    30423067  for (TriangleMap::iterator Runner = Candidates.begin(); Runner != Candidates.end(); Runner++) {
    3043     DoLog(1) && (Log() << Verbose(1) << "INFO: Removing triangle " << *(Runner->second) << "." << endl);
     3068    LOG(1, "INFO: Removing triangle " << *(Runner->second) << ".");
    30443069    NormalVector -= Runner->second->NormalVector; // has to point inward
    30453070    RemoveTesselationTriangle(Runner->second);
    30463071    count++;
    30473072  }
    3048   DoLog(1) && (Log() << Verbose(1) << count << " triangles were removed." << endl);
     3073  LOG(1, count << " triangles were removed.");
    30493074
    30503075  list<TesselPointList *>::iterator ListAdvance = ListOfClosedPaths->begin();
     
    30703095        smallestangle = 0.;
    30713096        for (MiddleNode = connectedPath->begin(); MiddleNode != connectedPath->end(); MiddleNode++) {
    3072           DoLog(1) && (Log() << Verbose(1) << "INFO: MiddleNode is " << **MiddleNode << "." << endl);
     3097          LOG(1, "INFO: MiddleNode is " << **MiddleNode << ".");
    30733098          // construct vectors to next and previous neighbour
    30743099          StartNode = MiddleNode;
     
    30763101            StartNode = connectedPath->end();
    30773102          StartNode--;
    3078           //Log() << Verbose(3) << "INFO: StartNode is " << **StartNode << "." << endl;
     3103          //LOG(3, "INFO: StartNode is " << **StartNode << ".");
    30793104          Point = ((*StartNode)->getPosition()) - ((*MiddleNode)->getPosition());
    30803105          StartNode = MiddleNode;
     
    30823107          if (StartNode == connectedPath->end())
    30833108            StartNode = connectedPath->begin();
    3084           //Log() << Verbose(3) << "INFO: EndNode is " << **StartNode << "." << endl;
     3109          //LOG(3, "INFO: EndNode is " << **StartNode << ".");
    30853110          Reference = ((*StartNode)->getPosition()) - ((*MiddleNode)->getPosition());
    30863111          OrthogonalVector = ((*MiddleNode)->getPosition()) - OldPoint;
     
    30953120        MiddleNode = EndNode;
    30963121        if (MiddleNode == connectedPath->end()) {
    3097           DoeLog(0) && (eLog() << Verbose(0) << "CRITICAL: Could not find a smallest angle!" << endl);
     3122          ELOG(0, "CRITICAL: Could not find a smallest angle!");
    30983123          performCriticalExit();
    30993124        }
     
    31053130        if (EndNode == connectedPath->end())
    31063131          EndNode = connectedPath->begin();
    3107         DoLog(2) && (Log() << Verbose(2) << "INFO: StartNode is " << **StartNode << "." << endl);
    3108         DoLog(2) && (Log() << Verbose(2) << "INFO: MiddleNode is " << **MiddleNode << "." << endl);
    3109         DoLog(2) && (Log() << Verbose(2) << "INFO: EndNode is " << **EndNode << "." << endl);
    3110         DoLog(1) && (Log() << Verbose(1) << "INFO: Attempting to create triangle " << (*StartNode)->getName() << ", " << (*MiddleNode)->getName() << " and " << (*EndNode)->getName() << "." << endl);
     3132        LOG(2, "INFO: StartNode is " << **StartNode << ".");
     3133        LOG(2, "INFO: MiddleNode is " << **MiddleNode << ".");
     3134        LOG(2, "INFO: EndNode is " << **EndNode << ".");
     3135        LOG(1, "INFO: Attempting to create triangle " << (*StartNode)->getName() << ", " << (*MiddleNode)->getName() << " and " << (*EndNode)->getName() << ".");
    31113136        TriangleCandidates[0] = *StartNode;
    31123137        TriangleCandidates[1] = *MiddleNode;
     
    31143139        triangle = GetPresentTriangle(TriangleCandidates);
    31153140        if (triangle != NULL) {
    3116           DoeLog(0) && (eLog() << Verbose(0) << "New triangle already present, skipping!" << endl);
     3141          ELOG(0, "New triangle already present, skipping!");
    31173142          StartNode++;
    31183143          MiddleNode++;
     
    31263151          continue;
    31273152        }
    3128         DoLog(3) && (Log() << Verbose(3) << "Adding new triangle points." << endl);
     3153        LOG(3, "Adding new triangle points.");
    31293154        AddTesselationPoint(*StartNode, 0);
    31303155        AddTesselationPoint(*MiddleNode, 1);
    31313156        AddTesselationPoint(*EndNode, 2);
    3132         DoLog(3) && (Log() << Verbose(3) << "Adding new triangle lines." << endl);
     3157        LOG(3, "Adding new triangle lines.");
    31333158        AddTesselationLine(NULL, NULL, TPS[0], TPS[1], 0);
    31343159        AddTesselationLine(NULL, NULL, TPS[0], TPS[2], 1);
     
    31453170        // prepare nodes for next triangle
    31463171        StartNode = EndNode;
    3147         DoLog(2) && (Log() << Verbose(2) << "Removing " << **MiddleNode << " from closed path, remaining points: " << connectedPath->size() << "." << endl);
     3172        LOG(2, "Removing " << **MiddleNode << " from closed path, remaining points: " << connectedPath->size() << ".");
    31483173        connectedPath->remove(*MiddleNode); // remove the middle node (it is surrounded by triangles)
    31493174        if (connectedPath->size() == 2) { // we are done
     
    31523177          break;
    31533178        } else if (connectedPath->size() < 2) { // something's gone wrong!
    3154           DoeLog(0) && (eLog() << Verbose(0) << "CRITICAL: There are only two endpoints left!" << endl);
     3179          ELOG(0, "CRITICAL: There are only two endpoints left!");
    31553180          performCriticalExit();
    31563181        } else {
     
    31813206          if (maxgain != 0) {
    31823207            volume += maxgain;
    3183             DoLog(1) && (Log() << Verbose(1) << "Flipping baseline with highest volume" << **Candidate << "." << endl);
     3208            LOG(1, "Flipping baseline with highest volume" << **Candidate << ".");
    31843209            OtherBase = FlipBaseline(*Candidate);
    31853210            NewLines.erase(Candidate);
     
    31923217      delete (connectedPath);
    31933218    }
    3194     DoLog(0) && (Log() << Verbose(0) << count << " triangles were created." << endl);
     3219    LOG(0, count << " triangles were created.");
    31953220  } else {
    31963221    while (!ListOfClosedPaths->empty()) {
     
    32003225      delete (connectedPath);
    32013226    }
    3202     DoLog(0) && (Log() << Verbose(0) << "No need to create any triangles." << endl);
     3227    LOG(0, "No need to create any triangles.");
    32033228  }
    32043229  delete (ListOfClosedPaths);
    32053230
    3206   DoLog(0) && (Log() << Verbose(0) << "Removed volume is " << volume << "." << endl);
     3231  LOG(0, "Removed volume is " << volume << ".");
    32073232
    32083233  return volume;
     
    32983323    }
    32993324    default:
    3300       DoeLog(0) && (eLog() << Verbose(0) << "Number of wildcards is greater than 3, cannot happen!" << endl);
     3325      ELOG(0, "Number of wildcards is greater than 3, cannot happen!");
    33013326      performCriticalExit();
    33023327      break;
     
    33543379  // sanity check
    33553380  if (LinesOnBoundary.empty()) {
    3356     DoeLog(2) && (eLog() << Verbose(2) << "FindAllDegeneratedTriangles() was called without any tesselation structure.");
     3381    ELOG(2, "FindAllDegeneratedTriangles() was called without any tesselation structure.");
    33573382    return DegeneratedLines;
    33583383  }
     
    33693394  AllLines.clear();
    33703395
    3371   DoLog(0) && (Log() << Verbose(0) << "FindAllDegeneratedLines() found " << DegeneratedLines->size() << " lines." << endl);
     3396  LOG(0, "FindAllDegeneratedLines() found " << DegeneratedLines->size() << " lines.");
    33723397  IndexToIndex::iterator it;
    33733398  for (it = DegeneratedLines->begin(); it != DegeneratedLines->end(); it++) {
     
    33753400    const LineMap::const_iterator Line2 = LinesOnBoundary.find((*it).second);
    33763401    if (Line1 != LinesOnBoundary.end() && Line2 != LinesOnBoundary.end())
    3377       DoLog(0) && (Log() << Verbose(0) << *Line1->second << " => " << *Line2->second << endl);
     3402      LOG(0, *Line1->second << " => " << *Line2->second);
    33783403    else
    3379       DoeLog(1) && (eLog() << Verbose(1) << "Either " << (*it).first << " or " << (*it).second << " are not in LinesOnBoundary!" << endl);
     3404      ELOG(1, "Either " << (*it).first << " or " << (*it).second << " are not in LinesOnBoundary!");
    33803405  }
    33813406
     
    34173442  delete (DegeneratedLines);
    34183443
    3419   DoLog(0) && (Log() << Verbose(0) << "FindAllDegeneratedTriangles() found " << DegeneratedTriangles->size() << " triangles:" << endl);
     3444  LOG(0, "FindAllDegeneratedTriangles() found " << DegeneratedTriangles->size() << " triangles:");
    34203445  for (IndexToIndex::iterator it = DegeneratedTriangles->begin(); it != DegeneratedTriangles->end(); it++)
    3421     DoLog(0) && (Log() << Verbose(0) << (*it).first << " => " << (*it).second << endl);
     3446    LOG(0, (*it).first << " => " << (*it).second);
    34223447
    34233448  return DegeneratedTriangles;
     
    34383463  // iterate over all degenerated triangles
    34393464  for (IndexToIndex::iterator TriangleKeyRunner = DegeneratedTriangles->begin(); !DegeneratedTriangles->empty(); TriangleKeyRunner = DegeneratedTriangles->begin()) {
    3440     DoLog(0) && (Log() << Verbose(0) << "Checking presence of triangles " << TriangleKeyRunner->first << " and " << TriangleKeyRunner->second << "." << endl);
     3465    LOG(0, "Checking presence of triangles " << TriangleKeyRunner->first << " and " << TriangleKeyRunner->second << ".");
    34413466    // both ways are stored in the map, only use one
    34423467    if (TriangleKeyRunner->first > TriangleKeyRunner->second)
     
    34953520      // erase the pair
    34963521      count += (int) DegeneratedTriangles->erase(triangle->Nr);
    3497       DoLog(0) && (Log() << Verbose(0) << "RemoveDegeneratedTriangles() removes triangle " << *triangle << "." << endl);
     3522      LOG(0, "RemoveDegeneratedTriangles() removes triangle " << *triangle << ".");
    34983523      RemoveTesselationTriangle(triangle);
    34993524      count += (int) DegeneratedTriangles->erase(partnerTriangle->Nr);
    3500       DoLog(0) && (Log() << Verbose(0) << "RemoveDegeneratedTriangles() removes triangle " << *partnerTriangle << "." << endl);
     3525      LOG(0, "RemoveDegeneratedTriangles() removes triangle " << *partnerTriangle << ".");
    35013526      RemoveTesselationTriangle(partnerTriangle);
    35023527    } else {
    3503       DoLog(0) && (Log() << Verbose(0) << "RemoveDegeneratedTriangles() does not remove triangle " << *triangle << " and its partner " << *partnerTriangle << " because it is essential for at" << " least one of the endpoints to be kept in the tesselation structure." << endl);
     3528      LOG(0, "RemoveDegeneratedTriangles() does not remove triangle " << *triangle << " and its partner " << *partnerTriangle << " because it is essential for at" << " least one of the endpoints to be kept in the tesselation structure.");
    35043529    }
    35053530  }
     
    35083533    LastTriangle = NULL;
    35093534
    3510   DoLog(0) && (Log() << Verbose(0) << "RemoveDegeneratedTriangles() removed " << count << " triangles:" << endl);
     3535  LOG(0, "RemoveDegeneratedTriangles() removed " << count << " triangles:");
    35113536}
    35123537
     
    35343559    NearestBoundaryPoint = PointRunner->second;
    35353560  } else {
    3536     DoeLog(1) && (eLog() << Verbose(1) << "I cannot find the boundary point." << endl);
     3561    ELOG(1, "I cannot find the boundary point.");
    35373562    return;
    35383563  }
    3539   DoLog(0) && (Log() << Verbose(0) << "Nearest point on boundary is " << NearestPoint->getName() << "." << endl);
     3564  LOG(0, "Nearest point on boundary is " << NearestPoint->getName() << ".");
    35403565
    35413566  // go through its lines and find the best one to split
     
    35693594
    35703595  // create new triangle to connect point (connects automatically with the missing spot of the chosen line)
    3571   DoLog(2) && (Log() << Verbose(2) << "Adding new triangle points." << endl);
     3596  LOG(2, "Adding new triangle points.");
    35723597  AddTesselationPoint((BestLine->endpoints[0]->node), 0);
    35733598  AddTesselationPoint((BestLine->endpoints[1]->node), 1);
    35743599  AddTesselationPoint(point, 2);
    3575   DoLog(2) && (Log() << Verbose(2) << "Adding new triangle lines." << endl);
     3600  LOG(2, "Adding new triangle lines.");
    35763601  AddTesselationLine(NULL, NULL, TPS[0], TPS[1], 0);
    35773602  AddTesselationLine(NULL, NULL, TPS[0], TPS[2], 1);
     
    35803605  BTS->GetNormalVector(TempTriangle->NormalVector);
    35813606  BTS->NormalVector.Scale(-1.);
    3582   DoLog(1) && (Log() << Verbose(1) << "INFO: NormalVector of new triangle is " << BTS->NormalVector << "." << endl);
     3607  LOG(1, "INFO: NormalVector of new triangle is " << BTS->NormalVector << ".");
    35833608  AddTesselationTriangle();
    35843609
    35853610  // create other side of this triangle and close both new sides of the first created triangle
    3586   DoLog(2) && (Log() << Verbose(2) << "Adding new triangle points." << endl);
     3611  LOG(2, "Adding new triangle points.");
    35873612  AddTesselationPoint((BestLine->endpoints[0]->node), 0);
    35883613  AddTesselationPoint((BestLine->endpoints[1]->node), 1);
    35893614  AddTesselationPoint(point, 2);
    3590   DoLog(2) && (Log() << Verbose(2) << "Adding new triangle lines." << endl);
     3615  LOG(2, "Adding new triangle lines.");
    35913616  AddTesselationLine(NULL, NULL, TPS[0], TPS[1], 0);
    35923617  AddTesselationLine(NULL, NULL, TPS[0], TPS[2], 1);
     
    35943619  BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount);
    35953620  BTS->GetNormalVector(TempTriangle->NormalVector);
    3596   DoLog(1) && (Log() << Verbose(1) << "INFO: NormalVector of other new triangle is " << BTS->NormalVector << "." << endl);
     3621  LOG(1, "INFO: NormalVector of other new triangle is " << BTS->NormalVector << ".");
    35973622  AddTesselationTriangle();
    35983623
     
    36013626    if ((BTS->lines[i]->ContainsBoundaryPoint(BestLine->endpoints[0])) && (BTS->lines[i]->ContainsBoundaryPoint(BestLine->endpoints[1]))) {
    36023627      if (BestLine == BTS->lines[i]) {
    3603         DoeLog(0) && (eLog() << Verbose(0) << "BestLine is same as found line, something's wrong here!" << endl);
     3628        ELOG(0, "BestLine is same as found line, something's wrong here!");
    36043629        performCriticalExit();
    36053630      }
     
    36343659        NameofTempFile.erase(npos, 1);
    36353660      NameofTempFile.append(TecplotSuffix);
    3636       DoLog(0) && (Log() << Verbose(0) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n");
     3661      LOG(1, "INFO: Writing temporary non convex hull to file " << NameofTempFile << ".");
    36373662      tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc);
    36383663      WriteTecplotFile(tempstream, this, cloud, TriangleFilesWritten);
     
    36483673        NameofTempFile.erase(npos, 1);
    36493674      NameofTempFile.append(Raster3DSuffix);
    3650       DoLog(0) && (Log() << Verbose(0) << "Writing temporary non convex hull to file " << NameofTempFile << ".\n");
     3675      LOG(1, "INFO: Writing temporary non convex hull to file " << NameofTempFile << ".");
    36513676      tempstream = new ofstream(NameofTempFile.c_str(), ios::trunc);
    36523677      WriteRaster3dFile(tempstream, this, cloud);
     
    37003725  pair<map<int, Vector *>::iterator, bool> TriangleInsertionTester;
    37013726  for (PointMap::const_iterator Runner = PointsOnBoundary.begin(); Runner != PointsOnBoundary.end(); Runner++) {
    3702     DoLog(0) && (Log() << Verbose(0) << "Current point is " << *Runner->second << "." << endl);
     3727    LOG(0, "Current point is " << *Runner->second << ".");
    37033728    map<int, Vector *> TriangleVectors;
    37043729    // gather all NormalVectors
    3705     DoLog(1) && (Log() << Verbose(1) << "Gathering triangles ..." << endl);
     3730    LOG(1, "Gathering triangles ...");
    37063731    for (LineMap::const_iterator LineRunner = (Runner->second)->lines.begin(); LineRunner != (Runner->second)->lines.end(); LineRunner++)
    37073732      for (TriangleMap::const_iterator TriangleRunner = (LineRunner->second)->triangles.begin(); TriangleRunner != (LineRunner->second)->triangles.end(); TriangleRunner++) {
     
    37093734          TriangleInsertionTester = TriangleVectors.insert(pair<int, Vector *> ((TriangleRunner->second)->Nr, &((TriangleRunner->second)->NormalVector)));
    37103735          if (TriangleInsertionTester.second)
    3711             DoLog(1) && (Log() << Verbose(1) << " Adding triangle " << *(TriangleRunner->second) << " to triangles to check-list." << endl);
     3736            LOG(1, " Adding triangle " << *(TriangleRunner->second) << " to triangles to check-list.");
    37123737        } else {
    3713           DoLog(1) && (Log() << Verbose(1) << " NOT adding triangle " << *(TriangleRunner->second) << " as it's a simply degenerated one." << endl);
     3738          LOG(1, " NOT adding triangle " << *(TriangleRunner->second) << " as it's a simply degenerated one.");
    37143739        }
    37153740      }
    37163741    // check whether there are two that are parallel
    3717     DoLog(1) && (Log() << Verbose(1) << "Finding two parallel triangles ..." << endl);
     3742    LOG(1, "Finding two parallel triangles ...");
    37183743    for (map<int, Vector *>::iterator VectorWalker = TriangleVectors.begin(); VectorWalker != TriangleVectors.end(); VectorWalker++)
    37193744      for (map<int, Vector *>::iterator VectorRunner = VectorWalker; VectorRunner != TriangleVectors.end(); VectorRunner++)
    37203745        if (VectorWalker != VectorRunner) { // skip equals
    37213746          const double SCP = VectorWalker->second->ScalarProduct(*VectorRunner->second); // ScalarProduct should result in -1. for degenerated triangles
    3722           DoLog(1) && (Log() << Verbose(1) << "Checking " << *VectorWalker->second << " against " << *VectorRunner->second << ": " << SCP << endl);
     3747          LOG(1, "Checking " << *VectorWalker->second << " against " << *VectorRunner->second << ": " << SCP);
    37233748          if (fabs(SCP + 1.) < ParallelEpsilon) {
    37243749            InsertionTester = EndpointCandidateList.insert((Runner->second));
    37253750            if (InsertionTester.second)
    3726               DoLog(0) && (Log() << Verbose(0) << " Adding " << *Runner->second << " to endpoint candidate list." << endl);
     3751              LOG(0, " Adding " << *Runner->second << " to endpoint candidate list.");
    37273752            // and break out of both loops
    37283753            VectorWalker = TriangleVectors.end();
     
    37433768    Walker = *(EndpointCandidateList.begin());
    37443769    if (Current == NULL) { // create a new polygon with current candidate
    3745       DoLog(0) && (Log() << Verbose(0) << "Starting new polygon set at point " << *Walker << endl);
     3770      LOG(0, "Starting new polygon set at point " << *Walker);
    37463771      Current = new BoundaryPolygonSet;
    37473772      Current->endpoints.insert(Walker);
     
    37563781      for (LineMap::const_iterator LineWalker = Walker->lines.begin(); LineWalker != Walker->lines.end(); LineWalker++) {
    37573782        OtherWalker = (LineWalker->second)->GetOtherEndpoint(Walker);
    3758         DoLog(1) && (Log() << Verbose(1) << "Checking " << *OtherWalker << endl);
     3783        LOG(1, "Checking " << *OtherWalker);
    37593784        set<BoundaryPointSet *>::iterator Finder = EndpointCandidateList.find(OtherWalker);
    37603785        if (Finder != EndpointCandidateList.end()) { // found a connected partner
    3761           DoLog(1) && (Log() << Verbose(1) << " Adding to polygon." << endl);
     3786          LOG(1, " Adding to polygon.");
    37623787          Current->endpoints.insert(OtherWalker);
    37633788          EndpointCandidateList.erase(Finder); // remove from candidates
    37643789          ToCheckConnecteds.push(OtherWalker); // but check its partners too
    37653790        } else {
    3766           DoLog(1) && (Log() << Verbose(1) << " is not connected to " << *Walker << endl);
     3791          LOG(1, " is not connected to " << *Walker);
    37673792        }
    37683793      }
    37693794    }
    37703795
    3771     DoLog(0) && (Log() << Verbose(0) << "Final polygon is " << *Current << endl);
     3796    LOG(0, "Final polygon is " << *Current);
    37723797    ListofDegeneratedPolygons.insert(Current);
    37733798    Current = NULL;
     
    37763801  const int counter = ListofDegeneratedPolygons.size();
    37773802
    3778   DoLog(0) && (Log() << Verbose(0) << "The following " << counter << " degenerated polygons have been found: " << endl);
    3779   for (UniquePolygonSet::iterator PolygonRunner = ListofDegeneratedPolygons.begin(); PolygonRunner != ListofDegeneratedPolygons.end(); PolygonRunner++)
    3780     DoLog(0) && (Log() << Verbose(0) << " " << **PolygonRunner << endl);
     3803  if (DoLog(0)) {
     3804    std::stringstream output;
     3805    output << "The following " << counter << " degenerated polygons have been found: ";
     3806    for (UniquePolygonSet::iterator PolygonRunner = ListofDegeneratedPolygons.begin(); PolygonRunner != ListofDegeneratedPolygons.end(); PolygonRunner++)
     3807      output << " " << **PolygonRunner;
     3808    LOG(0, output.str());
     3809  }
    37813810
    37823811  /// 4. Go through all these degenerated polygons
     
    37893818    // check whether number is bigger than 2, otherwise it's just a simply degenerated one and nothing to do.
    37903819    if (T->size() == 2) {
    3791       DoLog(1) && (Log() << Verbose(1) << " Skipping degenerated polygon, is just a (already simply degenerated) triangle." << endl);
     3820      LOG(1, " Skipping degenerated polygon, is just a (already simply degenerated) triangle.");
    37923821      delete (T);
    37933822      continue;
     
    37993828    // connections to either polygon ...
    38003829    if (T->size() % 2 != 0) {
    3801       DoeLog(0) && (eLog() << Verbose(0) << " degenerated polygon contains an odd number of triangles, probably contains bridging non-degenerated ones, too!" << endl);
     3830      ELOG(0, " degenerated polygon contains an odd number of triangles, probably contains bridging non-degenerated ones, too!");
    38023831      performCriticalExit();
    38033832    }
     
    38053834    /// 4a. Get NormalVector for one side (this is "front")
    38063835    NormalVector = (*TriangleWalker)->NormalVector;
    3807     DoLog(1) && (Log() << Verbose(1) << "\"front\" defining triangle is " << **TriangleWalker << " and Normal vector of \"front\" side is " << NormalVector << endl);
     3836    LOG(1, "\"front\" defining triangle is " << **TriangleWalker << " and Normal vector of \"front\" side is " << NormalVector);
    38083837    TriangleWalker++;
    38093838    TriangleSet::iterator TriangleSprinter = TriangleWalker; // is the inner advanced iterator
     
    38143843      triangle = *TriangleWalker;
    38153844      TriangleSprinter++;
    3816       DoLog(1) && (Log() << Verbose(1) << "Current triangle to test for removal: " << *triangle << endl);
     3845      LOG(1, "Current triangle to test for removal: " << *triangle);
    38173846      if (triangle->NormalVector.ScalarProduct(NormalVector) < 0) { // if from other side, then delete and remove from list
    3818         DoLog(1) && (Log() << Verbose(1) << " Removing ... " << endl);
     3847        LOG(1, " Removing ... ");
    38193848        TriangleNrs.push(triangle->Nr);
    38203849        T->erase(TriangleWalker);
    38213850        RemoveTesselationTriangle(triangle);
    38223851      } else
    3823         DoLog(1) && (Log() << Verbose(1) << " Keeping ... " << endl);
     3852        LOG(1, " Keeping ... ");
    38243853    }
    38253854    /// 4c. Copy all "front" triangles but with inverse NormalVector
    38263855    TriangleWalker = T->begin();
    38273856    while (TriangleWalker != T->end()) { // go through all front triangles
    3828       DoLog(1) && (Log() << Verbose(1) << " Re-creating triangle " << **TriangleWalker << " with NormalVector " << (*TriangleWalker)->NormalVector << endl);
     3857      LOG(1, " Re-creating triangle " << **TriangleWalker << " with NormalVector " << (*TriangleWalker)->NormalVector);
    38293858      for (int i = 0; i < 3; i++)
    38303859        AddTesselationPoint((*TriangleWalker)->endpoints[i]->node, i);
     
    38333862      AddTesselationLine(NULL, NULL, TPS[1], TPS[2], 2);
    38343863      if (TriangleNrs.empty())
    3835         DoeLog(0) && (eLog() << Verbose(0) << "No more free triangle numbers!" << endl);
     3864        ELOG(0, "No more free triangle numbers!");
    38363865      BTS = new BoundaryTriangleSet(BLS, TriangleNrs.top()); // copy triangle ...
    38373866      AddTesselationTriangle(); // ... and add
     
    38413870    }
    38423871    if (!TriangleNrs.empty()) {
    3843       DoeLog(0) && (eLog() << Verbose(0) << "There have been less triangles created than removed!" << endl);
     3872      ELOG(0, "There have been less triangles created than removed!");
    38443873    }
    38453874    delete (T); // remove the triangleset
    38463875  }
    38473876  IndexToIndex * SimplyDegeneratedTriangles = FindAllDegeneratedTriangles();
    3848   DoLog(0) && (Log() << Verbose(0) << "Final list of simply degenerated triangles found, containing " << SimplyDegeneratedTriangles->size() << " triangles:" << endl);
     3877  LOG(0, "Final list of simply degenerated triangles found, containing " << SimplyDegeneratedTriangles->size() << " triangles:");
    38493878  IndexToIndex::iterator it;
    38503879  for (it = SimplyDegeneratedTriangles->begin(); it != SimplyDegeneratedTriangles->end(); it++)
    3851     DoLog(0) && (Log() << Verbose(0) << (*it).first << " => " << (*it).second << endl);
     3880    LOG(0, (*it).first << " => " << (*it).second);
    38523881  delete (SimplyDegeneratedTriangles);
    38533882  /// 5. exit
  • src/Tesselation/tesselationhelpers.cpp

    r50e4e5 r47d041  
    7676
    7777  if (fabs(m11) < MYEPSILON)
    78     DoeLog(1) && (eLog()<< Verbose(1) << "three points are colinear." << endl);
     78    ELOG(1, "three points are colinear.");
    7979
    8080  center->at(0) =  0.5 * m12/ m11;
     
    8383
    8484  if (fabs(a.distance(*center) - RADIUS) > MYEPSILON)
    85     DoeLog(1) && (eLog()<< Verbose(1) << "The given center is further way by " << fabs(a.distance(*center) - RADIUS) << " from a than RADIUS." << endl);
     85    ELOG(1, "The given center is further way by " << fabs(a.distance(*center) - RADIUS) << " from a than RADIUS.");
    8686};
    8787
     
    122122  Center->Scale(1./(sin(2.*alpha) + sin(2.*beta) + sin(2.*gamma)));
    123123  (*NewUmkreismittelpunkt) = (*Center);
    124   DoLog(1) && (Log() << Verbose(1) << "Center of new circumference is " << *NewUmkreismittelpunkt << ".\n");
     124  LOG(2, "INFO: Center of new circumference is " << *NewUmkreismittelpunkt << ".");
    125125  // Here we calculated center of circumscribing circle, using barycentric coordinates
    126   DoLog(1) && (Log() << Verbose(1) << "Center of circumference is " << *Center << " in direction " << *Direction << ".\n");
     126  LOG(2, "INFO: Center of circumference is " << *Center << " in direction " << *Direction << ".");
    127127
    128128  TempNormal = a - b;
     
    146146  TempNormal.Normalize();
    147147  Restradius = sqrt(RADIUS*RADIUS - Umkreisradius*Umkreisradius);
    148   DoLog(1) && (Log() << Verbose(1) << "Height of center of circumference to center of sphere is " << Restradius << ".\n");
     148  LOG(2, "Height of center of circumference to center of sphere is " << Restradius << ".");
    149149  TempNormal.Scale(Restradius);
    150   DoLog(1) && (Log() << Verbose(1) << "Shift vector to sphere of circumference is " << TempNormal << ".\n");
     150  LOG(2, "Shift vector to sphere of circumference is " << TempNormal << ".");
    151151  (*Center) += TempNormal;
    152   DoLog(1) && (Log() << Verbose(1) << "Center of sphere of circumference is " << *Center << ".\n");
     152  LOG(2, "Center of sphere of circumference is " << *Center << ".");
    153153  GetSphere(&OtherCenter, a, b, c, RADIUS);
    154   DoLog(1) && (Log() << Verbose(1) << "OtherCenter of sphere of circumference is " << OtherCenter << ".\n");
     154  LOG(2, "OtherCenter of sphere of circumference is " << OtherCenter << ".");
    155155};
    156156
     
    180180  if (fabs(helper[0]+helper[1]+helper[2]) > MYEPSILON)
    181181    Center.Scale(1./(helper[0]+helper[1]+helper[2]));
    182   Log() << Verbose(1) << "INFO: Center (2nd algo) is at " << Center << "." << endl;
     182  LOG(1, "INFO: Center (2nd algo) is at " << Center << ".");
    183183};
    184184
     
    208208  // test whether new center is on the parameter circle's plane
    209209  if (fabs(helper.ScalarProduct(CirclePlaneNormal)) > HULLEPSILON) {
    210     DoeLog(1) && (eLog()<< Verbose(1) << "Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(CirclePlaneNormal))  << "!" << endl);
     210    ELOG(1, "Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(CirclePlaneNormal))  << "!");
    211211    helper.ProjectOntoPlane(CirclePlaneNormal);
    212212  }
     
    214214  // test whether the new center vector has length of CircleRadius
    215215  if (fabs(radius - CircleRadius) > HULLEPSILON)
    216     DoeLog(1) && (eLog()<< Verbose(1) << "The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl);
     216    ELOG(1, "The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << ".");
    217217  alpha = helper.Angle(RelativeOldSphereCenter);
    218218  // make the angle unique by checking the halfplanes/search direction
    219219  if (helper.ScalarProduct(SearchDirection) < -HULLEPSILON)  // acos is not unique on [0, 2.*M_PI), hence extra check to decide between two half intervals
    220220    alpha = 2.*M_PI - alpha;
    221   DoLog(1) && (Log() << Verbose(1) << "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << RelativeOldSphereCenter << " and resulting angle is " << alpha << "." << endl);
     221  LOG(1, "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << RelativeOldSphereCenter << " and resulting angle is " << alpha << ".");
    222222  radius = helper.distance(RelativeOldSphereCenter);
    223223  helper.ProjectOntoPlane(NormalVector);
    224224  // check whether new center is somewhat away or at least right over the current baseline to prevent intersecting triangles
    225225  if ((radius > HULLEPSILON) || (helper.Norm() < HULLEPSILON)) {
    226     DoLog(1) && (Log() << Verbose(1) << "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "." << endl);
     226    LOG(1, "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << ".");
    227227    return alpha;
    228228  } else {
    229     DoLog(1) && (Log() << Verbose(1) << "INFO: NewSphereCenter " << RelativeNewSphereCenter << " is too close to RelativeOldSphereCenter" << RelativeOldSphereCenter << "." << endl);
     229    LOG(1, "INFO: NewSphereCenter " << RelativeNewSphereCenter << " is too close to RelativeOldSphereCenter" << RelativeOldSphereCenter << ".");
    230230    return 2.*M_PI;
    231231  }
     
    262262  }
    263263
    264   DoLog(1) && (Log() << Verbose(1) << "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << "." << endl);
     264  LOG(1, "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << ".");
    265265
    266266  return phi;
     
    329329    for (int j=i+1; j<3; j++) {
    330330      if (nodes[i] == NULL) {
    331         DoLog(1) && (Log() << Verbose(1) << "Node nr. " << i << " is not yet present." << endl);
     331        LOG(1, "Node nr. " << i << " is not yet present.");
    332332        result = true;
    333333      } else if (nodes[i]->lines.find(nodes[j]->node->getNr()) != nodes[i]->lines.end()) {  // there already is a line
     
    343343        }
    344344      } else { // no line
    345         DoLog(1) && (Log() << Verbose(1) << "The line between " << *nodes[i] << " and " << *nodes[j] << " is not yet present, hence no need for a degenerate triangle." << endl);
     345        LOG(1, "The line between " << *nodes[i] << " and " << *nodes[j] << " is not yet present, hence no need for a degenerate triangle.");
    346346        result = true;
    347347      }
    348348    }
    349349  if ((!result) && (counter > 1)) {
    350     DoLog(1) && (Log() << Verbose(1) << "INFO: Degenerate triangle is ok, at least two, here " << counter << ", existing lines are used." << endl);
     350    LOG(1, "INFO: Degenerate triangle is ok, at least two, here " << counter << ", existing lines are used.");
    351351    result = true;
    352352  }
     
    362362//  Vector BaseLineVector, OrthogonalVector, helper;
    363363//  if (candidate1->BaseLine != candidate2->BaseLine) {  // sanity check
    364 //    DoeLog(1) && (eLog()<< Verbose(1) << "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl);
     364//    ELOG(1, "sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << ".");
    365365//    //return false;
    366366//    exit(1);
     
    393393//  }
    394394//
    395 //  Log() << Verbose(1) << *candidate1->point << " has angle " << phi << endl;
    396 //  Log() << Verbose(1) << *candidate2->point << " has angle " << psi << endl;
     395//  LOG(1, *candidate1->point << " has angle " << phi);
     396//  LOG(1, *candidate2->point << " has angle " << psi);
    397397//
    398398//  // return comparison
     
    421421  for(int i=0;i<NDIM;i++) // store indices of this cell
    422422    N[i] = LC->n[i];
    423   DoLog(1) && (Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl);
     423  LOG(1, "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
    424424
    425425  LC->GetNeighbourBounds(Nlower, Nupper);
    426   //Log() << Verbose(1) << endl;
    427426  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    428427    for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    429428      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    430429        const TesselPointSTLList *List = LC->GetCurrentCell();
    431         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
     430        //LOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2]);
    432431        if (List != NULL) {
    433432          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    441440              distance = currentNorm;
    442441              closestPoint = (*Runner);
    443               //Log() << Verbose(2) << "INFO: New Second Nearest Neighbour is " << *secondClosestPoint << "." << endl;
     442              //LOG(2, "INFO: New Second Nearest Neighbour is " << *secondClosestPoint << ".");
    444443            }
    445444          }
    446445        } else {
    447           DoeLog(1) && (eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
     446          ELOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!");
    448447        }
    449448      }
     
    474473  for(int i=0;i<NDIM;i++) // store indices of this cell
    475474    N[i] = LC->n[i];
    476   DoLog(1) && (Log() << Verbose(1) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl);
     475  LOG(1, "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
    477476
    478477  LC->GetNeighbourBounds(Nlower, Nupper);
    479   //Log() << Verbose(1) << endl;
    480478  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    481479    for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    482480      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    483481        const TesselPointSTLList *List = LC->GetCurrentCell();
    484         //Log() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
     482        //LOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2]);
    485483        if (List != NULL) {
    486484          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    492490              distance = currentNorm;
    493491              closestPoint = (*Runner);
    494               //Log() << Verbose(1) << "INFO: New Nearest Neighbour is " << *closestPoint << "." << endl;
     492              //LOG(1, "INFO: New Nearest Neighbour is " << *closestPoint << ".");
    495493            } else if (currentNorm < secondDistance) {
    496494              secondDistance = currentNorm;
    497495              SecondPoint = (*Runner);
    498               //Log() << Verbose(1) << "INFO: New Second Nearest Neighbour is " << *SecondPoint << "." << endl;
     496              //LOG(1, "INFO: New Second Nearest Neighbour is " << *SecondPoint << ".");
    499497            }
    500498          }
    501499        } else {
    502           DoeLog(1) && (eLog() << Verbose(1) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!" << endl);
     500          ELOG(1, "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << " is invalid!");
    503501        }
    504502      }
    505503  // output
    506504  if (closestPoint != NULL) {
    507     DoLog(1) && (Log() << Verbose(1) << "Closest point is " << *closestPoint);
    508     if (SecondPoint != NULL)
    509       DoLog(0) && (Log() << Verbose(0) << " and second closest is " << *SecondPoint);
    510     DoLog(0) && (Log() << Verbose(0) << "." << endl);
     505    if (DoLog(1)) {
     506      std::stringstream output;
     507      output << "Closest point is " << *closestPoint;
     508      if (SecondPoint != NULL)
     509        output << " and second closest is " << *SecondPoint;
     510      LOG(0, output.str() << ".");
     511    }
    511512  }
    512513  return closestPoint;
     
    528529  Normal.VectorProduct(OtherBaseline);
    529530  Normal.Normalize();
    530   DoLog(1) && (Log() << Verbose(1) << "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << "." << endl);
     531  LOG(1, "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << ".");
    531532
    532533  // project one offset point of OtherBase onto this plane (and add plane offset vector)
     
    542543  *Intersection = line1.getIntersection(line2);
    543544  Normal = (*Intersection) - (Base->endpoints[0]->node->getPosition());
    544   DoLog(1) && (Log() << Verbose(1) << "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(Baseline)/Baseline.NormSquared()) << "." << endl);
     545  LOG(1, "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(Baseline)/Baseline.NormSquared()) << ".");
    545546
    546547  return Intersection;
     
    577578  Vector *center = cloud.GetCenter();
    578579  if (vrmlfile != NULL) {
    579     //Log() << Verbose(1) << "Writing Raster3D file ... ";
     580    LOG(1, "INFO: Writing Raster3D file ... ");
    580581    *vrmlfile << "#VRML V2.0 utf8" << endl;
    581582    *vrmlfile << "#Created by molecuilder" << endl;
     
    603604    }
    604605  } else {
    605     DoeLog(1) && (eLog()<< Verbose(1) << "Given vrmlfile is " << vrmlfile << "." << endl);
     606    ELOG(1, "Given vrmlfile is " << vrmlfile << ".");
    606607  }
    607608  delete(center);
     
    649650  Vector *center = cloud.GetCenter();
    650651  if (rasterfile != NULL) {
    651     //Log() << Verbose(1) << "Writing Raster3D file ... ";
     652    LOG(1, "INFO: Writing Raster3D file ... ");
    652653    *rasterfile << "# Raster3D object description, created by MoleCuilder" << endl;
    653654    *rasterfile << "@header.r3d" << endl;
     
    681682    *rasterfile << "9\n#  terminating special property\n";
    682683  } else {
    683     DoeLog(1) && (eLog()<< Verbose(1) << "Given rasterfile is " << rasterfile << "." << endl);
     684    ELOG(1, "Given rasterfile is " << rasterfile << ".");
    684685  }
    685686  IncludeSphereinRaster3D(rasterfile, Tess, cloud);
     
    734735    *tecplot << endl;
    735736    // print connectivity
    736     DoLog(1) && (Log() << Verbose(1) << "The following triangles were created:" << endl);
     737    LOG(1, "The following triangles were created:");
    737738    for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) {
    738       DoLog(1) && (Log() << Verbose(1) << " " << runner->second->endpoints[0]->node->getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName() << endl);
     739      LOG(1, " " << runner->second->endpoints[0]->node->getName() << "<->" << runner->second->endpoints[1]->node->getName() << "<->" << runner->second->endpoints[2]->node->getName());
    739740      *tecplot << LookupList[runner->second->endpoints[0]->node->getNr()] << " " << LookupList[runner->second->endpoints[1]->node->getNr()] << " " << LookupList[runner->second->endpoints[2]->node->getNr()] << endl;
    740741    }
     
    761762  for (PointMap::const_iterator PointRunner = TesselStruct->PointsOnBoundary.begin(); PointRunner != TesselStruct->PointsOnBoundary.end(); PointRunner++) {
    762763    point = PointRunner->second;
    763     DoLog(1) && (Log() << Verbose(1) << "INFO: Current point is " << *point << "." << endl);
     764    LOG(1, "INFO: Current point is " << *point << ".");
    764765
    765766    // calculate mean concavity over all connected line
     
    767768    for (LineMap::iterator LineRunner = point->lines.begin(); LineRunner != point->lines.end(); LineRunner++) {
    768769      line = LineRunner->second;
    769       //Log() << Verbose(1) << "INFO: Current line of point " << *point << " is " << *line << "." << endl;
     770      //LOG(1, "INFO: Current line of point " << *point << " is " << *line << ".");
    770771      ConcavityPerLine -= line->CalculateConvexity();
    771772    }
     
    815816
    816817  for (PointMap::const_iterator PointRunner = TesselStruct->PointsOnBoundary.begin(); PointRunner != TesselStruct->PointsOnBoundary.end(); PointRunner++) {
    817     DoeLog(1) && (eLog() << Verbose(1) << "INFO: Current point is " << * PointRunner->second << "." << endl);
     818    ELOG(1, "INFO: Current point is " << * PointRunner->second << ".");
    818819
    819820    distance = 0.;
     
    840841  int counter = 0;
    841842
    842   DoLog(1) && (Log() << Verbose(1) << "Check: List of Baselines with not two connected triangles:" << endl);
     843  LOG(1, "Check: List of Baselines with not two connected triangles:");
    843844  for (testline = TesselStruct->LinesOnBoundary.begin(); testline != TesselStruct->LinesOnBoundary.end(); testline++) {
    844845    if (testline->second->triangles.size() != 2) {
    845       DoLog(2) && (Log() << Verbose(2) << *testline->second << "\t" << testline->second->triangles.size() << endl);
     846      LOG(2, *testline->second << "\t" << testline->second->triangles.size());
    846847      counter++;
    847848    }
    848849  }
    849850  if (counter == 0) {
    850     DoLog(1) && (Log() << Verbose(1) << "None." << endl);
     851    LOG(1, "None.");
    851852    result = true;
    852853  }
     
    863864  // check number of endpoints in *P
    864865  if (P->endpoints.size() != 4) {
    865     DoeLog(1) && (eLog()<< Verbose(1) << "CountTrianglePairContainingPolygon works only on polygons with 4 nodes!" << endl);
     866    ELOG(1, "CountTrianglePairContainingPolygon works only on polygons with 4 nodes!");
    866867    return 0;
    867868  }
     
    869870  // check number of triangles in *T
    870871  if (T->size() < 2) {
    871     DoeLog(1) && (eLog()<< Verbose(1) << "Not enough triangles to have pairs!" << endl);
     872    ELOG(1, "Not enough triangles to have pairs!");
    872873    return 0;
    873874  }
    874875
    875   DoLog(0) && (Log() << Verbose(0) << "Polygon is " << *P << endl);
     876  LOG(0, "Polygon is " << *P);
    876877  // create each pair, get the endpoints and check whether *P is contained.
    877878  int counter = 0;
     
    889890        const int size = PairTrianglenodes.endpoints.size();
    890891        if (size == 4) {
    891           DoLog(0) && (Log() << Verbose(0) << " Current pair of triangles: " << **Walker << "," << **PairWalker << " with " << size << " distinct endpoints:" << PairTrianglenodes << endl);
     892          LOG(0, " Current pair of triangles: " << **Walker << "," << **PairWalker << " with " << size << " distinct endpoints:" << PairTrianglenodes);
    892893          // now check
    893894          if (PairTrianglenodes.ContainsPresentTupel(P)) {
    894895            counter++;
    895             DoLog(0) && (Log() << Verbose(0) << "  ACCEPT: Matches with " << *P << endl);
     896            LOG(0, "  ACCEPT: Matches with " << *P);
    896897          } else {
    897             DoLog(0) && (Log() << Verbose(0) << "  REJECT: No match with " << *P << endl);
     898            LOG(0, "  REJECT: No match with " << *P);
    898899          }
    899900        } else {
    900           DoLog(0) && (Log() << Verbose(0) << "  REJECT: Less than four endpoints." << endl);
     901          LOG(0, "  REJECT: Less than four endpoints.");
    901902        }
    902903      }
     
    919920    if (P2->ContainsBoundaryPoint((*Runner))) {
    920921      counter++;
    921       DoLog(1) && (Log() << Verbose(1) << *(*Runner) << " of second polygon is found in the first one." << endl);
     922      LOG(1, *(*Runner) << " of second polygon is found in the first one.");
    922923      return true;
    923924    }
     
    937938    Tester = P1->endpoints.insert((*Runner));
    938939    if (Tester.second)
    939       DoLog(0) && (Log() << Verbose(0) << "Inserting endpoint " << *(*Runner) << " into first polygon." << endl);
     940      LOG(0, "Inserting endpoint " << *(*Runner) << " into first polygon.");
    940941  }
    941942  P2->endpoints.clear();
  • src/Tesselation/triangleintersectionlist.cpp

    r50e4e5 r47d041  
    141141  boost::scoped_ptr< DistanceToPointMap > points(Tess->FindClosestBoundaryPointsToVector(Point,Vicinity));
    142142  if (points == NULL) {
    143     DoeLog(1) && (eLog()<< Verbose(1) << "There is no nearest point: too far away from the surface." << endl);
     143    ELOG(1, "There is no nearest point: too far away from the surface.");
    144144    return;
    145145  }
     
    157157    Intersection = new Vector;
    158158    (*TriangleRunner)->GetClosestPointInsideTriangle(Point, *Intersection);
    159     //Log() << Verbose(1) << "Intersection between " << Point << " and " << **TriangleRunner << " is at " << *Intersection << "." << endl;
     159    //LOG(1, "Intersection between " << Point << " and " << **TriangleRunner << " is at " << *Intersection << ".");
    160160    IntersectionList.insert( pair<BoundaryTriangleSet *, Vector * > (*TriangleRunner, Intersection) );
    161161  }
     
    172172
    173173  //for (DistanceTriangleMap::const_iterator runner = DistanceList.begin(); runner != DistanceList.end(); runner++)
    174   //  Log() << Verbose(1) << (*runner).first << " away from " << *(*runner).second << endl;
     174  //  LOG(1, (*runner).first << " away from " << *(*runner).second);
    175175};
    176176
  • src/Tesselation/unittests/Tesselation_InsideOutsideUnitTest.cpp

    r50e4e5 r47d041  
    110110  while ((!TesselStruct->OpenLines.empty()) && (OneLoopWithoutSuccessFlag)) {
    111111    // 2a. fill all new OpenLines
    112     DoLog(1) && (Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl);
     112    LOG(1, "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:");
    113113    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    114       DoLog(2) && (Log() << Verbose(2) << *(Runner->second) << endl);
     114      LOG(2, *(Runner->second));
    115115
    116116    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
     
    118118      if (baseline->pointlist.empty()) {
    119119        T = (((baseline->BaseLine->triangles.begin()))->second);
    120         DoLog(1) && (Log() << Verbose(1) << "Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T << endl);
     120        LOG(1, "Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T);
    121121        TesselationFailFlag = TesselStruct->FindNextSuitableTriangle(*baseline, *T, SPHERERADIUS, LinkedList); //the line is there, so there is a triangle, but only one.
    122122      }
     
    125125    // 2b. search for smallest ShortestAngle among all candidates
    126126    double ShortestAngle = 4.*M_PI;
    127     DoLog(1) && (Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl);
     127    LOG(1, "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:");
    128128    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++)
    129       DoLog(2) && (Log() << Verbose(2) << *(Runner->second) << endl);
     129      LOG(2, *(Runner->second));
    130130
    131131    for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) {
     
    133133        baseline = Runner->second;
    134134        ShortestAngle = baseline->ShortestAngle;
    135         //Log() << Verbose(1) << "New best candidate is " << *baseline->BaseLine << " with point " << *baseline->point << " and angle " << baseline->ShortestAngle << endl;
     135        //LOG(1, "New best candidate is " << *baseline->BaseLine << " with point " << *baseline->point << " and angle " << baseline->ShortestAngle);
    136136      }
    137137    }
Note: See TracChangeset for help on using the changeset viewer.