Changeset 735b1c for src/tesselation.cpp
- Timestamp:
- Mar 1, 2011, 10:16:39 AM (14 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:
- 5309ba
- Parents:
- a479fa
- git-author:
- Frederik Heber <heber@…> (02/22/11 00:15:33)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.cpp
ra479fa r735b1c 536 536 PointTestPair InsertUnique; 537 537 BPS[n] = new class BoundaryPointSet(Walker); 538 InsertUnique = PointsOnBoundary.insert(PointPair(Walker-> ParticleInfo_nr, BPS[n]));538 InsertUnique = PointsOnBoundary.insert(PointPair(Walker->getNr(), BPS[n])); 539 539 if (InsertUnique.second) { // if new point was not present before, increase counter 540 540 PointsOnBoundaryCount++; … … 558 558 PointTestPair InsertUnique; 559 559 TPS[n] = new class BoundaryPointSet(Candidate); 560 InsertUnique = PointsOnBoundary.insert(PointPair(Candidate-> ParticleInfo_nr, TPS[n]));560 InsertUnique = PointsOnBoundary.insert(PointPair(Candidate->getNr(), TPS[n])); 561 561 if (InsertUnique.second) { // if new point was not present before, increase counter 562 562 PointsOnBoundaryCount++; … … 577 577 { 578 578 Info FunctionInfo(__func__); 579 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate-> ParticleInfo_nr);579 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidate->getNr()); 580 580 if (FindPoint != PointsOnBoundary.end()) 581 581 TPS[n] = FindPoint->second; … … 597 597 { 598 598 bool insertNewLine = true; 599 LineMap::iterator FindLine = a->lines.find(b->node-> ParticleInfo_nr);599 LineMap::iterator FindLine = a->lines.find(b->node->getNr()); 600 600 BoundaryLineSet *WinningLine = NULL; 601 601 if (FindLine != a->lines.end()) { … … 603 603 604 604 pair<LineMap::iterator, LineMap::iterator> FindPair; 605 FindPair = a->lines.equal_range(b->node-> ParticleInfo_nr);605 FindPair = a->lines.equal_range(b->node->getNr()); 606 606 607 607 for (FindLine = FindPair.first; (FindLine != FindPair.second) && (insertNewLine); FindLine++) { … … 709 709 /** Function adds triangle to global list. 710 710 * Furthermore, the triangle number is set to \a ParticleInfo_nr. 711 * \param ParticleInfo_nrtriangle number711 * \param getNr() triangle number 712 712 */ 713 713 void Tesselation::AddTesselationTriangle(const int nr) … … 902 902 // builds a triangle point set (Points) of the end points 903 903 for (int i = 0; i < 3; i++) { 904 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidates[i]-> ParticleInfo_nr);904 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Candidates[i]->getNr()); 905 905 if (FindPoint != PointsOnBoundary.end()) { 906 906 Points[i] = FindPoint->second; … … 915 915 for (int j = i; j < 3; j++) { 916 916 if (Points[j] != NULL) { 917 LineMap::const_iterator FindLine = Points[i]->lines.find(Points[j]->node-> ParticleInfo_nr);918 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node-> ParticleInfo_nr); FindLine++) {917 LineMap::const_iterator FindLine = Points[i]->lines.find(Points[j]->node->getNr()); 918 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) { 919 919 TriangleMap *triangles = &FindLine->second->triangles; 920 920 DoLog(1) && (Log() << Verbose(1) << "Current line is " << FindLine->first << ": " << *(FindLine->second) << " with triangles " << triangles << "." << endl); … … 955 955 // builds a triangle point set (Points) of the end points 956 956 for (int i = 0; i < 3; i++) { 957 PointMap::iterator FindPoint = PointsOnBoundary.find(Candidates[i]-> ParticleInfo_nr);957 PointMap::iterator FindPoint = PointsOnBoundary.find(Candidates[i]->getNr()); 958 958 if (FindPoint != PointsOnBoundary.end()) { 959 959 Points[i] = FindPoint->second; … … 968 968 for (int j = i; j < 3; j++) { 969 969 if (Points[j] != NULL) { 970 LineMap::iterator FindLine = Points[i]->lines.find(Points[j]->node-> ParticleInfo_nr);971 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node-> ParticleInfo_nr); FindLine++) {970 LineMap::iterator FindLine = Points[i]->lines.find(Points[j]->node->getNr()); 971 for (; (FindLine != Points[i]->lines.end()) && (FindLine->first == Points[j]->node->getNr()); FindLine++) { 972 972 TriangleMap *triangles = &FindLine->second->triangles; 973 973 for (TriangleMap::iterator FindTriangle = triangles->begin(); FindTriangle != triangles->end(); FindTriangle++) { … … 1145 1145 // 1146 1146 // // check both other lines 1147 // PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode-> ParticleInfo_nr);1147 // PointMap::const_iterator FindPoint = PointsOnBoundary.find(ThirdNode->getNr()); 1148 1148 // if (FindPoint != PointsOnBoundary.end()) { 1149 1149 // for (int i=0;i<2;i++) { 1150 // LineMap::const_iterator FindLine = (FindPoint->second)->lines.find(BaseRay->endpoints[0]->node-> ParticleInfo_nr);1150 // LineMap::const_iterator FindLine = (FindPoint->second)->lines.find(BaseRay->endpoints[0]->node->getNr()); 1151 1151 // if (FindLine != (FindPoint->second)->lines.end()) { 1152 1152 // Line = FindLine->second; … … 1440 1440 Info FunctionInfo(__func__); 1441 1441 1442 pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node-> ParticleInfo_nr);1442 pair<LineMap::iterator, LineMap::iterator> FindPair = TPS[0]->lines.equal_range(TPS[2]->node->getNr()); 1443 1443 for (LineMap::const_iterator FindLine = FindPair.first; FindLine != FindPair.second; FindLine++) { 1444 1444 DoLog(1) && (Log() << Verbose(1) << "INFO: Checking line " << *(FindLine->second) << " ..." << endl); … … 2223 2223 if (List != NULL) { 2224 2224 for (TesselPointSTLList::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) { 2225 FindPoint = PointsOnBoundary.find((*Runner)-> ParticleInfo_nr);2225 FindPoint = PointsOnBoundary.find((*Runner)->getNr()); 2226 2226 if (FindPoint != PointsOnBoundary.end()) { 2227 2227 points->insert(DistanceToPointPair(FindPoint->second->node->DistanceSquared(x), FindPoint->second)); … … 2557 2557 bool takePoint = false; 2558 2558 // find the respective boundary point 2559 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point-> ParticleInfo_nr);2559 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr()); 2560 2560 if (PointRunner != PointsOnBoundary.end()) { 2561 2561 ReferencePoint = PointRunner->second; … … 2577 2577 takePoint = false; 2578 2578 2579 if (findLines->second->endpoints[0]->Nr == Point-> ParticleInfo_nr) {2579 if (findLines->second->endpoints[0]->Nr == Point->getNr()) { 2580 2580 takePoint = true; 2581 2581 current = findLines->second->endpoints[1]->node; 2582 } else if (findLines->second->endpoints[1]->Nr == Point-> ParticleInfo_nr) {2582 } else if (findLines->second->endpoints[1]->Nr == Point->getNr()) { 2583 2583 takePoint = true; 2584 2584 current = findLines->second->endpoints[0]->node; … … 2813 2813 class BoundaryLineSet *StartLine = NULL; 2814 2814 // find the respective boundary point 2815 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point-> ParticleInfo_nr);2815 PointMap::const_iterator PointRunner = PointsOnBoundary.find(Point->getNr()); 2816 2816 if (PointRunner != PointsOnBoundary.end()) { 2817 2817 ReferencePoint = PointRunner->second; … … 3233 3233 TrianglePoints[i] = NULL; 3234 3234 } else { 3235 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]-> ParticleInfo_nr);3235 PointMap::const_iterator FindPoint = PointsOnBoundary.find(Points[i]->getNr()); 3236 3236 if (FindPoint != PointsOnBoundary.end()) { 3237 3237 TrianglePoints[i] = FindPoint->second; … … 3248 3248 for (int j = i + 1; j < 3; j++) { 3249 3249 if (TrianglePoints[j] != NULL) { 3250 for (FindLine = TrianglePoints[i]->lines.find(TrianglePoints[j]->node-> ParticleInfo_nr); // is a multimap!3251 (FindLine != TrianglePoints[i]->lines.end()) && (FindLine->first == TrianglePoints[j]->node-> ParticleInfo_nr); FindLine++) {3250 for (FindLine = TrianglePoints[i]->lines.find(TrianglePoints[j]->node->getNr()); // is a multimap! 3251 (FindLine != TrianglePoints[i]->lines.end()) && (FindLine->first == TrianglePoints[j]->node->getNr()); FindLine++) { 3252 3252 for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) { 3253 3253 if (FindTriangle->second->IsPresentTupel(TrianglePoints)) { … … 3269 3269 if (TrianglePoints[i] == NULL) 3270 3270 break; 3271 for (FindLine = TrianglePoints[(i + 1) % 3]->lines.find(TrianglePoints[(i + 2) % 3]->node-> ParticleInfo_nr); // is a multimap!3272 (FindLine != TrianglePoints[(i + 1) % 3]->lines.end()) && (FindLine->first == TrianglePoints[(i + 2) % 3]->node-> ParticleInfo_nr); FindLine++) {3271 for (FindLine = TrianglePoints[(i + 1) % 3]->lines.find(TrianglePoints[(i + 2) % 3]->node->getNr()); // is a multimap! 3272 (FindLine != TrianglePoints[(i + 1) % 3]->lines.end()) && (FindLine->first == TrianglePoints[(i + 2) % 3]->node->getNr()); FindLine++) { 3273 3273 for (FindTriangle = FindLine->second->triangles.begin(); FindTriangle != FindLine->second->triangles.end(); FindTriangle++) { 3274 3274 if (FindTriangle->second->IsPresentTupel(TrianglePoints)) { … … 3531 3531 if (NearestPoint == point) 3532 3532 NearestPoint = BackupPoint; 3533 PointRunner = PointsOnBoundary.find(NearestPoint-> ParticleInfo_nr);3533 PointRunner = PointsOnBoundary.find(NearestPoint->getNr()); 3534 3534 if (PointRunner != PointsOnBoundary.end()) { 3535 3535 NearestBoundaryPoint = PointRunner->second;
Note:
See TracChangeset
for help on using the changeset viewer.