Changeset eeae5b for molecuilder/src
- Timestamp:
- Jul 7, 2009, 8:11:47 AM (16 years ago)
- Children:
- 54de04
- Parents:
- d2639f
- Location:
- molecuilder/src
- Files:
-
- 2 edited
-
boundary.cpp (modified) (2 diffs)
-
builder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
rd2639f reeae5b 2379 2379 if (radius < RADIUS*RADIUS) { 2380 2380 helper.Scale(sqrt(RADIUS*RADIUS - radius)); 2381 cout << Verbose( 3) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm()<< "." << endl;2381 cout << Verbose(2) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm() << " with sphere radius " << RADIUS << "." << endl; 2382 2382 NewSphereCenter.AddVector(&helper); 2383 2383 NewSphereCenter.SubtractVector(&CircleCenter); … … 2390 2390 cout << Verbose(2) << "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << "." << endl; 2391 2391 2392 alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection);2392 alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection); 2393 2393 Otheralpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, OtherNewSphereCenter, OldSphereCenter, NormalVector, SearchDirection); 2394 2394 alpha = min(alpha, Otheralpha); 2395 // if there is a better candidate, drop the current list and add the new candidate2396 // otherwise ignore the new candidate and keep the list2397 if (*ShortestAngle > (alpha - HULLEPSILON)) {2398 optCandidate = new CandidateForTesselation(Candidate, BaseLine, OptCandidateCenter, OtherOptCandidateCenter);2399 if (fabs(alpha - Otheralpha) > MYEPSILON) {2400 optCandidate->OptCenter.CopyVector(&NewSphereCenter);2401 optCandidate->OtherOptCenter.CopyVector(&OtherNewSphereCenter);2402 } else {2403 optCandidate->OptCenter.CopyVector(&OtherNewSphereCenter);2404 optCandidate->OtherOptCenter.CopyVector(&NewSphereCenter);2405 }2406 // if there is an equal candidate, add it to the list without clearing the list2407 if ((*ShortestAngle - HULLEPSILON) < alpha) {2408 candidates->push_back(optCandidate);2409 cout << Verbose(1) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with "2410 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl;2411 } else {2412 candidates->clear();2413 candidates->push_back(optCandidate);2414 cout << Verbose(1) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with "2415 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl;2416 }2417 *ShortestAngle = alpha;2418 cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl;2419 } else {2420 if ((optCandidate != NULL) && (optCandidate->point != NULL))2421 cout << Verbose(1) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl;2422 else2423 cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl;2424 }2395 // if there is a better candidate, drop the current list and add the new candidate 2396 // otherwise ignore the new candidate and keep the list 2397 if (*ShortestAngle > (alpha - HULLEPSILON)) { 2398 optCandidate = new CandidateForTesselation(Candidate, BaseLine, OptCandidateCenter, OtherOptCandidateCenter); 2399 if (fabs(alpha - Otheralpha) > MYEPSILON) { 2400 optCandidate->OptCenter.CopyVector(&NewSphereCenter); 2401 optCandidate->OtherOptCenter.CopyVector(&OtherNewSphereCenter); 2402 } else { 2403 optCandidate->OptCenter.CopyVector(&OtherNewSphereCenter); 2404 optCandidate->OtherOptCenter.CopyVector(&NewSphereCenter); 2405 } 2406 // if there is an equal candidate, add it to the list without clearing the list 2407 if ((*ShortestAngle - HULLEPSILON) < alpha) { 2408 candidates->push_back(optCandidate); 2409 cout << Verbose(1) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with " 2410 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2411 } else { 2412 candidates->clear(); 2413 candidates->push_back(optCandidate); 2414 cout << Verbose(1) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with " 2415 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2416 } 2417 *ShortestAngle = alpha; 2418 cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl; 2419 } else { 2420 if ((optCandidate != NULL) && (optCandidate->point != NULL)) 2421 cout << Verbose(1) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl; 2422 else 2423 cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; 2424 } 2425 2425 2426 2426 } else { -
molecuilder/src/builder.cpp
rd2639f reeae5b 1493 1493 LinkedCell LCList(mol, atof(argv[argptr])); // \NOTE not twice the radius?? 1494 1494 Find_non_convex_border((ofstream *)&cout, mol, &T, &LCList, argv[argptr+1], atof(argv[argptr])); 1495 FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str());1495 //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str()); 1496 1496 argptr+=2; 1497 1497 }
Note:
See TracChangeset
for help on using the changeset viewer.
