Ignore:
Timestamp:
Nov 4, 2009, 7:56:04 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
4ef101, aa8542
Parents:
ec70ec
Message:

Huge change from ofstream * (const) out --> Log().

  • first shift was done via regular expressions
  • then via error messages from the code
  • note that class atom, class element and class molecule kept in parts their output stream, was they print to file.
  • make check runs fine
  • MISSING: Verbosity is not fixed for everything (i.e. if no endl; is present and next has Verbose(0) ...)

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselationhelpers.cpp

    rec70ec r543ce4  
    99
    1010#include "linkedcell.hpp"
     11#include "log.hpp"
    1112#include "tesselation.hpp"
    1213#include "tesselationhelpers.hpp"
     
    7677
    7778  if (fabs(m11) < MYEPSILON)
    78     cerr << "ERROR: three points are colinear." << endl;
     79    eLog() << Verbose(0) << "ERROR: three points are colinear." << endl;
    7980
    8081  center->x[0] =  0.5 * m12/ m11;
     
    8384
    8485  if (fabs(a.Distance(center) - RADIUS) > MYEPSILON)
    85     cerr << "ERROR: The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;
     86    eLog() << Verbose(0) << "ERROR: The given center is further way by " << fabs(a.Distance(center) - RADIUS) << " from a than RADIUS." << endl;
    8687
    8788  gsl_matrix_free(A);
     
    113114  double Restradius;
    114115  Vector OtherCenter;
    115   cout << Verbose(3) << "Begin of GetCenterOfSphere.\n";
     116  Log() << Verbose(3) << "Begin of GetCenterOfSphere.\n";
    116117  Center->Zero();
    117118  helper.CopyVector(&a);
     
    127128  Center->Scale(1./(sin(2.*alpha) + sin(2.*beta) + sin(2.*gamma)));
    128129  NewUmkreismittelpunkt->CopyVector(Center);
    129   cout << Verbose(4) << "Center of new circumference is " << *NewUmkreismittelpunkt << ".\n";
     130  Log() << Verbose(4) << "Center of new circumference is " << *NewUmkreismittelpunkt << ".\n";
    130131  // Here we calculated center of circumscribing circle, using barycentric coordinates
    131   cout << Verbose(4) << "Center of circumference is " << *Center << " in direction " << *Direction << ".\n";
     132  Log() << Verbose(4) << "Center of circumference is " << *Center << " in direction " << *Direction << ".\n";
    132133
    133134  TempNormal.CopyVector(&a);
     
    153154  TempNormal.Normalize();
    154155  Restradius = sqrt(RADIUS*RADIUS - Umkreisradius*Umkreisradius);
    155   cout << Verbose(4) << "Height of center of circumference to center of sphere is " << Restradius << ".\n";
     156  Log() << Verbose(4) << "Height of center of circumference to center of sphere is " << Restradius << ".\n";
    156157  TempNormal.Scale(Restradius);
    157   cout << Verbose(4) << "Shift vector to sphere of circumference is " << TempNormal << ".\n";
     158  Log() << Verbose(4) << "Shift vector to sphere of circumference is " << TempNormal << ".\n";
    158159
    159160  Center->AddVector(&TempNormal);
    160   cout << Verbose(0) << "Center of sphere of circumference is " << *Center << ".\n";
     161  Log() << Verbose(0) << "Center of sphere of circumference is " << *Center << ".\n";
    161162  GetSphere(&OtherCenter, a, b, c, RADIUS);
    162   cout << Verbose(0) << "OtherCenter of sphere of circumference is " << OtherCenter << ".\n";
    163   cout << Verbose(3) << "End of GetCenterOfSphere.\n";
     163  Log() << Verbose(0) << "OtherCenter of sphere of circumference is " << OtherCenter << ".\n";
     164  Log() << Verbose(3) << "End of GetCenterOfSphere.\n";
    164165};
    165166
     
    185186  beta = M_PI - SideC.Angle(&SideA);
    186187  gamma = M_PI - SideA.Angle(&SideB);
    187   //cout << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl;
     188  //Log() << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl;
    188189  if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON)
    189     cerr << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl;
     190    eLog() << Verbose(0) << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl;
    190191
    191192  Center->Zero();
     
    223224  // test whether new center is on the parameter circle's plane
    224225  if (fabs(helper.ScalarProduct(&CirclePlaneNormal)) > HULLEPSILON) {
    225     cerr << "ERROR: Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal))  << "!" << endl;
     226    eLog() << Verbose(0) << "ERROR: Something's very wrong here: NewSphereCenter is not on the band's plane as desired by " <<fabs(helper.ScalarProduct(&CirclePlaneNormal))  << "!" << endl;
    226227    helper.ProjectOntoPlane(&CirclePlaneNormal);
    227228  }
     
    229230  // test whether the new center vector has length of CircleRadius
    230231  if (fabs(radius - CircleRadius) > HULLEPSILON)
    231     cerr << Verbose(1) << "ERROR: The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
     232    eLog() << Verbose(1) << "ERROR: The projected center of the new sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;
    232233  alpha = helper.Angle(&OldSphereCenter);
    233234  // make the angle unique by checking the halfplanes/search direction
    234235  if (helper.ScalarProduct(&SearchDirection) < -HULLEPSILON)  // acos is not unique on [0, 2.*M_PI), hence extra check to decide between two half intervals
    235236    alpha = 2.*M_PI - alpha;
    236   //cout << Verbose(2) << "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << OldSphereCenter << " and resulting angle is " << alpha << "." << endl;
     237  //Log() << Verbose(2) << "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << OldSphereCenter << " and resulting angle is " << alpha << "." << endl;
    237238  radius = helper.Distance(&OldSphereCenter);
    238239  helper.ProjectOntoPlane(&NormalVector);
    239240  // check whether new center is somewhat away or at least right over the current baseline to prevent intersecting triangles
    240241  if ((radius > HULLEPSILON) || (helper.Norm() < HULLEPSILON)) {
    241     //cout << Verbose(2) << "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "." << endl;
     242    //Log() << Verbose(2) << "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "." << endl;
    242243    return alpha;
    243244  } else {
    244     //cout << Verbose(1) << "INFO: NewSphereCenter " << helper << " is too close to OldSphereCenter" << OldSphereCenter << "." << endl;
     245    //Log() << Verbose(1) << "INFO: NewSphereCenter " << helper << " is too close to OldSphereCenter" << OldSphereCenter << "." << endl;
    245246    return 2.*M_PI;
    246247  }
     
    282283
    283284  retval = HeightA.ScalarProduct(&HeightA) + HeightB.ScalarProduct(&HeightB);
    284   //cout << Verbose(2) << "MinIntersectDistance called, result: " << retval << endl;
     285  //Log() << Verbose(2) << "MinIntersectDistance called, result: " << retval << endl;
    285286
    286287  return retval;
     
    349350
    350351        if (status == GSL_SUCCESS) {
    351           cout << Verbose(2) << "converged to minimum" <<  endl;
     352          Log() << Verbose(2) << "converged to minimum" <<  endl;
    352353        }
    353354    } while (status == GSL_CONTINUE && iter < 100);
     
    374375  t2 = HeightB.ScalarProduct(&SideB)/SideB.ScalarProduct(&SideB);
    375376
    376   cout << Verbose(2) << "Intersection " << intersection << " is at "
     377  Log() << Verbose(2) << "Intersection " << intersection << " is at "
    377378    << t1 << " for (" << point1 << "," << point2 << ") and at "
    378379    << t2 << " for (" << point3 << "," << point4 << "): ";
    379380
    380381  if (((t1 >= 0) && (t1 <= 1)) && ((t2 >= 0) && (t2 <= 1))) {
    381     cout << "true intersection." << endl;
     382    Log() << Verbose(0) << "true intersection." << endl;
    382383    result = true;
    383384  } else {
    384     cout << "intersection out of region of interest." << endl;
     385    Log() << Verbose(0) << "intersection out of region of interest." << endl;
    385386    result = false;
    386387  }
     
    416417  }
    417418
    418   cout << Verbose(4) << "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << "." << endl;
     419  Log() << Verbose(4) << "INFO: " << point << " has angle " << phi << " with respect to reference " << reference << "." << endl;
    419420
    420421  return phi;
     
    472473        }
    473474      } else { // no line
    474         cout << Verbose(1) << "The line between " << *nodes[i] << " and " << *nodes[j] << " is not yet present, hence no need for a degenerate triangle." << endl;
     475        Log() << Verbose(1) << "The line between " << *nodes[i] << " and " << *nodes[j] << " is not yet present, hence no need for a degenerate triangle." << endl;
    475476        result = true;
    476477      }
    477478    }
    478479  if ((!result) && (counter > 1)) {
    479     cout << Verbose(2) << "INFO: Degenerate triangle is ok, at least two, here " << counter << ", existing lines are used." << endl;
     480    Log() << Verbose(2) << "INFO: Degenerate triangle is ok, at least two, here " << counter << ", existing lines are used." << endl;
    480481    result = true;
    481482  }
     
    490491  Vector BaseLineVector, OrthogonalVector, helper;
    491492  if (candidate1->BaseLine != candidate2->BaseLine) {  // sanity check
    492     cout << Verbose(0) << "ERROR: sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
     493    Log() << Verbose(0) << "ERROR: sortCandidates was called for two different baselines: " << candidate1->BaseLine << " and " << candidate2->BaseLine << "." << endl;
    493494    //return false;
    494495    exit(1);
     
    521522  }
    522523
    523   cout << Verbose(2) << *candidate1->point << " has angle " << phi << endl;
    524   cout << Verbose(2) << *candidate2->point << " has angle " << psi << endl;
     524  Log() << Verbose(2) << *candidate1->point << " has angle " << phi << endl;
     525  Log() << Verbose(2) << *candidate2->point << " has angle " << psi << endl;
    525526
    526527  // return comparison
     
    548549  for(int i=0;i<NDIM;i++) // store indices of this cell
    549550    N[i] = LC->n[i];
    550   cout << Verbose(2) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
     551  Log() << Verbose(2) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
    551552
    552553  LC->GetNeighbourBounds(Nlower, Nupper);
    553   //cout << endl;
     554  //Log() << Verbose(0) << endl;
    554555  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    555556    for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    556557      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    557558        const LinkedNodes *List = LC->GetCurrentCell();
    558         //cout << Verbose(3) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
     559        //Log() << Verbose(3) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
    559560        if (List != NULL) {
    560561          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    569570              distance = currentNorm;
    570571              closestPoint = (*Runner);
    571               //cout << Verbose(2) << "INFO: New Second Nearest Neighbour is " << *secondClosestPoint << "." << endl;
     572              //Log() << Verbose(2) << "INFO: New Second Nearest Neighbour is " << *secondClosestPoint << "." << endl;
    572573            }
    573574          }
    574575        } else {
    575           cerr << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
     576          eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
    576577            << LC->n[2] << " is invalid!" << endl;
    577578        }
     
    602603  for(int i=0;i<NDIM;i++) // store indices of this cell
    603604    N[i] = LC->n[i];
    604   cout << Verbose(3) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
     605  Log() << Verbose(3) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;
    605606
    606607  LC->GetNeighbourBounds(Nlower, Nupper);
    607   //cout << endl;
     608  //Log() << Verbose(0) << endl;
    608609  for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++)
    609610    for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++)
    610611      for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) {
    611612        const LinkedNodes *List = LC->GetCurrentCell();
    612         //cout << Verbose(3) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
     613        //Log() << Verbose(3) << "The current cell " << LC->n[0] << "," << LC->n[1] << "," << LC->n[2] << endl;
    613614        if (List != NULL) {
    614615          for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
     
    621622              distance = currentNorm;
    622623              closestPoint = (*Runner);
    623               //cout << Verbose(2) << "INFO: New Nearest Neighbour is " << *closestPoint << "." << endl;
     624              //Log() << Verbose(2) << "INFO: New Nearest Neighbour is " << *closestPoint << "." << endl;
    624625            } else if (currentNorm < secondDistance) {
    625626              secondDistance = currentNorm;
    626627              SecondPoint = (*Runner);
    627               //cout << Verbose(2) << "INFO: New Second Nearest Neighbour is " << *SecondPoint << "." << endl;
     628              //Log() << Verbose(2) << "INFO: New Second Nearest Neighbour is " << *SecondPoint << "." << endl;
    628629            }
    629630          }
    630631        } else {
    631           cerr << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
     632          eLog() << Verbose(0) << "ERROR: The current cell " << LC->n[0] << "," << LC->n[1] << ","
    632633            << LC->n[2] << " is invalid!" << endl;
    633634        }
     
    635636  // output
    636637  if (closestPoint != NULL) {
    637     cout << Verbose(2) << "Closest point is " << *closestPoint;
     638    Log() << Verbose(2) << "Closest point is " << *closestPoint;
    638639    if (SecondPoint != NULL)
    639       cout << " and second closest is " << *SecondPoint;
    640     cout << "." << endl;
     640      Log() << Verbose(0) << " and second closest is " << *SecondPoint;
     641    Log() << Verbose(0) << "." << endl;
    641642  }
    642643  return closestPoint;
     
    649650 * \return Vector on reference line that has closest distance
    650651 */
    651 Vector * GetClosestPointBetweenLine(ofstream *out, const BoundaryLineSet * const Base, const BoundaryLineSet * const OtherBase)
     652Vector * GetClosestPointBetweenLine(const BoundaryLineSet * const Base, const BoundaryLineSet * const OtherBase)
    652653{
    653654  // construct the plane of the two baselines (i.e. take both their directional vectors)
     
    661662  Normal.VectorProduct(&OtherBaseline);
    662663  Normal.Normalize();
    663   *out << Verbose(4) << "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << "." << endl;
     664  Log() << Verbose(4) << "First direction is " << Baseline << ", second direction is " << OtherBaseline << ", normal of intersection plane is " << Normal << "." << endl;
    664665
    665666  // project one offset point of OtherBase onto this plane (and add plane offset vector)
     
    675676  // calculate the intersection between this projected baseline and Base
    676677  Vector *Intersection = new Vector;
    677   Intersection->GetIntersectionOfTwoLinesOnPlane(out, Base->endpoints[0]->node->node, Base->endpoints[1]->node->node, &NewOffset, &NewDirection, &Normal);
     678  Intersection->GetIntersectionOfTwoLinesOnPlane(Base->endpoints[0]->node->node, Base->endpoints[1]->node->node, &NewOffset, &NewDirection, &Normal);
    678679  Normal.CopyVector(Intersection);
    679680  Normal.SubtractVector(Base->endpoints[0]->node->node);
    680   *out << Verbose(3) << "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(&Baseline)/Baseline.NormSquared()) << "." << endl;
     681  Log() << Verbose(3) << "Found closest point on " << *Base << " at " << *Intersection << ", factor in line is " << fabs(Normal.ScalarProduct(&Baseline)/Baseline.NormSquared()) << "." << endl;
    681682
    682683  return Intersection;
     
    689690 * \return distance between \a *x and plane defined by \a *triangle, -1 - if something went wrong
    690691 */
    691 double DistanceToTrianglePlane(ofstream * const out, const Vector *x, const BoundaryTriangleSet * const triangle)
     692double DistanceToTrianglePlane(const Vector *x, const BoundaryTriangleSet * const triangle)
    692693{
    693694  double distance = 0.;
     
    695696    return -1;
    696697  }
    697   distance = x->DistanceToPlane(out, &triangle->NormalVector, triangle->endpoints[0]->node->node);
     698  distance = x->DistanceToPlane(&triangle->NormalVector, triangle->endpoints[0]->node->node);
    698699  return distance;
    699700};
     
    705706 * \param *mol molecule structure with atom positions
    706707 */
    707 void WriteVrmlFile(ofstream * const out, ofstream * const vrmlfile, const Tesselation * const Tess, const PointCloud * const cloud)
     708void WriteVrmlFile(ofstream * const vrmlfile, const Tesselation * const Tess, const PointCloud * const cloud)
    708709{
    709710  TesselPoint *Walker = NULL;
    710711  int i;
    711   Vector *center = cloud->GetCenter(out);
     712  Vector *center = cloud->GetCenter();
    712713  if (vrmlfile != NULL) {
    713     //cout << Verbose(1) << "Writing Raster3D file ... ";
     714    //Log() << Verbose(1) << "Writing Raster3D file ... ";
    714715    *vrmlfile << "#VRML V2.0 utf8" << endl;
    715716    *vrmlfile << "#Created by molecuilder" << endl;
     
    737738    }
    738739  } else {
    739     cerr << "ERROR: Given vrmlfile is " << vrmlfile << "." << endl;
     740    eLog() << Verbose(0) << "ERROR: Given vrmlfile is " << vrmlfile << "." << endl;
    740741  }
    741742  delete(center);
     
    748749 * \param *mol molecule structure with atom positions
    749750 */
    750 void IncludeSphereinRaster3D(ofstream * const out, ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
     751void IncludeSphereinRaster3D(ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
    751752{
    752753  Vector helper;
    753754  // include the current position of the virtual sphere in the temporary raster3d file
    754   Vector *center = cloud->GetCenter(out);
     755  Vector *center = cloud->GetCenter();
    755756  // make the circumsphere's center absolute again
    756757  helper.CopyVector(Tess->LastTriangle->endpoints[0]->node->node);
     
    773774 * \param *mol molecule structure with atom positions
    774775 */
    775 void WriteRaster3dFile(ofstream * const out, ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
     776void WriteRaster3dFile(ofstream * const rasterfile, const Tesselation * const Tess, const PointCloud * const cloud)
    776777{
    777778  TesselPoint *Walker = NULL;
    778779  int i;
    779   Vector *center = cloud->GetCenter(out);
     780  Vector *center = cloud->GetCenter();
    780781  if (rasterfile != NULL) {
    781     //cout << Verbose(1) << "Writing Raster3D file ... ";
     782    //Log() << Verbose(1) << "Writing Raster3D file ... ";
    782783    *rasterfile << "# Raster3D object description, created by MoleCuilder" << endl;
    783784    *rasterfile << "@header.r3d" << endl;
     
    807808    *rasterfile << "9\n#  terminating special property\n";
    808809  } else {
    809     cerr << "ERROR: Given rasterfile is " << rasterfile << "." << endl;
    810   }
    811   IncludeSphereinRaster3D(out, rasterfile, Tess, cloud);
     810    eLog() << Verbose(0) << "ERROR: Given rasterfile is " << rasterfile << "." << endl;
     811  }
     812  IncludeSphereinRaster3D(rasterfile, Tess, cloud);
    812813  delete(center);
    813814};
     
    818819 * \param N arbitrary number to differentiate various zones in the tecplot format
    819820 */
    820 void WriteTecplotFile(ofstream * const out, ofstream * const tecplot, const Tesselation * const TesselStruct, const PointCloud * const cloud, const int N)
     821void WriteTecplotFile(ofstream * const tecplot, const Tesselation * const TesselStruct, const PointCloud * const cloud, const int N)
    821822{
    822823  if ((tecplot != NULL) && (TesselStruct != NULL)) {
     
    835836
    836837    // print atom coordinates
    837     *out << Verbose(2) << "The following triangles were created:";
     838    Log() << Verbose(2) << "The following triangles were created:";
    838839    int Counter = 1;
    839840    TesselPoint *Walker = NULL;
     
    846847    // print connectivity
    847848    for (TriangleMap::const_iterator runner = TesselStruct->TrianglesOnBoundary.begin(); runner != TesselStruct->TrianglesOnBoundary.end(); runner++) {
    848       *out << " " << runner->second->endpoints[0]->node->Name << "<->" << runner->second->endpoints[1]->node->Name << "<->" << runner->second->endpoints[2]->node->Name;
     849      Log() << Verbose(0) << " " << runner->second->endpoints[0]->node->Name << "<->" << runner->second->endpoints[1]->node->Name << "<->" << runner->second->endpoints[2]->node->Name;
    849850      *tecplot << LookupList[runner->second->endpoints[0]->node->nr] << " " << LookupList[runner->second->endpoints[1]->node->nr] << " " << LookupList[runner->second->endpoints[2]->node->nr] << endl;
    850851    }
    851852    delete[] (LookupList);
    852     *out << endl;
     853    Log() << Verbose(0) << endl;
    853854  }
    854855};
     
    859860 * \param *TesselStruct pointer to Tesselation structure
    860861 */
    861 void CalculateConcavityPerBoundaryPoint(ofstream * const out, const Tesselation * const TesselStruct)
     862void CalculateConcavityPerBoundaryPoint(const Tesselation * const TesselStruct)
    862863{
    863864  class BoundaryPointSet *point = NULL;
    864865  class BoundaryLineSet *line = NULL;
    865866
    866   //*out << Verbose(2) << "Begin of CalculateConcavityPerBoundaryPoint" << endl;
     867  //Log() << Verbose(2) << "Begin of CalculateConcavityPerBoundaryPoint" << endl;
    867868  // calculate remaining concavity
    868869  for (PointMap::const_iterator PointRunner = TesselStruct->PointsOnBoundary.begin(); PointRunner != TesselStruct->PointsOnBoundary.end(); PointRunner++) {
    869870    point = PointRunner->second;
    870     *out << Verbose(1) << "INFO: Current point is " << *point << "." << endl;
     871    Log() << Verbose(1) << "INFO: Current point is " << *point << "." << endl;
    871872    point->value = 0;
    872873    for (LineMap::iterator LineRunner = point->lines.begin(); LineRunner != point->lines.end(); LineRunner++) {
    873874      line = LineRunner->second;
    874       //*out << Verbose(2) << "INFO: Current line of point " << *point << " is " << *line << "." << endl;
    875       if (!line->CheckConvexityCriterion(out))
     875      //Log() << Verbose(2) << "INFO: Current line of point " << *point << " is " << *line << "." << endl;
     876      if (!line->CheckConvexityCriterion())
    876877        point->value += 1;
    877878    }
    878879  }
    879   //*out << Verbose(2) << "End of CalculateConcavityPerBoundaryPoint" << endl;
     880  //Log() << Verbose(2) << "End of CalculateConcavityPerBoundaryPoint" << endl;
    880881};
    881882
     
    886887 * \return true - all have exactly two triangles, false - some not, list is printed to screen
    887888 */
    888 bool CheckListOfBaselines(ofstream * const out, const Tesselation * const TesselStruct)
     889bool CheckListOfBaselines(const Tesselation * const TesselStruct)
    889890{
    890891  LineMap::const_iterator testline;
     
    892893  int counter = 0;
    893894
    894   *out << Verbose(1) << "Check: List of Baselines with not two connected triangles:" << endl;
     895  Log() << Verbose(1) << "Check: List of Baselines with not two connected triangles:" << endl;
    895896  for (testline = TesselStruct->LinesOnBoundary.begin(); testline != TesselStruct->LinesOnBoundary.end(); testline++) {
    896897    if (testline->second->triangles.size() != 2) {
    897       *out << Verbose(1) << *testline->second << "\t" << testline->second->triangles.size() << endl;
     898      Log() << Verbose(1) << *testline->second << "\t" << testline->second->triangles.size() << endl;
    898899      counter++;
    899900    }
    900901  }
    901902  if (counter == 0) {
    902     *out << Verbose(1) << "None." << endl;
     903    Log() << Verbose(1) << "None." << endl;
    903904    result = true;
    904905  }
Note: See TracChangeset for help on using the changeset viewer.