Ignore:
Timestamp:
Nov 3, 2011, 7:44:01 PM (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:
41a467
Parents:
50e4e5
git-author:
Frederik Heber <heber@…> (10/27/11 11:53:58)
git-committer:
Frederik Heber <heber@…> (11/03/11 19:44:01)
Message:

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

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

Legend:

Unmodified
Added
Removed
  • src/Tesselation/BoundaryLineSet.cpp

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