Ignore:
Timestamp:
Apr 4, 2012, 11:30:11 AM (13 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:
03a589
Parents:
2a3124
git-author:
Frederik Heber <heber@…> (03/13/12 19:35:15)
git-committer:
Frederik Heber <heber@…> (04/04/12 11:30:11)
Message:

VERBOSE: Subsequent change in verbosity levels of many tesselation functions after Info removal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tesselation/tesselation.cpp

    r2a3124 rce7bfd  
    6868  InternalPointer(PointsOnBoundary.begin())
    6969{
    70   Info FunctionInfo(__func__);
     70  //Info FunctionInfo(__func__);
    7171}
    7272;
     
    7777Tesselation::~Tesselation()
    7878{
    79   Info FunctionInfo(__func__);
    80   LOG(0, "Free'ing TesselStruct ... ");
     79  //Info FunctionInfo(__func__);
     80  LOG(2, "INFO: Free'ing TesselStruct ... ");
    8181  for (TriangleMap::iterator runner = TrianglesOnBoundary.begin(); runner != TrianglesOnBoundary.end(); runner++) {
    8282    if (runner->second != NULL) {
     
    8686      ELOG(1, "The triangle " << runner->first << " has already been free'd.");
    8787  }
    88   LOG(0, "This envelope was written to file " << TriangleFilesWritten << " times(s).");
     88  LOG(1, "INFO: This envelope was written to file " << TriangleFilesWritten << " times(s).");
    8989}
    9090
     
    198198void Tesselation::GuessStartingTriangle()
    199199{
    200   Info FunctionInfo(__func__);
     200  //Info FunctionInfo(__func__);
    201201  // 4b. create a starting triangle
    202202  // 4b1. create all distances
     
    331331void Tesselation::TesselateOnBoundary(IPointCloud & cloud)
    332332{
    333   Info FunctionInfo(__func__);
     333  //Info FunctionInfo(__func__);
    334334  bool flag;
    335335  PointMap::iterator winner;
     
    350350        // get peak point with respect to this base line's only triangle
    351351        BTS = baseline->second->triangles.begin()->second; // there is only one triangle so far
    352         LOG(0, "Current baseline is between " << *(baseline->second) << ".");
     352        LOG(3, "DEBUG: Current baseline is between " << *(baseline->second) << ".");
    353353        for (int i = 0; i < 3; i++)
    354354          if ((BTS->endpoints[i] != baseline->second->endpoints[0]) && (BTS->endpoints[i] != baseline->second->endpoints[1]))
    355355            peak = BTS->endpoints[i];
    356         LOG(1, " and has peak " << *peak << ".");
     356        LOG(3, "DEBUG:    and has peak " << *peak << ".");
    357357
    358358        // prepare some auxiliary vectors
     
    373373        BTS->GetNormalVector(NormalVector);
    374374        NormalVector = BTS->NormalVector;
    375         LOG(2, "NormalVector of base triangle is " << NormalVector);
     375        LOG(4, "DEBUG: NormalVector of base triangle is " << NormalVector);
    376376
    377377        // vector in propagation direction (out of triangle)
     
    382382        if (PropagationVector.ScalarProduct(TempVector) > 0) // make sure normal propagation vector points outward from baseline
    383383          PropagationVector.Scale(-1.);
    384         LOG(2, "PropagationVector of base triangle is " << PropagationVector);
     384        LOG(4, "DEBUG: PropagationVector of base triangle is " << PropagationVector);
    385385        winner = PointsOnBoundary.end();
    386386
     
    388388        for (PointMap::iterator target = PointsOnBoundary.begin(); target != PointsOnBoundary.end(); target++) {
    389389          if ((target->second != baseline->second->endpoints[0]) && (target->second != baseline->second->endpoints[1])) { // don't take the same endpoints
    390             LOG(1, "Target point is " << *(target->second) << ":");
     390            LOG(4, "DEBUG: Target point is " << *(target->second) << ":");
    391391
    392392            // first check direction, so that triangles don't intersect
     
    394394            VirtualNormalVector.ProjectOntoPlane(NormalVector);
    395395            TempAngle = VirtualNormalVector.Angle(PropagationVector);
    396             LOG(2, "VirtualNormalVector is " << VirtualNormalVector << " and PropagationVector is " << PropagationVector << ".");
     396            LOG(5, "DEBUG: VirtualNormalVector is " << VirtualNormalVector << " and PropagationVector is " << PropagationVector << ".");
    397397            if (TempAngle > (M_PI / 2.)) { // no bends bigger than Pi/2 (90 degrees)
    398               LOG(2, "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", bad direction!");
     398              LOG(5, "DEBUG: Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", bad direction!");
    399399              continue;
    400400            } else
    401               LOG(2, "Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", good direction!");
     401              LOG(5, "DEBUG: Angle on triangle plane between propagation direction and base line to " << *(target->second) << " is " << TempAngle << ", good direction!");
    402402
    403403            // check first and second endpoint (if any connecting line goes to target has at least not more than 1 triangle)
     
    405405            LineChecker[1] = baseline->second->endpoints[1]->lines.find(target->first);
    406406            if (((LineChecker[0] != baseline->second->endpoints[0]->lines.end()) && (LineChecker[0]->second->triangles.size() == 2))) {
    407               LOG(2, *(baseline->second->endpoints[0]) << " has line " << *(LineChecker[0]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[0]->second->triangles.size() << " triangles.");
     407              LOG(5, "DEBUG: " << *(baseline->second->endpoints[0]) << " has line " << *(LineChecker[0]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[0]->second->triangles.size() << " triangles.");
    408408              continue;
    409409            }
    410410            if (((LineChecker[1] != baseline->second->endpoints[1]->lines.end()) && (LineChecker[1]->second->triangles.size() == 2))) {
    411               LOG(2, *(baseline->second->endpoints[1]) << " has line " << *(LineChecker[1]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[1]->second->triangles.size() << " triangles.");
     411              LOG(5, "DEBUG: " << *(baseline->second->endpoints[1]) << " has line " << *(LineChecker[1]->second) << " to " << *(target->second) << " as endpoint with " << LineChecker[1]->second->triangles.size() << " triangles.");
    412412              continue;
    413413            }
     
    415415            // check whether the envisaged triangle does not already exist (if both lines exist and have same endpoint)
    416416            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)))) {
    417               LOG(4, "Current target is peak!");
     417              LOG(6, "DEBUG: Current target is peak!");
    418418              continue;
    419419            }
     
    442442            // calculate angle
    443443            TempAngle = NormalVector.Angle(VirtualNormalVector);
    444             LOG(2, "NormalVector is " << VirtualNormalVector << " and the angle is " << TempAngle << ".");
     444            LOG(5, "DEBUG: NormalVector is " << VirtualNormalVector << " and the angle is " << TempAngle << ".");
    445445            if ((SmallestAngle - TempAngle) > MYEPSILON) { // set to new possible winner
    446446              SmallestAngle = TempAngle;
    447447              winner = target;
    448               LOG(2, "New winner " << *winner->second->node << " due to smaller angle between normal vectors.");
     448              LOG(5, "DEBUG: New winner " << *winner->second->node << " due to smaller angle between normal vectors.");
    449449            } else if (fabs(SmallestAngle - TempAngle) < MYEPSILON) { // check the angle to propagation, both possible targets are in one plane! (their normals have same angle)
    450450              // hence, check the angles to some normal direction from our base line but in this common plane of both targets...
     
    461461                SmallestAngle = TempAngle;
    462462                winner = target;
    463                 LOG(2, "New winner " << *winner->second->node << " due to smaller angle " << TempAngle << " to propagation direction.");
     463                LOG(5, "DEBUG: New winner " << *winner->second->node << " due to smaller angle " << TempAngle << " to propagation direction.");
    464464              } else
    465                 LOG(2, "Keeping old winner " << *winner->second->node << " due to smaller angle to propagation direction.");
     465                LOG(5, "DEBUG: Keeping old winner " << *winner->second->node << " due to smaller angle to propagation direction.");
    466466            } else
    467               LOG(2, "Keeping old winner " << *winner->second->node << " due to smaller angle between normal vectors.");
     467              LOG(5, "DEBUG: Keeping old winner " << *winner->second->node << " due to smaller angle between normal vectors.");
    468468          }
    469469        } // end of loop over all boundary points
     
    471471        // 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
    472472        if (winner != PointsOnBoundary.end()) {
    473           LOG(0, "Winning target point is " << *(winner->second) << " with angle " << SmallestAngle << ".");
     473          LOG(3, "DEBUG: Winning target point is " << *(winner->second) << " with angle " << SmallestAngle << ".");
    474474          // create the lins of not yet present
    475475          BLS[0] = baseline->second;
     
    506506        // 5d. If the set of lines is not yet empty, go to 5. and continue
    507507      } else
    508         LOG(0, "Baseline candidate " << *(baseline->second) << " has a triangle count of " << baseline->second->triangles.size() << ".");
     508        LOG(3, "DEBUG: Baseline candidate " << *(baseline->second) << " has a triangle count of " << baseline->second->triangles.size() << ".");
    509509  } while (flag);
    510510
     
    522522bool Tesselation::InsertStraddlingPoints(IPointCloud & cloud, const LinkedCell_deprecated *LC)
    523523{
    524   Info FunctionInfo(__func__);
     524  //Info FunctionInfo(__func__);
    525525  Vector Intersection, Normal;
    526526  TesselPoint *Walker = NULL;
     
    541541    }
    542542    Walker = cloud.GetPoint();
    543     LOG(0, "Current point is " << *Walker << ".");
     543    LOG(3, "DEBUG: Current point is " << *Walker << ".");
    544544    // get the next triangle
    545545    triangles = FindClosestTrianglesToVector(Walker->getPosition(), BoundaryPoints);
     
    550550    delete triangles;
    551551    if ((BTS == NULL) || (BTS->ContainsBoundaryPoint(Walker))) {
    552       LOG(0, "No triangles found, probably a tesselation point itself.");
     552      LOG(3, "DEBUG: No triangles found, probably a tesselation point itself.");
    553553      cloud.GoToNext();
    554554      continue;
    555555    } else {
    556556    }
    557     LOG(0, "Closest triangle is " << *BTS << ".");
     557    LOG(3, "DEBUG: Closest triangle is " << *BTS << ".");
    558558    // get the intersection point
    559559    if (BTS->GetIntersectionInsideTriangle(*Center, Walker->getPosition(), Intersection)) {
    560       LOG(0, "We have an intersection at " << Intersection << ".");
     560      LOG(3, "DEBUG: We have an intersection at " << Intersection << ".");
    561561      // we have the intersection, check whether in- or outside of boundary
    562562      if ((Center->DistanceSquared(Walker->getPosition()) - Center->DistanceSquared(Intersection)) < -MYEPSILON) {
    563563        // inside, next!
    564         LOG(0, *Walker << " is inside wrt triangle " << *BTS << ".");
     564        LOG(3, "DEBUG: " << *Walker << " is inside wrt triangle " << *BTS << ".");
    565565      } else {
    566566        // outside!
    567         LOG(0, *Walker << " is outside wrt triangle " << *BTS << ".");
     567        LOG(3, "DEBUG: " << *Walker << " is outside wrt triangle " << *BTS << ".");
    568568        class BoundaryLineSet *OldLines[3], *NewLines[3];
    569569        class BoundaryPointSet *OldPoints[3], *NewPoint;
     
    575575        Normal = BTS->NormalVector;
    576576        // add Walker to boundary points
    577         LOG(0, "Adding " << *Walker << " to BoundaryPoints.");
     577        LOG(3, "DEBUG: Adding " << *Walker << " to BoundaryPoints.");
    578578        AddFlag = true;
    579579        if (AddBoundaryPoint(Walker, 0))
     
    582582          continue;
    583583        // remove triangle
    584         LOG(0, "Erasing triangle " << *BTS << ".");
     584        LOG(3, "DEBUG: Erasing triangle " << *BTS << ".");
    585585        TrianglesOnBoundary.erase(BTS->Nr);
    586586        delete (BTS);
     
    590590          BPS[1] = OldPoints[i];
    591591          NewLines[i] = new class BoundaryLineSet(BPS, LinesOnBoundaryCount);
    592           LOG(1, "Creating new line " << *NewLines[i] << ".");
     592          LOG(4, "DEBUG: Creating new line " << *NewLines[i] << ".");
    593593          LinesOnBoundary.insert(LinePair(LinesOnBoundaryCount, NewLines[i])); // no need for check for unique insertion as BPS[0] is definitely a new one
    594594          LinesOnBoundaryCount++;
     
    612612          BTS->GetNormalVector(Normal);
    613613          Normal.Scale(-1.);
    614           LOG(0, "Created new triangle " << *BTS << ".");
     614          LOG(3, "DEBUG: Created new triangle " << *BTS << ".");
    615615          TrianglesOnBoundary.insert(TrianglePair(TrianglesOnBoundaryCount, BTS));
    616616          TrianglesOnBoundaryCount++;
     
    639639bool Tesselation::AddBoundaryPoint(TesselPoint * Walker, const int n)
    640640{
    641   Info FunctionInfo(__func__);
     641  //Info FunctionInfo(__func__);
    642642  PointTestPair InsertUnique;
    643643  BPS[n] = new class BoundaryPointSet(Walker);
     
    661661void Tesselation::AddTesselationPoint(TesselPoint* Candidate, const int n)
    662662{
    663   Info FunctionInfo(__func__);
     663  //Info FunctionInfo(__func__);
    664664  PointTestPair InsertUnique;
    665665  TPS[n] = new class BoundaryPointSet(Candidate);
     
    669669  } else {
    670670    delete TPS[n];
    671     LOG(0, "Node " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary.");
     671    LOG(4, "DEBUG: Node " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary.");
    672672    TPS[n] = (InsertUnique.first)->second;
    673673  }
     
    682682void Tesselation::SetTesselationPoint(TesselPoint* Candidate, const int n) const
    683683{
    684   Info FunctionInfo(__func__);
     684  //Info FunctionInfo(__func__);
    685685  PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate->getNr());
    686686  if (FindPoint != PointsOnBoundary.end())
     
    706706  BoundaryLineSet *WinningLine = NULL;
    707707  if (FindLine != a->lines.end()) {
    708     LOG(1, "INFO: There is at least one line between " << *a << " and " << *b << ": " << *(FindLine->second) << ".");
     708    LOG(3, "DEBUG: There is at least one line between " << *a << " and " << *b << ": " << *(FindLine->second) << ".");
    709709
    710710    pair<LineMap::iterator, LineMap::iterator> FindPair;
     
    712712
    713713    for (FindLine = FindPair.first; (FindLine != FindPair.second) && (insertNewLine); FindLine++) {
    714       LOG(1, "INFO: Checking line " << *(FindLine->second) << " ...");
     714      LOG(3, "DEBUG: Checking line " << *(FindLine->second) << " ...");
    715715      // If there is a line with less than two attached triangles, we don't need a new line.
    716716      if (FindLine->second->triangles.size() == 1) {
    717717        CandidateMap::iterator Finder = OpenLines.find(FindLine->second);
    718718        if (!Finder->second->pointlist.empty())
    719           LOG(1, "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
     719          LOG(4, "DEBUG: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
    720720        else
    721           LOG(1, "INFO: line " << *(FindLine->second) << " is open with no candidate.");
     721          LOG(4, "DEBUG: line " << *(FindLine->second) << " is open with no candidate.");
    722722        // get open line
    723723        for (TesselPointList::const_iterator CandidateChecker = Finder->second->pointlist.begin(); CandidateChecker != Finder->second->pointlist.end(); ++CandidateChecker) {
    724724          if ((*(CandidateChecker) == candidate->node) && (OptCenter == NULL || OptCenter->DistanceSquared(Finder->second->OptCenter) < MYEPSILON )) { // stop searching if candidate matches
    725             LOG(1, "ACCEPT: Candidate " << *(*CandidateChecker) << " has the right center " << Finder->second->OptCenter << ".");
     725            LOG(4, "ACCEPT: Candidate " << *(*CandidateChecker) << " has the right center " << Finder->second->OptCenter << ".");
    726726            insertNewLine = false;
    727727            WinningLine = FindLine->second;
    728728            break;
    729729          } else {
    730             LOG(1, "REJECT: Candidate " << *(*CandidateChecker) << "'s center " << Finder->second->OptCenter << " does not match desired on " << *OptCenter << ".");
     730            LOG(5, "REJECT: Candidate " << *(*CandidateChecker) << "'s center " << Finder->second->OptCenter << " does not match desired on " << *OptCenter << ".");
    731731          }
    732732        }
     
    753753void Tesselation::AddNewTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n)
    754754{
    755   Info FunctionInfo(__func__);
    756   LOG(0, "Adding open line [" << LinesOnBoundaryCount << "|" << *(a->node) << " and " << *(b->node) << ".");
     755  //Info FunctionInfo(__func__);
     756  LOG(2, "DEBUG: Adding open line [" << LinesOnBoundaryCount << "|" << *(a->node) << " and " << *(b->node) << ".");
    757757  BPS[0] = a;
    758758  BPS[1] = b;
     
    775775void Tesselation::AddExistingTesselationTriangleLine(class BoundaryLineSet *Line, int n)
    776776{
    777   Info FunctionInfo(__func__);
    778   LOG(0, "Using existing line " << *Line);
     777  //Info FunctionInfo(__func__);
     778  LOG(5, "DEBUG: Using existing line " << *Line);
    779779
    780780  // set endpoints and line
     
    785785  CandidateMap::iterator CandidateLine = OpenLines.find(BLS[n]);
    786786  if (CandidateLine != OpenLines.end()) {
    787     LOG(1, " Removing line from OpenLines.");
     787    LOG(6, "DEBUG: Removing line from OpenLines.");
    788788    delete (CandidateLine->second);
    789789    OpenLines.erase(CandidateLine);
     
    799799void Tesselation::AddTesselationTriangle()
    800800{
    801   Info FunctionInfo(__func__);
    802   LOG(1, "Adding triangle to global TrianglesOnBoundary map.");
     801  //Info FunctionInfo(__func__);
     802  LOG(4, "DEBUG: Adding triangle to global TrianglesOnBoundary map.");
    803803
    804804  // add triangle to global map
     
    819819void Tesselation::AddTesselationTriangle(const int nr)
    820820{
    821   Info FunctionInfo(__func__);
    822   LOG(0, "Adding triangle to global TrianglesOnBoundary map.");
     821  //Info FunctionInfo(__func__);
     822  LOG(4, "DEBUG: Adding triangle to global TrianglesOnBoundary map.");
    823823
    824824  // add triangle to global map
     
    839839void Tesselation::RemoveTesselationTriangle(class BoundaryTriangleSet *triangle)
    840840{
    841   Info FunctionInfo(__func__);
     841  //Info FunctionInfo(__func__);
    842842  if (triangle == NULL)
    843843    return;
    844844  for (int i = 0; i < 3; i++) {
    845845    if (triangle->lines[i] != NULL) {
    846       LOG(0, "Removing triangle Nr." << triangle->Nr << " in line " << *triangle->lines[i] << ".");
     846      LOG(4, "DEBUG: Removing triangle Nr." << triangle->Nr << " in line " << *triangle->lines[i] << ".");
    847847      triangle->lines[i]->triangles.erase(triangle->Nr);
    848848      std::stringstream output;
    849       output << "INFO: " << *triangle->lines[i] << " is ";
     849      output << *triangle->lines[i] << " is ";
    850850      if (triangle->lines[i]->triangles.empty()) {
    851851        output << "no more attached to any triangle, erasing.";
     
    857857          output << "\t[" << (TriangleRunner->second)->Nr << "|" << *((TriangleRunner->second)->endpoints[0]) << ", " << *((TriangleRunner->second)->endpoints[1]) << ", " << *((TriangleRunner->second)->endpoints[2]) << "] \t";
    858858      }
    859       LOG(1, output.str());
     859      LOG(3, "DEBUG: " << output.str());
    860860      triangle->lines[i] = NULL; // free'd or not: disconnect
    861861    } else
     
    864864
    865865  if (TrianglesOnBoundary.erase(triangle->Nr))
    866     LOG(0, "Removing triangle Nr. " << triangle->Nr << ".");
     866    LOG(3, "DEBUG: Removing triangle Nr. " << triangle->Nr << ".");
    867867  delete (triangle);
    868868}
     
    875875void Tesselation::RemoveTesselationLine(class BoundaryLineSet *line)
    876876{
    877   Info FunctionInfo(__func__);
     877  //Info FunctionInfo(__func__);
    878878  int Numbers[2];
    879879
     
    896896        for (LineMap::iterator Runner = erasor.first; Runner != erasor.second; Runner++)
    897897          if ((*Runner).second == line) {
    898             LOG(0, "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
     898            LOG(4, "DEBUG: Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
    899899            line->endpoints[i]->lines.erase(Runner);
    900900            break;
     
    902902      } else { // there's just a single line left
    903903        if (line->endpoints[i]->lines.erase(line->Nr))
    904           LOG(0, "Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
     904          LOG(4, "DEBUG: Removing Line Nr. " << line->Nr << " in boundary point " << *line->endpoints[i] << ".");
    905905      }
    906906      if (line->endpoints[i]->lines.empty()) {
    907         LOG(0, *line->endpoints[i] << " has no more lines it's attached to, erasing.");
     907        LOG(4, "DEBUG: " << *line->endpoints[i] << " has no more lines it's attached to, erasing.");
    908908        RemoveTesselationPoint(line->endpoints[i]);
    909909      } else if (DoLog(0)) {
    910910        std::stringstream output;
    911         output << *line->endpoints[i] << " has still lines it's attached to: ";
     911        output << "DEBUG: " << *line->endpoints[i] << " has still lines it's attached to: ";
    912912        for (LineMap::iterator LineRunner = line->endpoints[i]->lines.begin(); LineRunner != line->endpoints[i]->lines.end(); LineRunner++)
    913913          output << "[" << *(LineRunner->second) << "] \t";
    914         LOG(0, output.str());
     914        LOG(4, output.str());
    915915      }
    916916      line->endpoints[i] = NULL; // free'd or not: disconnect
    917917    } else
    918       ELOG(1, "Endpoint " << i << " has already been free'd.");
     918      ELOG(4, "DEBUG: Endpoint " << i << " has already been free'd.");
    919919  }
    920920  if (!line->triangles.empty())
     
    922922
    923923  if (LinesOnBoundary.erase(line->Nr))
    924     LOG(0, "Removing line Nr. " << line->Nr << ".");
     924    LOG(4, "DEBUG: Removing line Nr. " << line->Nr << ".");
    925925  delete (line);
    926926}
     
    934934void Tesselation::RemoveTesselationPoint(class BoundaryPointSet *point)
    935935{
    936   Info FunctionInfo(__func__);
     936  //Info FunctionInfo(__func__);
    937937  if (point == NULL)
    938938    return;
    939939  if (PointsOnBoundary.erase(point->Nr))
    940     LOG(0, "Removing point Nr. " << point->Nr << ".");
     940    LOG(4, "DEBUG: Removing point Nr. " << point->Nr << ".");
    941941  delete (point);
    942942}
     
    953953bool Tesselation::CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC) const
    954954{
    955   Info FunctionInfo(__func__);
    956 
    957   LOG(1, "INFO: Checking whether sphere contains no others points ...");
     955  //Info FunctionInfo(__func__);
     956
     957  LOG(3, "DEBUG: Checking whether sphere contains no others points ...");
    958958  bool flag = true;
    959959
    960   LOG(1, "Check by: draw sphere {" << CandidateLine.OtherOptCenter[0] << " " << CandidateLine.OtherOptCenter[1] << " " << CandidateLine.OtherOptCenter[2] << "} radius " << RADIUS << " resolution 30");
     960  LOG(3, "DEBUG: Check by: draw sphere {" << CandidateLine.OtherOptCenter[0] << " " << CandidateLine.OtherOptCenter[1] << " " << CandidateLine.OtherOptCenter[2] << "} radius " << RADIUS << " resolution 30");
    961961  // get all points inside the sphere
    962962  TesselPointList *ListofPoints = LC->GetPointsInsideSphere(RADIUS, &CandidateLine.OtherOptCenter);
    963963
    964   LOG(1, "The following atoms are inside sphere at " << CandidateLine.OtherOptCenter << ":");
     964  LOG(3, "DEBUG: The following atoms are inside sphere at " << CandidateLine.OtherOptCenter << ":");
    965965  for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    966     LOG(1, "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
     966    LOG(3, "DEBUG:   " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
    967967
    968968  // remove triangles's endpoints
     
    976976  // check for other points
    977977  if (!ListofPoints->empty()) {
    978     LOG(1, "CheckDegeneracy: There are still " << ListofPoints->size() << " points inside the sphere.");
     978    LOG(3, "DEBUG: CheckDegeneracy: There are still " << ListofPoints->size() << " points inside the sphere.");
    979979    flag = false;
    980     LOG(1, "External atoms inside of sphere at " << CandidateLine.OtherOptCenter << ":");
     980    LOG(3, "DEBUG: External atoms inside of sphere at " << CandidateLine.OtherOptCenter << ":");
    981981    for (TesselPointList::const_iterator Runner = ListofPoints->begin(); Runner != ListofPoints->end(); ++Runner)
    982       LOG(1, "  " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
     982      LOG(3, "DEBUG:   " << *(*Runner) << " with distance " << (*Runner)->distance(CandidateLine.OtherOptCenter) << ".");
    983983  }
    984984  delete (ListofPoints);
     
    999999int Tesselation::CheckPresenceOfTriangle(TesselPoint *Candidates[3]) const
    10001000{
    1001   Info FunctionInfo(__func__);
     1001  //Info FunctionInfo(__func__);
    10021002  int adjacentTriangleCount = 0;
    10031003  class BoundaryPointSet *Points[3];
     
    10211021          for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) {
    10221022            TriangleMap *triangles = &FindLine->second->triangles;
    1023             LOG(1, "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << ".");
     1023            LOG(5, "DEBUG: Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << ".");
    10241024            for (TriangleMap::const_iterator FindTriangle = triangles->begin(); FindTriangle != triangles->end(); FindTriangle++) {
    10251025              if (FindTriangle->second->IsPresentTupel(Points)) {
     
    10271027              }
    10281028            }
    1029             LOG(1, "end.");
    10301029          }
    10311030          // Only one of the triangle lines must be considered for the triangle count.
    1032           //LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
     1031          //LOG(5, "DEBUG: Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    10331032          //return adjacentTriangleCount;
    10341033        }
     
    10371036  }
    10381037
    1039   LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
     1038  LOG(3, "DEBUG: Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    10401039  return adjacentTriangleCount;
    10411040}
     
    10521051class BoundaryTriangleSet * Tesselation::GetPresentTriangle(TesselPoint *Candidates[3])
    10531052{
    1054   Info FunctionInfo(__func__);
     1053  //Info FunctionInfo(__func__);
    10551054  class BoundaryTriangleSet *triangle = NULL;
    10561055  class BoundaryPointSet *Points[3];
     
    10821081          }
    10831082          // Only one of the triangle lines must be considered for the triangle count.
    1084           //LOG(0, "Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
     1083          //LOG(5, "DEBUG: Found " << adjacentTriangleCount << " adjacent triangles for the point set.");
    10851084          //return adjacentTriangleCount;
    10861085        }
     
    11041103bool Tesselation::FindStartingTriangle(const double RADIUS, const LinkedCell_deprecated *LC)
    11051104{
    1106   Info FunctionInfo(__func__);
     1105  //Info FunctionInfo(__func__);
    11071106  int i = 0;
    11081107  TesselPoint* MaxPoint[NDIM];
     
    11361135          for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
    11371136            if ((*Runner)->at(map[0]) > maxCoordinate[map[0]]) {
    1138               LOG(1, "New maximal for axis " << map[0] << " node is " << *(*Runner) << " at " << (*Runner)->getPosition() << ".");
     1137              LOG(4, "DEBUG: New maximal for axis " << map[0] << " node is " << *(*Runner) << " at " << (*Runner)->getPosition() << ".");
    11391138              maxCoordinate[map[0]] = (*Runner)->at(map[0]);
    11401139              MaxPoint[map[0]] = (*Runner);
     
    11521151    for (int i = 0; i < NDIM; i++)
    11531152      output << i << ": " << *MaxPoint[i] << "\t";
    1154     LOG(1, output.str());
     1153    LOG(3, "DEBUG: " << output.str());
    11551154  }
    11561155
     
    11611160    BaseLine = new BoundaryLineSet();
    11621161    BaseLine->endpoints[0] = new BoundaryPointSet(MaxPoint[k]);
    1163     LOG(0, "INFO: Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
     1162    LOG(2, "DEBUG: Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
    11641163
    11651164    double ShortestAngle;
     
    12061205
    12071206    // adding point 1 and point 2 and add the line between them
    1208     LOG(0, "Coordinates of start node at " << *BaseLine->endpoints[0]->node << ".");
    1209     LOG(0, "Found second point is at " << *BaseLine->endpoints[1]->node << ".");
     1207    LOG(2, "DEBUG: Found second point is at " << *BaseLine->endpoints[1]->node << ".");
    12101208
    12111209    //LOG(1, "INFO: OldSphereCenter is at " << helper << ".");
    12121210    CandidateForTesselation OptCandidates(BaseLine);
    12131211    FindThirdPointForTesselation(NormalVector, SearchDirection, SphereCenter, OptCandidates, NULL, RADIUS, LC);
    1214     LOG(0, "List of third Points is:");
    1215     for (TesselPointList::iterator it = OptCandidates.pointlist.begin(); it != OptCandidates.pointlist.end(); it++) {
    1216       LOG(0, " " << *(*it));
     1212    {
     1213      std::stringstream output;
     1214      for (TesselPointList::iterator it = OptCandidates.pointlist.begin(); it != OptCandidates.pointlist.end(); it++)
     1215        output << *(*it);
     1216      LOG(2, "DEBUG: List of third Points is: " << output.str());
    12171217    }
    12181218    if (!OptCandidates.pointlist.empty()) {
     
    12481248//bool Tesselation::HasOtherBaselineBetterCandidate(CandidateForTesselation &CandidateLine, const TesselPoint * const ThirdNode, double RADIUS, const LinkedCell_deprecated * const LC) const
    12491249//{
    1250 //      Info FunctionInfo(__func__);
     1250//      //Info FunctionInfo(__func__);
    12511251//  bool result = false;
    12521252//  Vector CircleCenter;
     
    13871387bool Tesselation::FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell_deprecated *LC)
    13881388{
    1389   Info FunctionInfo(__func__);
     1389  //Info FunctionInfo(__func__);
    13901390  Vector CircleCenter;
    13911391  Vector CirclePlaneNormal;
     
    14021402      break;
    14031403    }
    1404   LOG(0, "Current baseline is " << *CandidateLine.BaseLine << " with ThirdPoint " << *ThirdPoint << " of triangle " << T << ".");
     1404  LOG(3, "DEBUG: Current baseline is " << *CandidateLine.BaseLine << " with ThirdPoint " << *ThirdPoint << " of triangle " << T << ".");
    14051405
    14061406  CandidateLine.T = &T;
     
    14221422    CircleRadius = RADIUS * RADIUS - radius / 4.;
    14231423    CirclePlaneNormal.Normalize();
    1424     LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
    1425 
    1426     LOG(1, "INFO: OldSphereCenter is at " << T.SphereCenter << ".");
     1424    LOG(3, "DEBUG: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
     1425
     1426    LOG(3, "DEBUG: OldSphereCenter is at " << T.SphereCenter << ".");
    14271427
    14281428    // construct SearchDirection and an "outward pointer"
     
    14311431    if (helper.ScalarProduct(SearchDirection) < -HULLEPSILON)// ohoh, SearchDirection points inwards!
    14321432      SearchDirection.Scale(-1.);
    1433     LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
     1433    LOG(3, "DEBUG: SearchDirection is " << SearchDirection << ".");
    14341434    if (fabs(RelativeSphereCenter.ScalarProduct(SearchDirection)) > HULLEPSILON) {
    14351435      // rotated the wrong way!
    1436       ELOG(1, "SearchDirection and RelativeOldSphereCenter are still not orthogonal!");
     1436      ELOG(3, "DEBUG: SearchDirection and RelativeOldSphereCenter are still not orthogonal!");
    14371437    }
    14381438
     
    14411441
    14421442  } else {
    1443     LOG(0, "Circumcircle for base line " << *CandidateLine.BaseLine << " and base triangle " << T << " is too big!");
     1443    LOG(3, "DEBUG: Circumcircle for base line " << *CandidateLine.BaseLine << " and base triangle " << T << " is too big!");
    14441444  }
    14451445
    14461446  if (CandidateLine.pointlist.empty()) {
    1447     ELOG(2, "Could not find a suitable candidate.");
     1447    ELOG(4, "DEBUG: Could not find a suitable candidate.");
    14481448    return false;
    14491449  }
    1450   LOG(0, "Third Points are: ");
    1451   for (TesselPointList::iterator it = CandidateLine.pointlist.begin(); it != CandidateLine.pointlist.end(); ++it) {
    1452     LOG(0, " " << *(*it));
     1450  {
     1451    std::stringstream output;
     1452    for (TesselPointList::iterator it = CandidateLine.pointlist.begin(); it != CandidateLine.pointlist.end(); ++it)
     1453      output << " " << *(*it);
     1454    LOG(3, "DEBUG: Third Points are: " << output.str());
    14531455  }
    14541456
     
    14741476      ASSERT((baseline->BaseLine->triangles.size() == 1),"Open line without exactly one attached triangle");
    14751477      T = (((baseline->BaseLine->triangles.begin()))->second);
    1476       LOG(1, "Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T);
     1478      LOG(4, "DEBUG: Finding best candidate for open line " << *baseline->BaseLine << " of triangle " << *T);
    14771479      TesselationFailFlag = TesselationFailFlag && FindNextSuitableTriangle(*baseline, *T, RADIUS, LCList); //the line is there, so there is a triangle, but only one.
    14781480    }
     
    14911493void Tesselation::AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC)
    14921494{
    1493   Info FunctionInfo(__func__);
     1495  //Info FunctionInfo(__func__);
    14941496  Vector Center;
    14951497  TesselPoint * const TurningPoint = CandidateLine.BaseLine->endpoints[0]->node;
     
    15051507  TesselPointList *connectedClosestPoints = GetCircleOfSetOfPoints(&SetOfNeighbours, TurningPoint, CandidateLine.BaseLine->endpoints[1]->node->getPosition());
    15061508
    1507   LOG(0, "List of Candidates for Turning Point " << *TurningPoint << ":");
    1508   for (TesselPointList::iterator TesselRunner = connectedClosestPoints->begin(); TesselRunner != connectedClosestPoints->end(); ++TesselRunner)
    1509     LOG(0, " " << **TesselRunner);
     1509  {
     1510    std::stringstream output;
     1511    for (TesselPointList::iterator TesselRunner = connectedClosestPoints->begin(); TesselRunner != connectedClosestPoints->end(); ++TesselRunner)
     1512      output << **TesselRunner;
     1513    LOG(3, "DEBUG: List of Candidates for Turning Point " << *TurningPoint << ":");
     1514  }
    15101515
    15111516  // go through all angle-sorted candidates (in degenerate n-nodes case we may have to add multiple triangles)
     
    15141519  Sprinter++;
    15151520  while (Sprinter != connectedClosestPoints->end()) {
    1516     LOG(0, "Current Runner is " << *(*Runner) << " and sprinter is " << *(*Sprinter) << ".");
     1521    LOG(3, "DEBUG: Current Runner is " << *(*Runner) << " and sprinter is " << *(*Sprinter) << ".");
    15171522
    15181523    AddTesselationPoint(TurningPoint, 0);
     
    15271532      // fill the internal open lines with its respective candidate (otherwise lines in degenerate case are not picked)
    15281533      FindDegeneratedCandidatesforOpenLines(*Sprinter, &CandidateLine.OptCenter); // Assume BTS contains last triangle
    1529       LOG(0, " There are still more triangles to add.");
     1534      LOG(2, "DEBUG: There are still more triangles to add.");
    15301535    }
    15311536    // pick candidates for other open lines as well
     
    15351540    if (CheckDegeneracy(CandidateLine, RADIUS, LC)) {
    15361541      // add normal and degenerate triangles
    1537       LOG(1, "Triangle of endpoints " << *TPS[0] << "," << *TPS[1] << " and " << *TPS[2] << " is degenerated, adding both sides.");
     1542      LOG(3, "DEBUG: Triangle of endpoints " << *TPS[0] << "," << *TPS[1] << " and " << *TPS[2] << " is degenerated, adding both sides.");
    15381543      AddCandidateTriangle(CandidateLine, OtherOpt);
    15391544
     
    15551560void Tesselation::FindDegeneratedCandidatesforOpenLines(TesselPoint * const Sprinter, const Vector * const OptCenter)
    15561561{
    1557   Info FunctionInfo(__func__);
     1562  //Info FunctionInfo(__func__);
    15581563
    15591564  pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node->getNr());
    15601565  for (LineMap::const_iterator FindLine = FindPair.first; FindLine != FindPair.second; FindLine++) {
    1561     LOG(1, "INFO: Checking line " << *(FindLine->second) << " ...");
     1566    LOG(4, "DEBUG: Checking line " << *(FindLine->second) << " ...");
    15621567    // If there is a line with less than two attached triangles, we don't need a new line.
    15631568    if (FindLine->second->triangles.size() == 1) {
    15641569      CandidateMap::iterator Finder = OpenLines.find(FindLine->second);
    15651570      if (!Finder->second->pointlist.empty())
    1566         LOG(1, "INFO: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
     1571        LOG(4, "DEBUG: line " << *(FindLine->second) << " is open with candidate " << **(Finder->second->pointlist.begin()) << ".");
    15671572      else {
    1568         LOG(1, "INFO: line " << *(FindLine->second) << " is open with no candidate, setting to next Sprinter" << (*Sprinter));
     1573        LOG(4, "DEBUG: line " << *(FindLine->second) << " is open with no candidate, setting to next Sprinter" << (*Sprinter));
    15691574        Finder->second->T = BTS;  // is last triangle
    15701575        Finder->second->pointlist.push_back(Sprinter);
     
    15851590void Tesselation::AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC)
    15861591{
    1587   Info FunctionInfo(__func__);
     1592  //Info FunctionInfo(__func__);
    15881593  Vector Center;
    15891594  CandidateMap::const_iterator CandidateCheck = OpenLines.end();
     
    15911596
    15921597  /// 1. Create or pick the lines for the first triangle
    1593   LOG(0, "INFO: Creating/Picking lines for first triangle ...");
     1598  LOG(3, "DEBUG: Creating/Picking lines for first triangle ...");
    15941599  for (int i = 0; i < 3; i++) {
    15951600    BLS[i] = NULL;
    1596     LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
     1601    LOG(3, "DEBUG: Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    15971602    AddTesselationLine(&CandidateLine.OptCenter, TPS[(i + 2) % 3], TPS[(i + 0) % 3], TPS[(i + 1) % 3], i);
    15981603  }
    15991604
    16001605  /// 2. create the first triangle and NormalVector and so on
    1601   LOG(0, "INFO: Adding first triangle with center at " << CandidateLine.OptCenter << " ...");
     1606  LOG(3, "DEBUG: Adding first triangle with center at " << CandidateLine.OptCenter << " ...");
    16021607  BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount);
    16031608  AddTesselationTriangle();
     
    16101615  // give some verbose output about the whole procedure
    16111616  if (CandidateLine.T != NULL)
    1612     LOG(0, "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
     1617    LOG(2, "DEBUG: --> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    16131618  else
    1614     LOG(0, "--> New starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
     1619    LOG(2, "DEBUG: --> New starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    16151620  triangle = BTS;
    16161621
    16171622  /// 3. Gather candidates for each new line
    1618   LOG(0, "INFO: Adding candidates to new lines ...");
     1623  LOG(3, "DEBUG: Adding candidates to new lines ...");
    16191624  for (int i = 0; i < 3; i++) {
    1620     LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
     1625    LOG(4, "DEBUG: Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    16211626    CandidateCheck = OpenLines.find(BLS[i]);
    16221627    if ((CandidateCheck != OpenLines.end()) && (CandidateCheck->second->pointlist.empty())) {
     
    16281633
    16291634  /// 4. Create or pick the lines for the second triangle
    1630   LOG(0, "INFO: Creating/Picking lines for second triangle ...");
     1635  LOG(3, "DEBUG: Creating/Picking lines for second triangle ...");
    16311636  for (int i = 0; i < 3; i++) {
    1632     LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
     1637    LOG(4, "DEBUG: Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    16331638    AddTesselationLine(&CandidateLine.OtherOptCenter, TPS[(i + 2) % 3], TPS[(i + 0) % 3], TPS[(i + 1) % 3], i);
    16341639  }
    16351640
    16361641  /// 5. create the second triangle and NormalVector and so on
    1637   LOG(0, "INFO: Adding second triangle with center at " << CandidateLine.OtherOptCenter << " ...");
     1642  LOG(3, "DEBUG: Adding second triangle with center at " << CandidateLine.OtherOptCenter << " ...");
    16381643  BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount);
    16391644  AddTesselationTriangle();
     
    16451650  // give some verbose output about the whole procedure
    16461651  if (CandidateLine.T != NULL)
    1647     LOG(0, "--> New degenerate triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
     1652    LOG(2, "DEBUG: --> New degenerate triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    16481653  else
    1649     LOG(0, "--> New degenerate starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
     1654    LOG(2, "DEBUG: --> New degenerate starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    16501655
    16511656  /// 6. Adding triangle to new lines
    1652   LOG(0, "INFO: Adding second triangles to new lines ...");
     1657  LOG(3, "DEBUG: Adding second triangles to new lines ...");
    16531658  for (int i = 0; i < 3; i++) {
    1654     LOG(0, "Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
     1659    LOG(4, "DEBUG: Current line is between " << *TPS[(i + 0) % 3] << " and " << *TPS[(i + 1) % 3] << ":");
    16551660    CandidateCheck = OpenLines.find(BLS[i]);
    16561661    if ((CandidateCheck != OpenLines.end()) && (CandidateCheck->second->pointlist.empty())) {
     
    16691674void Tesselation::AddCandidateTriangle(CandidateForTesselation &CandidateLine, enum centers type)
    16701675{
    1671   Info FunctionInfo(__func__);
     1676  //Info FunctionInfo(__func__);
    16721677  Vector Center;
    16731678  Vector *OptCenter = (type == Opt) ? &CandidateLine.OptCenter : &CandidateLine.OtherOptCenter;
     
    16901695  // give some verbose output about the whole procedure
    16911696  if (CandidateLine.T != NULL)
    1692     LOG(0, "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
     1697    LOG(2, "INFO: --> New" << ((type == OtherOpt) ? " degenerate " : " ") << "triangle with " << *BTS << " and normal vector " << BTS->NormalVector << ", from " << *CandidateLine.T << " and angle " << CandidateLine.ShortestAngle << ".");
    16931698  else
    1694     LOG(0, "--> New" << ((type == OtherOpt) ? " degenerate " : " ") << "starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
     1699    LOG(2, "INFO: --> New" << ((type == OtherOpt) ? " degenerate " : " ") << "starting triangle with " << *BTS << " and normal vector " << BTS->NormalVector << " and no top triangle.");
    16951700}
    16961701;
     
    17051710class BoundaryPointSet *Tesselation::IsConvexRectangle(class BoundaryLineSet *Base)
    17061711{
    1707   Info FunctionInfo(__func__);
     1712  //Info FunctionInfo(__func__);
    17081713  class BoundaryPointSet *Spot = NULL;
    17091714  class BoundaryLineSet *OtherBase;
     
    17171722  OtherBase = new class BoundaryLineSet(BPS, -1);
    17181723
    1719   LOG(1, "INFO: Current base line is " << *Base << ".");
    1720   LOG(1, "INFO: Other base line is " << *OtherBase << ".");
     1724  LOG(3, "DEBUG: Current base line is " << *Base << ".");
     1725  LOG(3, "DEBUG: Other base line is " << *OtherBase << ".");
    17211726
    17221727  // get the closest point on each line to the other line
     
    17361741  delete (ClosestPoint);
    17371742  if ((distance[0] * distance[1]) > 0) { // have same sign?
    1738     LOG(1, "REJECT: Both SKPs have same sign: " << distance[0] << " and " << distance[1] << ". " << *Base << "' rectangle is concave.");
     1743    LOG(4, "REJECT: Both SKPs have same sign: " << distance[0] << " and " << distance[1] << ". " << *Base << "' rectangle is concave.");
    17391744    if (distance[0] < distance[1]) {
    17401745      Spot = Base->endpoints[0];
     
    17441749    return Spot;
    17451750  } else { // different sign, i.e. we are in between
    1746     LOG(0, "ACCEPT: Rectangle of triangles of base line " << *Base << " is convex.");
     1751    LOG(3, "ACCEPT: Rectangle of triangles of base line " << *Base << " is convex.");
    17471752    return NULL;
    17481753  }
     
    17531758void Tesselation::PrintAllBoundaryPoints(ofstream *out) const
    17541759{
    1755   Info FunctionInfo(__func__);
     1760  //Info FunctionInfo(__func__);
    17561761  // print all lines
    1757   LOG(0, "Printing all boundary points for debugging:");
     1762  std::stringstream output;
    17581763  for (PointMap::const_iterator PointRunner = PointsOnBoundary.begin(); PointRunner != PointsOnBoundary.end(); PointRunner++)
    1759     LOG(0, *(PointRunner->second));
     1764    output << " " << *(PointRunner->second);
     1765  LOG(3, "DEBUG: Printing all boundary points for debugging:" << output.str());
    17601766}
    17611767;
     
    17631769void Tesselation::PrintAllBoundaryLines(ofstream *out) const
    17641770{
    1765   Info FunctionInfo(__func__);
     1771  //Info FunctionInfo(__func__);
    17661772  // print all lines
    1767   LOG(0, "Printing all boundary lines for debugging:");
     1773  std::stringstream output;
    17681774  for (LineMap::const_iterator LineRunner = LinesOnBoundary.begin(); LineRunner != LinesOnBoundary.end(); LineRunner++)
    1769     LOG(0, *(LineRunner->second));
     1775    output << " " << *(LineRunner->second);
     1776  LOG(3, "DEBUG: Printing all boundary lines for debugging:" << output.str());
    17701777}
    17711778;
     
    17731780void Tesselation::PrintAllBoundaryTriangles(ofstream *out) const
    17741781{
    1775   Info FunctionInfo(__func__);
     1782  //Info FunctionInfo(__func__);
    17761783  // print all triangles
    1777   LOG(0, "Printing all boundary triangles for debugging:");
     1784  std::stringstream output;
    17781785  for (TriangleMap::const_iterator TriangleRunner = TrianglesOnBoundary.begin(); TriangleRunner != TrianglesOnBoundary.end(); TriangleRunner++)
    1779     LOG(0, *(TriangleRunner->second));
     1786    output << " " << *(TriangleRunner->second);
     1787  LOG(3, "DEBUG: Printing all boundary triangles for debugging:" << output.str());
    17801788}
    17811789;
     
    17881796double Tesselation::PickFarthestofTwoBaselines(class BoundaryLineSet *Base)
    17891797{
    1790   Info FunctionInfo(__func__);
     1798  //Info FunctionInfo(__func__);
    17911799  class BoundaryLineSet *OtherBase;
    17921800  Vector *ClosestPoint[2];
     
    18001808  OtherBase = new class BoundaryLineSet(BPS, -1);
    18011809
    1802   LOG(0, "INFO: Current base line is " << *Base << ".");
    1803   LOG(0, "INFO: Other base line is " << *OtherBase << ".");
     1810  LOG(3, "DEBUG: Current base line is " << *Base << ".");
     1811  LOG(3, "DEBUG: Other base line is " << *OtherBase << ".");
    18041812
    18051813  // get the closest point on each line to the other line
     
    18191827
    18201828  if (Distance.NormSquared() < MYEPSILON) { // check for intersection
    1821     LOG(0, "REJECT: Both lines have an intersection: Nothing to do.");
     1829    LOG(3, "REJECT: Both lines have an intersection: Nothing to do.");
    18221830    return false;
    18231831  } else { // check for sign against BaseLineNormal
     
    18291837    }
    18301838    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++) {
    1831     LOG(1, "INFO: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << ".");
     1839    LOG(4, "DEBUG: Adding NormalVector " << runner->second->NormalVector << " of triangle " << *(runner->second) << ".");
    18321840      BaseLineNormal += (runner->second->NormalVector);
    18331841    }
     
    18351843
    18361844    if (Distance.ScalarProduct(BaseLineNormal) > MYEPSILON) { // Distance points outwards, hence OtherBase higher than Base -> flip
    1837       LOG(0, "ACCEPT: Other base line would be higher: Flipping baseline.");
     1845      LOG(3, "ACCEPT: Other base line would be higher: Flipping baseline.");
    18381846      // calculate volume summand as a general tetraeder
    18391847      return volume;
    18401848    } else { // Base higher than OtherBase -> do nothing
    1841       LOG(0, "REJECT: Base line is higher: Nothing to do.");
     1849      LOG(3, "REJECT: Base line is higher: Nothing to do.");
    18421850      return 0.;
    18431851    }
     
    18551863class BoundaryLineSet * Tesselation::FlipBaseline(class BoundaryLineSet *Base)
    18561864{
    1857   Info FunctionInfo(__func__);
     1865  //Info FunctionInfo(__func__);
    18581866  class BoundaryLineSet *OldLines[4], *NewLine;
    18591867  class BoundaryPointSet *OldPoints[2];
     
    18841892
    18851893  // print OldLines and OldPoints for debugging
    1886   if (DoLog(0)) {
     1894  if (DoLog(3)) {
    18871895    std::stringstream output;
    1888     output << "The four old lines are: ";
    18891896    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
    18901897      for (int j = 0; j < 3; j++) // all of their endpoints and baselines
    18911898        if (runner->second->lines[j] != Base) // pick not the central baseline
    18921899          output << *runner->second->lines[j] << "\t";
    1893     LOG(0, output.str());
    1894   }
    1895   if (DoLog(0)) {
     1900    LOG(3, "DEBUG: The four old lines are: " << output.str());
     1901  }
     1902  if (DoLog(3)) {
    18961903    std::stringstream output;
    1897     output << "The two old points are: ";
    18981904    for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++)
    18991905      for (int j = 0; j < 3; j++) // all of their endpoints and baselines
    19001906        if (!Base->ContainsBoundaryPoint(runner->second->endpoints[j])) // and neither of its endpoints
    19011907          output << *runner->second->endpoints[j] << "\t";
    1902     LOG(0, output.str());
     1908    LOG(3, "DEBUG: The two old points are: " << output.str());
    19031909  }
    19041910
     
    19301936
    19311937  // remove triangles and baseline removes itself
    1932   LOG(0, "INFO: Deleting baseline " << *Base << " from global list.");
     1938  LOG(3, "DEBUG: Deleting baseline " << *Base << " from global list.");
    19331939  OldBaseLineNr = Base->Nr;
    19341940  m = 0;
     
    19391945  // .. then delete each triangle (which deletes the line as well)
    19401946  for (list <BoundaryTriangleSet *>::iterator runner = TrianglesOfBase.begin(); !TrianglesOfBase.empty(); runner = TrianglesOfBase.begin()) {
    1941     LOG(0, "INFO: Deleting triangle " << *(*runner) << ".");
     1947    LOG(3, "DEBUG: Deleting triangle " << *(*runner) << ".");
    19421948    OldTriangleNrs[m++] = (*runner)->Nr;
    19431949    RemoveTesselationTriangle((*runner));
     
    19501956  NewLine = new class BoundaryLineSet(BPS, OldBaseLineNr);
    19511957  LinesOnBoundary.insert(LinePair(OldBaseLineNr, NewLine)); // no need for check for unique insertion as NewLine is definitely a new one
    1952   LOG(0, "INFO: Created new baseline " << *NewLine << ".");
     1958  LOG(3, "DEBUG: Created new baseline " << *NewLine << ".");
    19531959
    19541960  // construct new triangles with flipped baseline
     
    19651971    BTS->GetNormalVector(BaseLineNormal);
    19661972    AddTesselationTriangle(OldTriangleNrs[0]);
    1967     LOG(0, "INFO: Created new triangle " << *BTS << ".");
     1973    LOG(3, "DEBUG: Created new triangle " << *BTS << ".");
    19681974
    19691975    BLS[0] = (i == 2 ? OldLines[3] : OldLines[2]);
     
    19731979    BTS->GetNormalVector(BaseLineNormal);
    19741980    AddTesselationTriangle(OldTriangleNrs[1]);
    1975     LOG(0, "INFO: Created new triangle " << *BTS << ".");
     1981    LOG(3, "DEBUG: Created new triangle " << *BTS << ".");
    19761982  } else {
    19771983    ELOG(0, "The four old lines do not connect, something's utterly wrong here!");
     
    19931999void Tesselation::FindSecondPointForTesselation(TesselPoint* a, Vector Oben, TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell_deprecated *LC)
    19942000{
    1995   Info FunctionInfo(__func__);
     2001  //Info FunctionInfo(__func__);
    19962002  Vector AngleCheck;
    19972003  class TesselPoint* Candidate = NULL;
     
    20142020    Nupper[i] = ((N[i] + 1) < LC->N[i]) ? N[i] + 1 : LC->N[i] - 1;
    20152021  }
    2016   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] << "], ");
     2022  LOG(3, "DEBUG: 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] << "], ");
    20172023
    20182024  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
     
    20482054                if (angle < Storage[0]) {
    20492055                  //LOG(1, "INFO: Old values of Storage is " << Storage[0] << ", " << Storage[1]);
    2050                   LOG(1, "INFO: Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".");
     2056                  LOG(4, "DEBUG: Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".");
    20512057                  OptCandidate = Candidate;
    20522058                  Storage[0] = angle;
    2053                   //LOG(1, "INFO: Changing something in  Storage is " << Storage[0] << ", " << Storage[1]);
     2059                  //LOG(4, "DEBUG: Changing something in  Storage is " << Storage[0] << ", " << Storage[1]);
    20542060                } else {
    2055                   //LOG(1, "INFO: Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *OptCandidate);
     2061                  //LOG(4, "DEBUG: Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *OptCandidate);
    20562062                }
    20572063              } else {
    2058                 //LOG(1, "INFO: Current candidate is " << *Candidate << ": Refused due to Radius " << norm);
     2064                //LOG(4, "DEBUG: Current candidate is " << *Candidate << ": Refused due to Radius " << norm);
    20592065              }
    20602066            } else {
    2061               //LOG(1, "INFO: Current candidate is " << *Candidate << ": Candidate is equal to first endpoint." << *a << ".");
     2067              //LOG(4, "DEBUG: Current candidate is " << *Candidate << ": Candidate is equal to first endpoint." << *a << ".");
    20622068            }
    20632069          }
    20642070        } else {
    2065           LOG(0, "Linked cell list is empty.");
     2071          LOG(4, "DEBUG: Linked cell list is empty.");
    20662072        }
    20672073      }
     
    21012107void Tesselation::FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet * const ThirdPoint, const double RADIUS, const LinkedCell_deprecated *LC) const
    21022108{
    2103   Info FunctionInfo(__func__);
     2109  //Info FunctionInfo(__func__);
    21042110  Vector CircleCenter; // center of the circle, i.e. of the band of sphere's centers
    21052111  Vector CirclePlaneNormal; // normal vector defining the plane this circle lives in
     
    21182124  TesselPoint *Candidate = NULL;
    21192125
    2120   LOG(1, "INFO: NormalVector of BaseTriangle is " << NormalVector << ".");
     2126  LOG(3, "DEBUG: NormalVector of BaseTriangle is " << NormalVector << ".");
    21212127
    21222128  // copy old center
     
    21402146    CircleRadius = RADIUS * RADIUS - radius;
    21412147    CirclePlaneNormal.Normalize();
    2142     LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
     2148    LOG(3, "DEBUG: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
    21432149
    21442150    // test whether old center is on the band's plane
     
    21492155    radius = RelativeOldSphereCenter.NormSquared();
    21502156    if (fabs(radius - CircleRadius) < HULLEPSILON) {
    2151       LOG(1, "INFO: RelativeOldSphereCenter is at " << RelativeOldSphereCenter << ".");
     2157      LOG(3, "DEBUG: RelativeOldSphereCenter is at " << RelativeOldSphereCenter << ".");
    21522158
    21532159      // check SearchDirection
    2154       LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
     2160      LOG(3, "DEBUG: SearchDirection is " << SearchDirection << ".");
    21552161      if (fabs(RelativeOldSphereCenter.ScalarProduct(SearchDirection)) > HULLEPSILON) { // rotated the wrong way!
    21562162        ELOG(1, "SearchDirection and RelativeOldSphereCenter are not orthogonal!");
     
    21672173      }
    21682174      // then go through the current and all neighbouring cells and check the contained points for possible candidates
    2169 //      if (DoLog(0)) {
     2175//      if (DoLog(3)) {
    21702176//        std::stringstream output;
    21712177//        output << "LC Intervals:";
     
    21882194
    21892195                // check for three unique points
    2190                 LOG(2, "INFO: Current Candidate is " << *Candidate << " for BaseLine " << *CandidateLine.BaseLine << " with OldSphereCenter " << OldSphereCenter << ".");
     2196                LOG(4, "DEBUG: Current Candidate is " << *Candidate << " for BaseLine " << *CandidateLine.BaseLine << " with OldSphereCenter " << OldSphereCenter << ".");
    21912197                if ((Candidate != CandidateLine.BaseLine->endpoints[0]->node) && (Candidate != CandidateLine.BaseLine->endpoints[1]->node)) {
    21922198
    21932199                  // find center on the plane
    21942200                  GetCenterofCircumcircle(NewPlaneCenter, CandidateLine.BaseLine->endpoints[0]->node->getPosition(), CandidateLine.BaseLine->endpoints[1]->node->getPosition(), Candidate->getPosition());
    2195                   LOG(1, "INFO: NewPlaneCenter is " << NewPlaneCenter << ".");
     2201                  LOG(3, "DEBUG: NewPlaneCenter is " << NewPlaneCenter << ".");
    21962202
    21972203                  try {
     
    21992205                                            (CandidateLine.BaseLine->endpoints[1]->node->getPosition()),
    22002206                                            (Candidate->getPosition())).getNormal();
    2201                     LOG(1, "INFO: NewNormalVector is " << NewNormalVector << ".");
     2207                    LOG(3, "DEBUG: NewNormalVector is " << NewNormalVector << ".");
    22022208                    radius = CandidateLine.BaseLine->endpoints[0]->node->DistanceSquared(NewPlaneCenter);
    2203                     LOG(1, "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
    2204                     LOG(1, "INFO: SearchDirection is " << SearchDirection << ".");
    2205                     LOG(1, "INFO: Radius of CircumCenterCircle is " << radius << ".");
     2209                    LOG(3, "DEBUG: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << ".");
     2210                    LOG(3, "DEBUG: SearchDirection is " << SearchDirection << ".");
     2211                    LOG(3, "DEBUG: Radius of CircumCenterCircle is " << radius << ".");
    22062212                    if (radius < RADIUS * RADIUS) {
    22072213                      otherradius = CandidateLine.BaseLine->endpoints[1]->node->DistanceSquared(NewPlaneCenter);
     
    22122218                        helper = NewNormalVector;
    22132219                        helper.Scale(sqrt(RADIUS * RADIUS - radius));
    2214                         LOG(2, "INFO: Distance of NewPlaneCenter " << NewPlaneCenter << " to either NewSphereCenter is " << helper.Norm() << " of vector " << helper << " with sphere radius " << RADIUS << ".");
     2220                        LOG(4, "DEBUG: Distance of NewPlaneCenter " << NewPlaneCenter << " to either NewSphereCenter is " << helper.Norm() << " of vector " << helper << " with sphere radius " << RADIUS << ".");
    22152221                        NewSphereCenter += helper;
    2216                         LOG(2, "INFO: NewSphereCenter is at " << NewSphereCenter << ".");
     2222                        LOG(4, "DEBUG: NewSphereCenter is at " << NewSphereCenter << ".");
    22172223                        // OtherNewSphereCenter is created by the same vector just in the other direction
    22182224                        helper.Scale(-1.);
    22192225                        OtherNewSphereCenter += helper;
    2220                         LOG(2, "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << ".");
     2226                        LOG(4, "DEBUG: OtherNewSphereCenter is at " << OtherNewSphereCenter << ".");
    22212227                        alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection, HULLEPSILON);
    22222228                        Otheralpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, OtherNewSphereCenter, OldSphereCenter, NormalVector, SearchDirection, HULLEPSILON);
     
    22392245                          if ((CandidateLine.ShortestAngle - HULLEPSILON) < alpha) {
    22402246                            CandidateLine.pointlist.push_back(Candidate);
    2241                             LOG(0, "ACCEPT: We have found an equally good candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
     2247                            LOG(2, "ACCEPT: We have found an equally good candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
    22422248                          } else {
    22432249                            // remove all candidates from the list and then the list itself
    22442250                            CandidateLine.pointlist.clear();
    22452251                            CandidateLine.pointlist.push_back(Candidate);
    2246                             LOG(0, "ACCEPT: We have found a better candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
     2252                            LOG(2, "ACCEPT: We have found a better candidate: " << *(Candidate) << " with " << alpha << " and circumsphere's center at " << CandidateLine.OptCenter << ".");
    22472253                          }
    22482254                          CandidateLine.ShortestAngle = alpha;
    2249                           LOG(0, "INFO: There are " << CandidateLine.pointlist.size() << " candidates in the list now.");
     2255                          LOG(2, "DEBUG: There are " << CandidateLine.pointlist.size() << " candidates in the list now.");
    22502256                        } else {
    22512257                          if ((Candidate != NULL) && (CandidateLine.pointlist.begin() != CandidateLine.pointlist.end())) {
    2252                             LOG(1, "REJECT: Old candidate " << *(*CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " .");
     2258                            LOG(3, "REJECT: Old candidate " << *(*CandidateLine.pointlist.begin()) << " with " << CandidateLine.ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " .");
    22532259                          } else {
    2254                             LOG(1, "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected.");
     2260                            LOG(3, "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected.");
    22552261                          }
    22562262                        }
     
    22592265                      }
    22602266                    } else {
    2261                       LOG(1, "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << ".");
     2267                      LOG(3, "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << ".");
    22622268                    }
    22632269                  }
    22642270                  catch (LinearDependenceException &excp){
    2265                     LOG(1, boost::diagnostic_information(excp));
    2266                     LOG(1, "REJECT: Three points from " << *CandidateLine.BaseLine << " and Candidate " << *Candidate << " are linear-dependent.");
     2271                    LOG(3, boost::diagnostic_information(excp));
     2272                    LOG(3, "REJECT: Three points from " << *CandidateLine.BaseLine << " and Candidate " << *Candidate << " are linear-dependent.");
    22672273                  }
    22682274                } else {
    22692275                  if (ThirdPoint != NULL) {
    2270                     LOG(1, "REJECT: Base triangle " << *CandidateLine.BaseLine << " and " << *ThirdPoint << " contains Candidate " << *Candidate << ".");
     2276                    LOG(3, "REJECT: Base triangle " << *CandidateLine.BaseLine << " and " << *ThirdPoint << " contains Candidate " << *Candidate << ".");
    22712277                  } else {
    2272                     LOG(1, "REJECT: Base triangle " << *CandidateLine.BaseLine << " contains Candidate " << *Candidate << ".");
     2278                    LOG(3, "REJECT: Base triangle " << *CandidateLine.BaseLine << " contains Candidate " << *Candidate << ".");
    22732279                  }
    22742280                }
     
    22812287  } else {
    22822288    if (ThirdPoint != NULL)
    2283       LOG(1, "Circumcircle for base line " << *CandidateLine.BaseLine << " and third node " << *ThirdPoint << " is too big!");
     2289      LOG(3, "Circumcircle for base line " << *CandidateLine.BaseLine << " and third node " << *ThirdPoint << " is too big!");
    22842290    else
    2285       LOG(1, "Circumcircle for base line " << *CandidateLine.BaseLine << " is too big!");
    2286   }
    2287 
    2288   LOG(1, "INFO: Sorting candidate list ...");
     2291      LOG(3, "Circumcircle for base line " << *CandidateLine.BaseLine << " is too big!");
     2292  }
     2293
     2294  LOG(2, "DEBUG: Sorting candidate list ...");
    22892295  if (CandidateLine.pointlist.size() > 1) {
    22902296    CandidateLine.pointlist.unique();
     
    23062312class BoundaryPointSet *Tesselation::GetCommonEndpoint(const BoundaryLineSet * line1, const BoundaryLineSet * line2) const
    23072313{
    2308   Info FunctionInfo(__func__);
     2314  //Info FunctionInfo(__func__);
    23092315  const BoundaryLineSet * lines[2] = { line1, line2 };
    23102316  class BoundaryPointSet *node = NULL;
     
    23342340DistanceToPointMap * Tesselation::FindClosestBoundaryPointsToVector(const Vector &x, const LinkedCell_deprecated* LC) const
    23352341{
    2336   Info FunctionInfo(__func__);
     2342  //Info FunctionInfo(__func__);
    23372343  PointMap::const_iterator FindPoint;
    23382344  int N[NDIM], Nlower[NDIM], Nupper[NDIM];
     
    23472353  for (int i = 0; i < NDIM; i++) // store indices of this cell
    23482354    N[i] = LC->n[i];
    2349   LOG(1, "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
     2355  LOG(2, "DEBUG: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << ".");
    23502356  DistanceToPointMap * points = new DistanceToPointMap;
    23512357  LC->GetNeighbourBounds(Nlower, Nupper);
     
    23602366            if (FindPoint != PointsOnBoundary.end()) {
    23612367              points->insert(DistanceToPointPair(FindPoint->second->node->DistanceSquared(x), FindPoint->second));
    2362               LOG(1, "INFO: Putting " << *FindPoint->second << " into the list.");
     2368              LOG(3, "DEBUG: Putting " << *FindPoint->second << " into the list.");
    23632369            }
    23642370          }
     
    23852391BoundaryLineSet * Tesselation::FindClosestBoundaryLineToVector(const Vector &x, const LinkedCell_deprecated* LC) const
    23862392{
    2387   Info FunctionInfo(__func__);
     2393  //Info FunctionInfo(__func__);
    23882394  // get closest points
    23892395  DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x, LC);
     
    24312437  // check whether closest line is "too close" :), then it's inside
    24322438  if (ClosestLine == NULL) {
    2433     LOG(0, "Is the only point, no one else is closeby.");
     2439    LOG(2, "DEBUG: Is the only point, no one else is closeby.");
    24342440    return NULL;
    24352441  }
     
    24452451TriangleList * Tesselation::FindClosestTrianglesToVector(const Vector &x, const LinkedCell_deprecated* LC) const
    24462452{
    2447   Info FunctionInfo(__func__);
     2453  //Info FunctionInfo(__func__);
    24482454  // get closest points
    24492455  DistanceToPointMap * points = FindClosestBoundaryPointsToVector(x, LC);
     
    25112517  // check whether closest line is "too close" :), then it's inside
    25122518  if (ClosestLines.empty()) {
    2513     LOG(0, "Is the only point, no one else is closeby.");
     2519    LOG(2, "DEBUG: Is the only point, no one else is closeby.");
    25142520    return NULL;
    25152521  }
     
    25322538class BoundaryTriangleSet * Tesselation::FindClosestTriangleToVector(const Vector &x, const LinkedCell_deprecated* LC) const
    25332539{
    2534   Info FunctionInfo(__func__);
     2540  //Info FunctionInfo(__func__);
    25352541  class BoundaryTriangleSet *result = NULL;
    25362542  TriangleList *triangles = FindClosestTrianglesToVector(x, LC);
     
    25952601double Tesselation::GetDistanceSquaredToTriangle(const Vector &Point, const BoundaryTriangleSet* const triangle) const
    25962602{
    2597   Info FunctionInfo(__func__);
     2603  //Info FunctionInfo(__func__);
    25982604  Vector Center;
    25992605  Vector helper;
     
    26522658double Tesselation::GetDistanceToSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const
    26532659{
    2654   Info FunctionInfo(__func__);
     2660  //Info FunctionInfo(__func__);
    26552661  TriangleIntersectionList Intersections(Point, this, LC);
    26562662
     
    26672673BoundaryTriangleSet * Tesselation::GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const
    26682674{
    2669   Info FunctionInfo(__func__);
     2675  //Info FunctionInfo(__func__);
    26702676  TriangleIntersectionList Intersections(Point, this, LC);
    26712677
     
    26822688TesselPointSet * Tesselation::GetAllConnectedPoints(const TesselPoint* const Point) const
    26832689{
    2684   Info FunctionInfo(__func__);
     2690  //Info FunctionInfo(__func__);
    26852691  TesselPointSet *connectedPoints = new TesselPointSet;
    26862692  class BoundaryPointSet *ReferencePoint = NULL;
     
    27472753TesselPointList * Tesselation::GetCircleOfConnectedTriangles(TesselPointSet *SetOfNeighbours, const TesselPoint* const Point, const Vector &Reference) const
    27482754{
    2749   Info FunctionInfo(__func__);
     2755  //Info FunctionInfo(__func__);
    27502756  map<double, TesselPoint*> anglesOfPoints;
    27512757  TesselPointList *connectedCircle = new TesselPointList;
     
    27732779  }
    27742780  PlaneNormal.Scale(1.0 / triangles->size());
    2775   LOG(1, "INFO: Calculated PlaneNormal of all circle points is " << PlaneNormal << ".");
     2781  LOG(4, "DEBUG: Calculated PlaneNormal of all circle points is " << PlaneNormal << ".");
    27762782  PlaneNormal.Normalize();
    27772783
     
    27802786  AngleZero.ProjectOntoPlane(PlaneNormal);
    27812787  if ((AngleZero.NormSquared() < MYEPSILON)) {
    2782     LOG(1, "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
     2788    LOG(4, "DEBUG: Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
    27832789    AngleZero = ((*SetOfNeighbours->begin())->getPosition()) - (Point->getPosition());
    27842790    AngleZero.ProjectOntoPlane(PlaneNormal);
     
    27882794    }
    27892795  }
    2790   LOG(1, "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
     2796  LOG(4, "DEBUG: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
    27912797  if (AngleZero.NormSquared() > MYEPSILON)
    27922798    OrthogonalVector = Plane(PlaneNormal, AngleZero,0).getNormal();
    27932799  else
    27942800    OrthogonalVector.MakeNormalTo(PlaneNormal);
    2795   LOG(1, "INFO: OrthogonalVector on plane is " << OrthogonalVector << ".");
     2801  LOG(4, "DEBUG: OrthogonalVector on plane is " << OrthogonalVector << ".");
    27962802
    27972803  // go through all connected points and calculate angle
     
    28002806    helper.ProjectOntoPlane(PlaneNormal);
    28012807    double angle = GetAngle(helper, AngleZero, OrthogonalVector);
    2802     LOG(0, "INFO: Calculated angle is " << angle << " for point " << **listRunner << ".");
     2808    LOG(4, "DEBUG" << angle << " for point " << **listRunner << ".");
    28032809    anglesOfPoints.insert(pair<double, TesselPoint*> (angle, (*listRunner)));
    28042810  }
     
    28242830TesselPointList * Tesselation::GetCircleOfSetOfPoints(TesselPointSet *SetOfNeighbours, const TesselPoint* const Point, const Vector &Reference) const
    28252831{
    2826   Info FunctionInfo(__func__);
     2832  //Info FunctionInfo(__func__);
    28272833  map<double, TesselPoint*> anglesOfPoints;
    28282834  TesselPointList *connectedCircle = new TesselPointList;
     
    28592865                   ((*TesselB)->getPosition()),
    28602866                   ((*TesselC)->getPosition())).getNormal();
    2861     LOG(0, "Making normal vector out of " << *(*TesselA) << ", " << *(*TesselB) << " and " << *(*TesselC) << ":" << helper);
     2867    LOG(5, "DEBUG: Making normal vector out of " << *(*TesselA) << ", " << *(*TesselB) << " and " << *(*TesselC) << ":" << helper);
    28622868    counter++;
    28632869    TesselA++;
     
    28742880  //  PlaneNormal.SubtractVector(&center);
    28752881  //  PlaneNormal.Normalize();
    2876   LOG(1, "INFO: Calculated plane normal of circle is " << PlaneNormal << ".");
     2882  LOG(4, "DEBUG: Calculated plane normal of circle is " << PlaneNormal << ".");
    28772883
    28782884  // construct one orthogonal vector
     
    28822888  }
    28832889  if ((Reference.IsZero()) || (AngleZero.NormSquared() < MYEPSILON )) {
    2884     LOG(1, "Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
     2890    LOG(4, "DEBUG: Using alternatively " << (*SetOfNeighbours->begin())->getPosition() << " as angle 0 referencer.");
    28852891    AngleZero = ((*SetOfNeighbours->begin())->getPosition()) - (Point->getPosition());
    28862892    AngleZero.ProjectOntoPlane(PlaneNormal);
     
    28902896    }
    28912897  }
    2892   LOG(1, "INFO: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
     2898  LOG(4, "DEBUG: Reference vector on this plane representing angle 0 is " << AngleZero << ".");
    28932899  if (AngleZero.NormSquared() > MYEPSILON)
    28942900    OrthogonalVector = Plane(PlaneNormal, AngleZero,0).getNormal();
    28952901  else
    28962902    OrthogonalVector.MakeNormalTo(PlaneNormal);
    2897   LOG(1, "INFO: OrthogonalVector on plane is " << OrthogonalVector << ".");
     2903  LOG(4, "DEBUG: OrthogonalVector on plane is " << OrthogonalVector << ".");
    28982904
    28992905  // go through all connected points and calculate angle
     
    29052911    if (angle > M_PI) // the correction is of no use here (and not desired)
    29062912      angle = 2. * M_PI - angle;
    2907     LOG(0, "INFO: Calculated angle between " << helper << " and " << AngleZero << " is " << angle << " for point " << **listRunner << ".");
     2913    LOG(4, "DEBUG: Calculated angle between " << helper << " and " << AngleZero << " is " << angle << " for point " << **listRunner << ".");
    29082914    InserterTest = anglesOfPoints.insert(pair<double, TesselPoint*> (angle, (*listRunner)));
    29092915    if (!InserterTest.second) {
     
    29282934ListOfTesselPointList * Tesselation::GetPathsOfConnectedPoints(const TesselPoint* const Point) const
    29292935{
    2930   Info FunctionInfo(__func__);
     2936  //Info FunctionInfo(__func__);
    29312937  map<double, TesselPoint*> anglesOfPoints;
    29322938  list<TesselPointList *> *ListOfPaths = new list<TesselPointList *> ;
     
    30433049ListOfTesselPointList * Tesselation::GetClosedPathsOfConnectedPoints(const TesselPoint* const Point) const
    30443050{
    3045   Info FunctionInfo(__func__);
     3051  //Info FunctionInfo(__func__);
    30463052  list<TesselPointList *> *ListofPaths = GetPathsOfConnectedPoints(Point);
    30473053  list<TesselPointList *> *ListofClosedPaths = new list<TesselPointList *> ;
     
    31073113TriangleSet *Tesselation::GetAllTriangles(const BoundaryPointSet * const Point) const
    31083114{
    3109   Info FunctionInfo(__func__);
     3115  //Info FunctionInfo(__func__);
    31103116  TriangleSet *connectedTriangles = new TriangleSet;
    31113117
     
    31473153    return 0.;
    31483154  } else
    3149     LOG(0, "Removing point " << *point << " from tesselated boundary ...");
     3155    LOG(4, "DEBUG: Removing point " << *point << " from tesselated boundary ...");
    31503156
    31513157  // copy old location for the volume
     
    33283334      delete (connectedPath);
    33293335    }
    3330     LOG(0, count << " triangles were created.");
     3336    LOG(1, "INFO: " << count << " triangles were created.");
    33313337  } else {
    33323338    while (!ListOfClosedPaths->empty()) {
     
    33363342      delete (connectedPath);
    33373343    }
    3338     LOG(0, "No need to create any triangles.");
     3344    LOG(3, "DEBUG: No need to create any triangles.");
    33393345  }
    33403346  delete (ListOfClosedPaths);
    33413347
    3342   LOG(0, "Removed volume is " << volume << ".");
     3348  LOG(1, "INFO: Removed volume is " << volume << ".");
    33433349
    33443350  return volume;
     
    33563362TriangleList *Tesselation::FindTriangles(const TesselPoint* const Points[3]) const
    33573363{
    3358   Info FunctionInfo(__func__);
     3364  //Info FunctionInfo(__func__);
    33593365  TriangleList *result = new TriangleList;
    33603366  LineMap::const_iterator FindLine;
     
    34843490IndexToIndex * Tesselation::FindAllDegeneratedLines()
    34853491{
    3486   Info FunctionInfo(__func__);
     3492  //Info FunctionInfo(__func__);
    34873493  UniqueLines AllLines;
    34883494  IndexToIndex * DegeneratedLines = new IndexToIndex;
     
    35053511  AllLines.clear();
    35063512
    3507   LOG(0, "FindAllDegeneratedLines() found " << DegeneratedLines->size() << " lines.");
     3513  LOG(2, "DEBUG: FindAllDegeneratedLines() found " << DegeneratedLines->size() << " lines.");
    35083514  IndexToIndex::iterator it;
    35093515  for (it = DegeneratedLines->begin(); it != DegeneratedLines->end(); it++) {
     
    35113517    const LineMap::const_iterator Line2 = LinesOnBoundary.find((*it).second);
    35123518    if (Line1 != LinesOnBoundary.end() && Line2 != LinesOnBoundary.end())
    3513       LOG(0, *Line1->second << " => " << *Line2->second);
     3519      LOG(3, "DEBUG: " << *Line1->second << " => " << *Line2->second);
    35143520    else
    35153521      ELOG(1, "Either " << (*it).first << " or " << (*it).second << " are not in LinesOnBoundary!");
     
    35273533IndexToIndex * Tesselation::FindAllDegeneratedTriangles()
    35283534{
    3529   Info FunctionInfo(__func__);
     3535  //Info FunctionInfo(__func__);
    35303536  IndexToIndex * DegeneratedLines = FindAllDegeneratedLines();
    35313537  IndexToIndex * DegeneratedTriangles = new IndexToIndex;
     
    35533559  delete (DegeneratedLines);
    35543560
    3555   LOG(0, "FindAllDegeneratedTriangles() found " << DegeneratedTriangles->size() << " triangles:");
     3561  LOG(3, "DEBUG: FindAllDegeneratedTriangles() found " << DegeneratedTriangles->size() << " triangles:");
    35563562  for (IndexToIndex::iterator it = DegeneratedTriangles->begin(); it != DegeneratedTriangles->end(); it++)
    3557     LOG(0, (*it).first << " => " << (*it).second);
     3563    LOG(3, "DEBUG:    " << (*it).first << " => " << (*it).second);
    35583564
    35593565  return DegeneratedTriangles;
     
    35663572void Tesselation::RemoveDegeneratedTriangles()
    35673573{
    3568   Info FunctionInfo(__func__);
     3574  //Info FunctionInfo(__func__);
    35693575  IndexToIndex * DegeneratedTriangles = FindAllDegeneratedTriangles();
    35703576  TriangleMap::iterator finder;
     
    35743580  // iterate over all degenerated triangles
    35753581  for (IndexToIndex::iterator TriangleKeyRunner = DegeneratedTriangles->begin(); !DegeneratedTriangles->empty(); TriangleKeyRunner = DegeneratedTriangles->begin()) {
    3576     LOG(0, "Checking presence of triangles " << TriangleKeyRunner->first << " and " << TriangleKeyRunner->second << ".");
     3582    LOG(3, "DEBUG: Checking presence of triangles " << TriangleKeyRunner->first << " and " << TriangleKeyRunner->second << ".");
    35773583    // both ways are stored in the map, only use one
    35783584    if (TriangleKeyRunner->first > TriangleKeyRunner->second)
     
    36313637      // erase the pair
    36323638      count += (int) DegeneratedTriangles->erase(triangle->Nr);
    3633       LOG(0, "RemoveDegeneratedTriangles() removes triangle " << *triangle << ".");
     3639      LOG(4, "DEBUG: RemoveDegeneratedTriangles() removes triangle " << *triangle << ".");
    36343640      RemoveTesselationTriangle(triangle);
    36353641      count += (int) DegeneratedTriangles->erase(partnerTriangle->Nr);
    3636       LOG(0, "RemoveDegeneratedTriangles() removes triangle " << *partnerTriangle << ".");
     3642      LOG(4, "DEBUG: RemoveDegeneratedTriangles() removes triangle " << *partnerTriangle << ".");
    36373643      RemoveTesselationTriangle(partnerTriangle);
    36383644    } else {
    3639       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.");
     3645      LOG(4, "DEBUG: 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.");
    36403646    }
    36413647  }
     
    36443650    LastTriangle = NULL;
    36453651
    3646   LOG(0, "RemoveDegeneratedTriangles() removed " << count << " triangles:");
     3652  LOG(2, "INFO: RemoveDegeneratedTriangles() removed " << count << " triangles:");
    36473653}
    36483654
     
    36573663void Tesselation::AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell_deprecated *LC)
    36583664{
    3659   Info FunctionInfo(__func__);
     3665  //Info FunctionInfo(__func__);
    36603666  // find nearest boundary point
    36613667  class TesselPoint *BackupPoint = NULL;
     
    36733679    return;
    36743680  }
    3675   LOG(0, "Nearest point on boundary is " << NearestPoint->getName() << ".");
     3681  LOG(3, "DEBUG: Nearest point on boundary is " << NearestPoint->getName() << ".");
    36763682
    36773683  // go through its lines and find the best one to split
     
    37553761void Tesselation::Output(const char *filename, IPointCloud & cloud)
    37563762{
    3757   Info FunctionInfo(__func__);
     3763  //Info FunctionInfo(__func__);
    37583764  ofstream *tempstream = NULL;
    37593765  string NameofTempFile;
     
    38293835int Tesselation::CorrectAllDegeneratedPolygons()
    38303836{
    3831   Info FunctionInfo(__func__);
     3837  //Info FunctionInfo(__func__);
    38323838  /// 2. Go through all BoundaryPointSet's, check their triangles' NormalVector
    38333839  IndexToIndex *DegeneratedTriangles = FindAllDegeneratedTriangles();
     
    38363842  pair<map<int, Vector *>::iterator, bool> TriangleInsertionTester;
    38373843  for (PointMap::const_iterator Runner = PointsOnBoundary.begin(); Runner != PointsOnBoundary.end(); Runner++) {
    3838     LOG(0, "Current point is " << *Runner->second << ".");
     3844    LOG(3, "DEBUG: Current point is " << *Runner->second << ".");
    38393845    map<int, Vector *> TriangleVectors;
    38403846    // gather all NormalVectors
    3841     LOG(1, "Gathering triangles ...");
     3847    LOG(4, "DEBUG: Gathering triangles ...");
    38423848    for (LineMap::const_iterator LineRunner = (Runner->second)->lines.begin(); LineRunner != (Runner->second)->lines.end(); LineRunner++)
    38433849      for (TriangleMap::const_iterator TriangleRunner = (LineRunner->second)->triangles.begin(); TriangleRunner != (LineRunner->second)->triangles.end(); TriangleRunner++) {
     
    38453851          TriangleInsertionTester = TriangleVectors.insert(pair<int, Vector *> ((TriangleRunner->second)->Nr, &((TriangleRunner->second)->NormalVector)));
    38463852          if (TriangleInsertionTester.second)
    3847             LOG(1, " Adding triangle " << *(TriangleRunner->second) << " to triangles to check-list.");
     3853            LOG(5, "DEBUG: Adding triangle " << *(TriangleRunner->second) << " to triangles to check-list.");
    38483854        } else {
    3849           LOG(1, " NOT adding triangle " << *(TriangleRunner->second) << " as it's a simply degenerated one.");
     3855          LOG(5, "DEBUG: NOT adding triangle " << *(TriangleRunner->second) << " as it's a simply degenerated one.");
    38503856        }
    38513857      }
    38523858    // check whether there are two that are parallel
    3853     LOG(1, "Finding two parallel triangles ...");
     3859    LOG(3, "DEBUG: Finding two parallel triangles ...");
    38543860    for (map<int, Vector *>::iterator VectorWalker = TriangleVectors.begin(); VectorWalker != TriangleVectors.end(); VectorWalker++)
    38553861      for (map<int, Vector *>::iterator VectorRunner = VectorWalker; VectorRunner != TriangleVectors.end(); VectorRunner++)
    38563862        if (VectorWalker != VectorRunner) { // skip equals
    38573863          const double SCP = VectorWalker->second->ScalarProduct(*VectorRunner->second); // ScalarProduct should result in -1. for degenerated triangles
    3858           LOG(1, "Checking " << *VectorWalker->second << " against " << *VectorRunner->second << ": " << SCP);
     3864          LOG(4, "DEBUG: Checking " << *VectorWalker->second << " against " << *VectorRunner->second << ": " << SCP);
    38593865          if (fabs(SCP + 1.) < ParallelEpsilon) {
    38603866            InsertionTester = EndpointCandidateList.insert((Runner->second));
    38613867            if (InsertionTester.second)
    3862               LOG(0, " Adding " << *Runner->second << " to endpoint candidate list.");
     3868              LOG(4, "DEBUG: Adding " << *Runner->second << " to endpoint candidate list.");
    38633869            // and break out of both loops
    38643870            VectorWalker = TriangleVectors.end();
     
    38793885    Walker = *(EndpointCandidateList.begin());
    38803886    if (Current == NULL) { // create a new polygon with current candidate
    3881       LOG(0, "Starting new polygon set at point " << *Walker);
     3887      LOG(3, "DEBUG: Starting new polygon set at point " << *Walker);
    38823888      Current = new BoundaryPolygonSet;
    38833889      Current->endpoints.insert(Walker);
     
    38923898      for (LineMap::const_iterator LineWalker = Walker->lines.begin(); LineWalker != Walker->lines.end(); LineWalker++) {
    38933899        OtherWalker = (LineWalker->second)->GetOtherEndpoint(Walker);
    3894         LOG(1, "Checking " << *OtherWalker);
     3900        LOG(4, "DEBUG: Checking " << *OtherWalker);
    38953901        set<BoundaryPointSet *>::iterator Finder = EndpointCandidateList.find(OtherWalker);
    38963902        if (Finder != EndpointCandidateList.end()) { // found a connected partner
    3897           LOG(1, " Adding to polygon.");
     3903          LOG(5, "DEBUG: Adding to polygon.");
    38983904          Current->endpoints.insert(OtherWalker);
    38993905          EndpointCandidateList.erase(Finder); // remove from candidates
    39003906          ToCheckConnecteds.push(OtherWalker); // but check its partners too
    39013907        } else {
    3902           LOG(1, " is not connected to " << *Walker);
     3908          LOG(5, "DEBUG: is not connected to " << *Walker);
    39033909        }
    39043910      }
    39053911    }
    39063912
    3907     LOG(0, "Final polygon is " << *Current);
     3913    LOG(3, "DEBUG: Final polygon is " << *Current);
    39083914    ListofDegeneratedPolygons.insert(Current);
    39093915    Current = NULL;
     
    39173923    for (UniquePolygonSet::iterator PolygonRunner = ListofDegeneratedPolygons.begin(); PolygonRunner != ListofDegeneratedPolygons.end(); PolygonRunner++)
    39183924      output << " " << **PolygonRunner;
    3919     LOG(0, output.str());
     3925    LOG(3, "DEBUG: " << output.str());
    39203926  }
    39213927
     
    39293935    // check whether number is bigger than 2, otherwise it's just a simply degenerated one and nothing to do.
    39303936    if (T->size() == 2) {
    3931       LOG(1, " Skipping degenerated polygon, is just a (already simply degenerated) triangle.");
     3937      LOG(4, "DEBUG: Skipping degenerated polygon, is just a (already simply degenerated) triangle.");
    39323938      delete (T);
    39333939      continue;
     
    39453951    /// 4a. Get NormalVector for one side (this is "front")
    39463952    NormalVector = (*TriangleWalker)->NormalVector;
    3947     LOG(1, "\"front\" defining triangle is " << **TriangleWalker << " and Normal vector of \"front\" side is " << NormalVector);
     3953    LOG(4, "DEBUG: \"front\" defining triangle is " << **TriangleWalker << " and Normal vector of \"front\" side is " << NormalVector);
    39483954    TriangleWalker++;
    39493955    TriangleSet::iterator TriangleSprinter = TriangleWalker; // is the inner advanced iterator
     
    39543960      triangle = *TriangleWalker;
    39553961      TriangleSprinter++;
    3956       LOG(1, "Current triangle to test for removal: " << *triangle);
     3962      LOG(4, "DEBUG: Current triangle to test for removal: " << *triangle);
    39573963      if (triangle->NormalVector.ScalarProduct(NormalVector) < 0) { // if from other side, then delete and remove from list
    3958         LOG(1, " Removing ... ");
     3964        LOG(5, "DEBUG: Removing ... ");
    39593965        TriangleNrs.push(triangle->Nr);
    39603966        T->erase(TriangleWalker);
    39613967        RemoveTesselationTriangle(triangle);
    39623968      } else
    3963         LOG(1, " Keeping ... ");
     3969        LOG(5, "DEBUG: Keeping ... ");
    39643970    }
    39653971    /// 4c. Copy all "front" triangles but with inverse NormalVector
    39663972    TriangleWalker = T->begin();
    39673973    while (TriangleWalker != T->end()) { // go through all front triangles
    3968       LOG(1, " Re-creating triangle " << **TriangleWalker << " with NormalVector " << (*TriangleWalker)->NormalVector);
     3974      LOG(4, "DEBUG: Re-creating triangle " << **TriangleWalker << " with NormalVector " << (*TriangleWalker)->NormalVector);
    39693975      for (int i = 0; i < 3; i++)
    39703976        AddTesselationPoint((*TriangleWalker)->endpoints[i]->node, i);
     
    39863992  }
    39873993  IndexToIndex * SimplyDegeneratedTriangles = FindAllDegeneratedTriangles();
    3988   LOG(0, "Final list of simply degenerated triangles found, containing " << SimplyDegeneratedTriangles->size() << " triangles:");
     3994  LOG(2, "DEBUG: Final list of simply degenerated triangles found, containing " << SimplyDegeneratedTriangles->size() << " triangles:");
    39893995  IndexToIndex::iterator it;
    39903996  for (it = SimplyDegeneratedTriangles->begin(); it != SimplyDegeneratedTriangles->end(); it++)
    3991     LOG(0, (*it).first << " => " << (*it).second);
     3997    LOG(2, "DEBUG:   " << (*it).first << " => " << (*it).second);
    39923998  delete (SimplyDegeneratedTriangles);
    39933999  /// 5. exit
Note: See TracChangeset for help on using the changeset viewer.