Changeset 438506 for molecuilder
- Timestamp:
- Jul 9, 2009, 11:40:14 AM (16 years ago)
- Children:
- 8bbe43
- Parents:
- ab7b5e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
rab7b5e7 r438506 249 249 CandidateForTesselation::~CandidateForTesselation() { 250 250 point = NULL; 251 BaseLine = NULL; 251 252 } 252 253 … … 1912 1913 int N[NDIM], Nlower[NDIM], Nupper[NDIM]; 1913 1914 atom *Candidate = NULL; 1914 CandidateForTesselation *optCandidate ;1915 CandidateForTesselation *optCandidate = NULL; 1915 1916 1916 1917 cout << Verbose(1) << "Begin of Find_third_point_for_Tesselation" << endl; … … 2021 2022 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2022 2023 } else { 2024 // remove all candidates from the list and then the list itself 2025 class CandidateForTesselation *remover = NULL; 2026 for (CandidateList::iterator it = candidates->begin(); it != candidates->end(); ++it) { 2027 remover = *it; 2028 delete(remover); 2029 } 2023 2030 candidates->clear(); 2024 2031 candidates->push_back(optCandidate); … … 2408 2415 ); 2409 2416 cout << Verbose(1) << "Third Points are "; 2410 CandidateList::iterator it; 2411 for (it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2417 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2412 2418 cout << " " << *(*it)->point; 2413 2419 } 2414 2420 cout << endl; 2415 2421 2416 for ( it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {2422 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2417 2423 // add third triangle point 2418 2424 AddTrianglePoint((*it)->point, 2); … … 2440 2446 } 2441 2447 } 2448 // remove all candidates from the list and then the list itself 2449 class CandidateForTesselation *remover = NULL; 2450 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2451 remover = *it; 2452 delete(remover); 2453 } 2454 delete(Opt_Candidates); 2442 2455 cout << Verbose(2) << "Projection is " << BTS->NormalVector.Projection(&Oben) << "." << endl; 2443 2456 cout << Verbose(1) << "End of Find_starting_triangle\n"; … … 2572 2585 } 2573 2586 cout << Verbose(1) << "Third Points are "; 2574 CandidateList::iterator it; 2575 for (it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2587 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2576 2588 cout << " " << *(*it)->point; 2577 2589 } … … 2579 2591 2580 2592 BoundaryLineSet *BaseRay = &Line; 2581 for ( it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) {2593 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2582 2594 cout << Verbose(1) << " Third point candidate is " << *(*it)->point 2583 2595 << " with circumsphere's center at " << (*it)->OptCenter << "." << endl; … … 2701 2713 // set baseline to new ray from ref point (here endpoints[0]->node) to current candidate (here (*it)->point)) 2702 2714 BaseRay = BLS[0]; 2703 // LineMap::iterator LineIterator = Line.endpoints[0]->lines.find((*it)->point->nr); 2704 // for (; LineIterator != Line.endpoints[0]->lines.end(); LineIterator++) { 2705 // if ((*LineIterator->second).TrianglesCount != 2) 2706 // break;2707 // } 2708 // if (LineIterator == Line.endpoints[0]->lines.end()) 2709 // cout << Verbose(1) << "ERROR: I could not find a suitable line with less than two triangles connected!" << endl;2710 } 2711 2715 } 2716 2717 // remove all candidates from the list and then the list itself 2718 class CandidateForTesselation *remover = NULL; 2719 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2720 remover = *it; 2721 delete(remover); 2722 } 2723 delete(Opt_Candidates); 2712 2724 cout << Verbose(1) << "End of Find_next_suitable_triangle\n"; 2713 2725 return result;
Note:
See TracChangeset
for help on using the changeset viewer.