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/BoundaryPolygonSet.cpp

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