Changeset 1953f9 for src/tesselation.cpp
- Timestamp:
- Aug 7, 2009, 9:12:19 AM (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:
- f3278b
- Parents:
- 9f97c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.cpp
r9f97c5 r1953f9 1101 1101 ; 1102 1102 1103 1104 1105 1103 /** Checks whether the triangle consisting of the three points is already present. 1106 1104 * Searches for the points in Tesselation::PointsOnBoundary and checks their … … 1327 1325 cout << Verbose(0) << "Begin of Find_next_suitable_triangle\n"; 1328 1326 bool result = true; 1327 bool degenerateTriangle = false; 1329 1328 CandidateList *Opt_Candidates = new CandidateList(); 1330 1329 … … 1423 1422 AddTrianglePoint(BaseRay->endpoints[1]->node, 2); 1424 1423 1425 AddTriangleLine(TPS[0], TPS[1], 0); 1426 AddTriangleLine(TPS[0], TPS[2], 1); 1427 AddTriangleLine(TPS[1], TPS[2], 2); 1428 1429 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1430 AddTriangle(); 1431 (*it)->OptCenter.Scale(-1.); 1432 BTS->GetNormalVector((*it)->OptCenter); 1433 (*it)->OptCenter.Scale(-1.); 1434 1435 cout << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector 1436 << " for this triangle ... " << endl; 1424 if (CheckLineCriteriaforDegeneratedTriangle(TPS)) { 1425 AddTriangleLine(TPS[0], TPS[1], 0); 1426 AddTriangleLine(TPS[0], TPS[2], 1); 1427 AddTriangleLine(TPS[1], TPS[2], 2); 1428 1429 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1430 AddTriangle(); 1431 (*it)->OptCenter.Scale(-1.); 1432 BTS->GetNormalVector((*it)->OptCenter); 1433 (*it)->OptCenter.Scale(-1.); 1434 1435 cout << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector 1436 << " for this triangle ... " << endl; 1437 1437 //cout << Verbose(1) << "We have "<< TrianglesOnBoundaryCount << " for line " << *BaseRay << "." << endl; 1438 } else { 1439 cout << Verbose(1) << "WARNING: This triangle consisting of "; 1440 cout << *(*it)->point << ", "; 1441 cout << *BaseRay->endpoints[0]->node << " and "; 1442 cout << *BaseRay->endpoints[1]->node << " "; 1443 cout << "exists and is not added, as it does not seem helpful!" << endl; 1444 result = false; 1445 } 1438 1446 } else if (existentTrianglesCount == 1) { // If there is a planar region within the structure, we need this triangle a second time. 1439 1447 AddTrianglePoint((*it)->point, 0); … … 1449 1457 1450 1458 BTS = new class BoundaryTriangleSet(BLS, TrianglesOnBoundaryCount); 1451 AddTriangle(); 1459 AddTriangle(); // add to global map 1452 1460 1453 1461 (*it)->OtherOptCenter.Scale(-1.); … … 1802 1810 1803 1811 // check for three unique points 1804 //cout << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate-> x<< "." << endl;1812 //cout << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate->node << "." << endl; 1805 1813 if ((Candidate != BaseLine->endpoints[0]->node) && (Candidate != BaseLine->endpoints[1]->node) ){ 1806 1814 … … 1863 1871 } else { 1864 1872 if ((optCandidate != NULL) && (optCandidate->point != NULL)) { 1865 //cout << Verbose(2) << "REJECT: Old candidate : " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl;1873 //cout << Verbose(2) << "REJECT: Old candidate " << *(optCandidate->point) << " with " << *ShortestAngle << " is better than new one " << *Candidate << " with " << alpha << " ." << endl; 1866 1874 } else { 1867 1875 //cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; … … 1870 1878 1871 1879 } else { 1872 //cout << Verbose(2) << "REJECT: NewSphereCenter " << NewSphereCenter << " is too far away: " << radius << "." << endl;1880 //cout << Verbose(2) << "REJECT: NewSphereCenter " << NewSphereCenter << " for " << *Candidate << " is too far away: " << radius << "." << endl; 1873 1881 } 1874 1882 } else {
Note:
See TracChangeset
for help on using the changeset viewer.