Changeset a67d19 for src/boundary.cpp
- Timestamp:
- Apr 22, 2010, 2:00:03 PM (15 years ago)
- 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:
- 299554
- Parents:
- 6613ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r6613ec ra67d19 57 57 } else { 58 58 BoundaryPoints = BoundaryPtr; 59 Log() << Verbose(0) << "Using given boundary points set." << endl;59 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 60 60 } 61 61 // determine biggest "diameter" of cluster for each axis … … 163 163 AngleReferenceNormalVector.x[(axis + 2) % NDIM] = 1.; 164 164 165 Log() << Verbose(1) << "Axisvector is " << AxisVector << " and AngleReferenceVector is " << AngleReferenceVector << ", and AngleReferenceNormalVector is " << AngleReferenceNormalVector << "." << endl;165 DoLog(1) && (Log() << Verbose(1) << "Axisvector is " << AxisVector << " and AngleReferenceVector is " << AngleReferenceVector << ", and AngleReferenceNormalVector is " << AngleReferenceNormalVector << "." << endl); 166 166 167 167 // 3b. construct set of all points, transformed into cylindrical system and with left and right neighbours … … 184 184 angle = 2. * M_PI - angle; 185 185 } 186 Log() << Verbose(1) << "Inserting " << *Walker << ": (r, alpha) = (" << radius << "," << angle << "): " << ProjectedVector << endl;186 DoLog(1) && (Log() << Verbose(1) << "Inserting " << *Walker << ": (r, alpha) = (" << radius << "," << angle << "): " << ProjectedVector << endl); 187 187 BoundaryTestPair = BoundaryPoints[axis].insert(BoundariesPair(angle, DistancePair (radius, Walker))); 188 188 if (!BoundaryTestPair.second) { // same point exists, check first r, then distance of original vectors to center of gravity 189 Log() << Verbose(2) << "Encountered two vectors whose projection onto axis " << axis << " is equal: " << endl;190 Log() << Verbose(2) << "Present vector: " << *BoundaryTestPair.first->second.second << endl;191 Log() << Verbose(2) << "New vector: " << *Walker << endl;189 DoLog(2) && (Log() << Verbose(2) << "Encountered two vectors whose projection onto axis " << axis << " is equal: " << endl); 190 DoLog(2) && (Log() << Verbose(2) << "Present vector: " << *BoundaryTestPair.first->second.second << endl); 191 DoLog(2) && (Log() << Verbose(2) << "New vector: " << *Walker << endl); 192 192 const double ProjectedVectorNorm = ProjectedVector.NormSquared(); 193 193 if ((ProjectedVectorNorm - BoundaryTestPair.first->second.first) > MYEPSILON) { 194 194 BoundaryTestPair.first->second.first = ProjectedVectorNorm; 195 195 BoundaryTestPair.first->second.second = Walker; 196 Log() << Verbose(2) << "Keeping new vector due to larger projected distance " << ProjectedVectorNorm << "." << endl;196 DoLog(2) && (Log() << Verbose(2) << "Keeping new vector due to larger projected distance " << ProjectedVectorNorm << "." << endl); 197 197 } else if (fabs(ProjectedVectorNorm - BoundaryTestPair.first->second.first) < MYEPSILON) { 198 198 helper.CopyVector(&Walker->x); … … 203 203 if (helper.NormSquared() < oldhelperNorm) { 204 204 BoundaryTestPair.first->second.second = Walker; 205 Log() << Verbose(2) << "Keeping new vector due to larger distance to molecule center " << helper.NormSquared() << "." << endl;205 DoLog(2) && (Log() << Verbose(2) << "Keeping new vector due to larger distance to molecule center " << helper.NormSquared() << "." << endl); 206 206 } else { 207 Log() << Verbose(2) << "Keeping present vector due to larger distance to molecule center " << oldhelperNorm << "." << endl;207 DoLog(2) && (Log() << Verbose(2) << "Keeping present vector due to larger distance to molecule center " << oldhelperNorm << "." << endl); 208 208 } 209 209 } else { 210 Log() << Verbose(2) << "Keeping present vector due to larger projected distance " << ProjectedVectorNorm << "." << endl;210 DoLog(2) && (Log() << Verbose(2) << "Keeping present vector due to larger projected distance " << ProjectedVectorNorm << "." << endl); 211 211 } 212 212 } … … 227 227 // 3c. throw out points whose distance is less than the mean of left and right neighbours 228 228 bool flag = false; 229 Log() << Verbose(1) << "Looking for candidates to kick out by convex condition ... " << endl;229 DoLog(1) && (Log() << Verbose(1) << "Looking for candidates to kick out by convex condition ... " << endl); 230 230 do { // do as long as we still throw one out per round 231 231 flag = false; … … 282 282 const double MinDistance = a * sin(beta) / (sin(delta)) * (((alpha < M_PI / 2.) || (gamma < M_PI / 2.)) ? 1. : -1.); 283 283 //Log() << Verbose(1) << " I calculated: a = " << a << ", h = " << h << ", beta(" << left->second.second->Name << "," << left->second.second->Name << "-" << right->second.second->Name << ") = " << beta << ", delta(" << left->second.second->Name << "," << runner->second.second->Name << ") = " << delta << ", Min = " << MinDistance << "." << endl; 284 Log() << Verbose(1) << "Checking CoG distance of runner " << *runner->second.second << " " << h << " against triangle's side length spanned by (" << *left->second.second << "," << *right->second.second << ") of " << MinDistance << "." << endl;284 DoLog(1) && (Log() << Verbose(1) << "Checking CoG distance of runner " << *runner->second.second << " " << h << " against triangle's side length spanned by (" << *left->second.second << "," << *right->second.second << ") of " << MinDistance << "." << endl); 285 285 if ((fabs(h / fabs(h) - MinDistance / fabs(MinDistance)) < MYEPSILON) && ((h - MinDistance)) < -MYEPSILON) { 286 286 // throw out point 287 Log() << Verbose(1) << "Throwing out " << *runner->second.second << "." << endl;287 DoLog(1) && (Log() << Verbose(1) << "Throwing out " << *runner->second.second << "." << endl); 288 288 BoundaryPoints[axis].erase(runner); 289 289 flag = true; … … 320 320 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 321 321 } else { 322 Log() << Verbose(0) << "Using given boundary points set." << endl;322 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 323 323 } 324 324 … … 326 326 for (int axis=0; axis < NDIM; axis++) 327 327 { 328 Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl;328 DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl); 329 329 int i=0; 330 330 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 331 331 if (runner != BoundaryPoints[axis].begin()) 332 Log() << Verbose(0) << ", " << i << ": " << *runner->second.second;332 DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second); 333 333 else 334 Log() << Verbose(0) << i << ": " << *runner->second.second;334 DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second); 335 335 i++; 336 336 } 337 Log() << Verbose(0) << endl;337 DoLog(0) && (Log() << Verbose(0) << endl); 338 338 } 339 339 … … 344 344 DoeLog(2) && (eLog()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present!" << endl); 345 345 346 Log() << Verbose(0) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl;346 DoLog(0) && (Log() << Verbose(0) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl); 347 347 // now we have the whole set of edge points in the BoundaryList 348 348 … … 364 364 DoeLog(1) && (eLog()<< Verbose(1) << "Insertion of straddling points failed!" << endl); 365 365 366 Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " intermediate triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl;366 DoLog(0) && (Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " intermediate triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl); 367 367 368 368 // 4. Store triangles in tecplot file … … 395 395 for (LineMap::iterator LineRunner = TesselStruct->LinesOnBoundary.begin(); LineRunner != TesselStruct->LinesOnBoundary.end(); LineRunner++) { 396 396 line = LineRunner->second; 397 Log() << Verbose(1) << "INFO: Current line is " << *line << "." << endl;397 DoLog(1) && (Log() << Verbose(1) << "INFO: Current line is " << *line << "." << endl); 398 398 if (!line->CheckConvexityCriterion()) { 399 Log() << Verbose(1) << "... line " << *line << " is concave, flipping it." << endl;399 DoLog(1) && (Log() << Verbose(1) << "... line " << *line << " is concave, flipping it." << endl); 400 400 401 401 // flip the line … … 404 404 else { 405 405 TesselStruct->FlipBaseline(line); 406 Log() << Verbose(1) << "INFO: Correction of concave baselines worked." << endl;406 DoLog(1) && (Log() << Verbose(1) << "INFO: Correction of concave baselines worked." << endl); 407 407 } 408 408 } … … 414 414 // Log() << Verbose(1) << "Correction of concave tesselpoints failed!" << endl; 415 415 416 Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl;416 DoLog(0) && (Log() << Verbose(0) << "I created " << TesselStruct->TrianglesOnBoundary.size() << " triangles with " << TesselStruct->LinesOnBoundary.size() << " lines and " << TesselStruct->PointsOnBoundary.size() << " points." << endl); 417 417 418 418 // 4. Store triangles in tecplot file … … 462 462 PointMap::iterator PointRunner; 463 463 while (!TesselStruct->PointsOnBoundary.empty()) { 464 Log() << Verbose(1) << "Remaining points are: ";464 DoLog(1) && (Log() << Verbose(1) << "Remaining points are: "); 465 465 for (PointMap::iterator PointSprinter = TesselStruct->PointsOnBoundary.begin(); PointSprinter != TesselStruct->PointsOnBoundary.end(); PointSprinter++) 466 Log() << Verbose(0) << *(PointSprinter->second) << "\t";467 Log() << Verbose(0) << endl;466 DoLog(0) && (Log() << Verbose(0) << *(PointSprinter->second) << "\t"); 467 DoLog(0) && (Log() << Verbose(0) << endl); 468 468 469 469 PointRunner = TesselStruct->PointsOnBoundary.begin(); … … 537 537 PointAdvance++; 538 538 point = PointRunner->second; 539 Log() << Verbose(1) << "INFO: Current point is " << *point << "." << endl;539 DoLog(1) && (Log() << Verbose(1) << "INFO: Current point is " << *point << "." << endl); 540 540 for (LineMap::iterator LineRunner = point->lines.begin(); LineRunner != point->lines.end(); LineRunner++) { 541 541 line = LineRunner->second; 542 Log() << Verbose(1) << "INFO: Current line of point " << *point << " is " << *line << "." << endl;542 DoLog(1) && (Log() << Verbose(1) << "INFO: Current line of point " << *point << " is " << *line << "." << endl); 543 543 if (!line->CheckConvexityCriterion()) { 544 544 // remove the point if needed 545 Log() << Verbose(1) << "... point " << *point << " cannot be on convex envelope." << endl;545 DoLog(1) && (Log() << Verbose(1) << "... point " << *point << " cannot be on convex envelope." << endl); 546 546 volume += TesselStruct->RemovePointFromTesselatedSurface(point); 547 547 sprintf(dummy, "-first-%d", ++run); … … 564 564 LineAdvance++; 565 565 line = LineRunner->second; 566 Log() << Verbose(1) << "INFO: Picking farthest baseline for line is " << *line << "." << endl;566 DoLog(1) && (Log() << Verbose(1) << "INFO: Picking farthest baseline for line is " << *line << "." << endl); 567 567 // take highest of both lines 568 568 if (TesselStruct->IsConvexRectangle(line) == NULL) { … … 605 605 606 606 // end 607 Log() << Verbose(0) << "Volume is " << volume << "." << endl;607 DoLog(0) && (Log() << Verbose(0) << "Volume is " << volume << "." << endl); 608 608 return volume; 609 609 }; … … 734 734 totalmass += Walker->type->mass; 735 735 } 736 Log() << Verbose(0) << "RESULT: The summed mass is " << setprecision(10) << totalmass << " atomicmassunit." << endl;737 Log() << Verbose(0) << "RESULT: The average density is " << setprecision(10) << totalmass / clustervolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;736 DoLog(0) && (Log() << Verbose(0) << "RESULT: The summed mass is " << setprecision(10) << totalmass << " atomicmassunit." << endl); 737 DoLog(0) && (Log() << Verbose(0) << "RESULT: The average density is " << setprecision(10) << totalmass / clustervolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl); 738 738 739 739 // solve cubic polynomial 740 Log() << Verbose(1) << "Solving equidistant suspension in water problem ..." << endl;740 DoLog(1) && (Log() << Verbose(1) << "Solving equidistant suspension in water problem ..." << endl); 741 741 if (IsAngstroem) 742 742 cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_A - (totalmass / clustervolume)) / (celldensity - 1); 743 743 else 744 744 cellvolume = (TotalNoClusters * totalmass / SOLVENTDENSITY_a0 - (totalmass / clustervolume)) / (celldensity - 1); 745 Log() << Verbose(1) << "Cellvolume needed for a density of " << celldensity << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;745 DoLog(1) && (Log() << Verbose(1) << "Cellvolume needed for a density of " << celldensity << " g/cm^3 is " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl); 746 746 747 747 double minimumvolume = TotalNoClusters * (GreatestDiameter[0] * GreatestDiameter[1] * GreatestDiameter[2]); 748 Log() << Verbose(1) << "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;748 DoLog(1) && (Log() << Verbose(1) << "Minimum volume of the convex envelope contained in a rectangular box is " << minimumvolume << " atomicmassunit/" << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl); 749 749 if (minimumvolume > cellvolume) { 750 750 DoeLog(1) && (eLog()<< Verbose(1) << "the containing box already has a greater volume than the envisaged cell volume!" << endl); 751 Log() << Verbose(0) << "Setting Box dimensions to minimum possible, the greatest diameters." << endl;751 DoLog(0) && (Log() << Verbose(0) << "Setting Box dimensions to minimum possible, the greatest diameters." << endl); 752 752 for (int i = 0; i < NDIM; i++) 753 753 BoxLengths.x[i] = GreatestDiameter[i]; … … 761 761 double x2 = 0.; 762 762 if (gsl_poly_solve_cubic(BoxLengths.x[0], BoxLengths.x[1], BoxLengths.x[2], &x0, &x1, &x2) == 1) // either 1 or 3 on return 763 Log() << Verbose(0) << "RESULT: The resulting spacing is: " << x0 << " ." << endl;763 DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting spacing is: " << x0 << " ." << endl); 764 764 else { 765 Log() << Verbose(0) << "RESULT: The resulting spacings are: " << x0 << " and " << x1 << " and " << x2 << " ." << endl;765 DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting spacings are: " << x0 << " and " << x1 << " and " << x2 << " ." << endl); 766 766 x0 = x2; // sorted in ascending order 767 767 } … … 774 774 775 775 // set new box dimensions 776 Log() << Verbose(0) << "Translating to box with these boundaries." << endl;776 DoLog(0) && (Log() << Verbose(0) << "Translating to box with these boundaries." << endl); 777 777 mol->SetBoxDimension(&BoxLengths); 778 778 mol->CenterInBox(); … … 780 780 // update Box of atoms by boundary 781 781 mol->SetBoxDimension(&BoxLengths); 782 Log() << Verbose(0) << "RESULT: The resulting cell dimensions are: " << BoxLengths.x[0] << " and " << BoxLengths.x[1] << " and " << BoxLengths.x[2] << " with total volume of " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl;782 DoLog(0) && (Log() << Verbose(0) << "RESULT: The resulting cell dimensions are: " << BoxLengths.x[0] << " and " << BoxLengths.x[1] << " and " << BoxLengths.x[2] << " with total volume of " << cellvolume << " " << (IsAngstroem ? "angstrom" : "atomiclength") << "^3." << endl); 783 783 }; 784 784 … … 822 822 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) 823 823 if ((*ListRunner)->AtomCount > 0) { 824 Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl;824 DoLog(1) && (Log() << Verbose(1) << "Pre-creating linked cell lists for molecule " << *ListRunner << "." << endl); 825 825 LCList[(*ListRunner)] = new LinkedCell((*ListRunner), 10.); // get linked cell list 826 Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl;826 DoLog(1) && (Log() << Verbose(1) << "Pre-creating tesselation for molecule " << *ListRunner << "." << endl); 827 827 TesselStruct[(*ListRunner)] = NULL; 828 828 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL); … … 832 832 filler->CenterEdge(&Inserter); 833 833 filler->Center.Zero(); 834 Log() << Verbose(2) << "INFO: Filler molecule has the following bonds:" << endl;834 DoLog(2) && (Log() << Verbose(2) << "INFO: Filler molecule has the following bonds:" << endl); 835 835 Binder = filler->first; 836 836 while(Binder->next != filler->last) { 837 837 Binder = Binder->next; 838 Log() << Verbose(2) << " " << *Binder << endl;838 DoLog(2) && (Log() << Verbose(2) << " " << *Binder << endl); 839 839 } 840 840 … … 847 847 for(int i=0;i<NDIM;i++) 848 848 N[i] = (int) ceil(1./FillerDistance.x[i]); 849 Log() << Verbose(1) << "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << "." << endl;849 DoLog(1) && (Log() << Verbose(1) << "INFO: Grid steps are " << N[0] << ", " << N[1] << ", " << N[2] << "." << endl); 850 850 851 851 // initialize seed of random number generator to current time … … 862 862 for (int i=0;i<NDIM;i++) 863 863 FillerTranslations.x[i] = RandomMolDisplacement*(rand()/(RAND_MAX/2.) - 1.); 864 Log() << Verbose(2) << "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << "." << endl;864 DoLog(2) && (Log() << Verbose(2) << "INFO: Current Position is " << CurrentPosition << "+" << FillerTranslations << "." << endl); 865 865 866 866 // go through all atoms … … 917 917 // insert into Filling 918 918 if (FillIt) { 919 Log() << Verbose(1) << "INFO: Position at " << Inserter << " is outer point." << endl;919 DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is outer point." << endl); 920 920 // copy atom ... 921 921 CopyAtoms[Walker->nr] = new atom(Walker); 922 922 CopyAtoms[Walker->nr]->x.CopyVector(&Inserter); 923 923 Filling->AddAtom(CopyAtoms[Walker->nr]); 924 Log() << Verbose(4) << "Filling atom " << *Walker << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[Walker->nr]->x) << "." << endl;924 DoLog(4) && (Log() << Verbose(4) << "Filling atom " << *Walker << ", translated to " << AtomTranslations << ", at final position is " << (CopyAtoms[Walker->nr]->x) << "." << endl); 925 925 } else { 926 Log() << Verbose(1) << "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance." << endl;926 DoLog(1) && (Log() << Verbose(1) << "INFO: Position at " << Inserter << " is inner point, within boundary or outside of MaxDistance." << endl); 927 927 CopyAtoms[Walker->nr] = NULL; 928 928 continue; … … 965 965 966 966 if (TesselStruct == NULL) { 967 Log() << Verbose(1) << "Allocating Tesselation struct ..." << endl;967 DoLog(1) && (Log() << Verbose(1) << "Allocating Tesselation struct ..." << endl); 968 968 TesselStruct= new Tesselation; 969 969 } else { 970 970 delete(TesselStruct); 971 Log() << Verbose(1) << "Re-Allocating Tesselation struct ..." << endl;971 DoLog(1) && (Log() << Verbose(1) << "Re-Allocating Tesselation struct ..." << endl); 972 972 TesselStruct = new Tesselation; 973 973 } … … 990 990 while ((!TesselStruct->OpenLines.empty()) && (OneLoopWithoutSuccessFlag)) { 991 991 // 2a. print OpenLines 992 Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl;992 DoLog(1) && (Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for candidates:" << endl); 993 993 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) 994 Log() << Verbose(1) << " " << *(Runner->second) << endl;994 DoLog(1) && (Log() << Verbose(1) << " " << *(Runner->second) << endl); 995 995 996 996 // 2b. find best candidate for each OpenLine … … 998 998 999 999 // 2c. print OpenLines with candidates again 1000 Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl;1000 DoLog(1) && (Log() << Verbose(1) << "There are " << TesselStruct->OpenLines.size() << " open lines to scan for the best candidates:" << endl); 1001 1001 for (CandidateMap::iterator Runner = TesselStruct->OpenLines.begin(); Runner != TesselStruct->OpenLines.end(); Runner++) 1002 Log() << Verbose(1) << " " << *(Runner->second) << endl;1002 DoLog(1) && (Log() << Verbose(1) << " " << *(Runner->second) << endl); 1003 1003 1004 1004 // 2d. search for smallest ShortestAngle among all candidates … … 1008 1008 baseline = Runner->second; 1009 1009 ShortestAngle = baseline->ShortestAngle; 1010 Log() << Verbose(1) << "New best candidate is " << *baseline->BaseLine << " with point " << *(*baseline->pointlist.begin()) << " and angle " << baseline->ShortestAngle << endl;1010 DoLog(1) && (Log() << Verbose(1) << "New best candidate is " << *baseline->BaseLine << " with point " << *(*baseline->pointlist.begin()) << " and angle " << baseline->ShortestAngle << endl); 1011 1011 } 1012 1012 }
Note:
See TracChangeset
for help on using the changeset viewer.