Changeset 8cede7 for src/boundary.cpp
- Timestamp:
- Jul 9, 2009, 12:02:46 PM (16 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:
- a37350
- Parents:
- b65901
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
rb65901 r8cede7 1481 1481 } else { 1482 1482 delete TPS[n]; 1483 cout << Verbose( 2) << "Atom " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary." << endl;1483 cout << Verbose(3) << "Atom " << *((InsertUnique.first)->second->node) << " is already present in PointsOnBoundary." << endl; 1484 1484 TPS[n] = (InsertUnique.first)->second; 1485 1485 } … … 1506 1506 if (FindLine->second->TrianglesCount < 2) { 1507 1507 insertNewLine = false; 1508 cout << Verbose( 2) << "Using existing line " << *FindLine->second << endl;1508 cout << Verbose(3) << "Using existing line " << *FindLine->second << endl; 1509 1509 1510 1510 BPS[0] = FindLine->second->endpoints[0]; … … 1533 1533 void Tesselation::AlwaysAddTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n) 1534 1534 { 1535 cout << Verbose( 2) << "Adding line between " << *(a->node) << " and " << *(b->node) << "." << endl;1535 cout << Verbose(3) << "Adding line between " << *(a->node) << " and " << *(b->node) << "." << endl; 1536 1536 BPS[0] = a; 1537 1537 BPS[1] = b; … … 1731 1731 beta = M_PI - SideC.Angle(&SideA); 1732 1732 gamma = M_PI - SideA.Angle(&SideB); 1733 cout << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl;1733 //cout << Verbose(3) << "INFO: alpha = " << alpha/M_PI*180. << ", beta = " << beta/M_PI*180. << ", gamma = " << gamma/M_PI*180. << "." << endl; 1734 1734 if (fabs(M_PI - alpha - beta - gamma) > HULLEPSILON) 1735 cerr << " Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl;1735 cerr << "GetCenterofCircumcircle: Sum of angles " << (alpha+beta+gamma)/M_PI*180. << " > 180 degrees by " << fabs(M_PI - alpha - beta - gamma)/M_PI*180. << "!" << endl; 1736 1736 1737 1737 Center->Zero(); … … 1780 1780 if (helper.ScalarProduct(&SearchDirection) < -HULLEPSILON) // acos is not unique on [0, 2.*M_PI), hence extra check to decide between two half intervals 1781 1781 alpha = 2.*M_PI - alpha; 1782 cout << Verbose(2) << "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << OldSphereCenter << " and resulting angle is " << alpha << "." << endl;1782 //cout << Verbose(2) << "INFO: RelativeNewSphereCenter is " << helper << ", RelativeOldSphereCenter is " << OldSphereCenter << " and resulting angle is " << alpha << "." << endl; 1783 1783 radius = helper.Distance(&OldSphereCenter); 1784 1784 helper.ProjectOntoPlane(&NormalVector); 1785 1785 // check whether new center is somewhat away or at least right over the current baseline to prevent intersecting triangles 1786 1786 if ((radius > HULLEPSILON) || (helper.Norm() < HULLEPSILON)) { 1787 cout << Verbose(2) << "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "." << endl;1787 //cout << Verbose(2) << "INFO: Distance between old and new center is " << radius << " and between new center and baseline center is " << helper.Norm() << "." << endl; 1788 1788 return alpha; 1789 1789 } else { 1790 cout << Verbose(1) << "INFO: NewSphereCenter " << helper << " is too close to OldSphereCenter" << OldSphereCenter << "." << endl;1790 //cout << Verbose(1) << "INFO: NewSphereCenter " << helper << " is too close to OldSphereCenter" << OldSphereCenter << "." << endl; 1791 1791 return 2.*M_PI; 1792 1792 } … … 1810 1810 class BoundaryPointSet *Points[3]; 1811 1811 1812 *out << Verbose(2) << "Begin of CheckPresenceOfTriangle" << endl;1812 //*out << Verbose(2) << "Begin of CheckPresenceOfTriangle" << endl; 1813 1813 // builds a triangle point set (Points) of the end points 1814 1814 for (int i = 0; i < 3; i++) { … … 1917 1917 cout << Verbose(1) << "Begin of Find_third_point_for_Tesselation" << endl; 1918 1918 1919 cout << Verbose(2) << "INFO: NormalVector of BaseTriangle is " << NormalVector << "." << endl;1919 //cout << Verbose(2) << "INFO: NormalVector of BaseTriangle is " << NormalVector << "." << endl; 1920 1920 1921 1921 // construct center of circle … … 1933 1933 CircleRadius = RADIUS*RADIUS - radius/4.; 1934 1934 CirclePlaneNormal.Normalize(); 1935 cout << Verbose(2) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl;1935 //cout << Verbose(2) << "INFO: CircleCenter is at " << CircleCenter << ", CirclePlaneNormal is " << CirclePlaneNormal << " with circle radius " << sqrt(CircleRadius) << "." << endl; 1936 1936 1937 1937 // test whether old center is on the band's plane … … 1944 1944 1945 1945 // check SearchDirection 1946 cout << Verbose(2) << "INFO: SearchDirection is " << SearchDirection << "." << endl;1946 //cout << Verbose(2) << "INFO: SearchDirection is " << SearchDirection << "." << endl; 1947 1947 if (fabs(OldSphereCenter.ScalarProduct(&SearchDirection)) > HULLEPSILON) { // rotated the wrong way! 1948 1948 cerr << "ERROR: SearchDirection and RelativeOldSphereCenter are not orthogonal!" << endl; … … 1951 1951 // get cell for the starting atom 1952 1952 if (LC->SetIndexToVector(&CircleCenter)) { 1953 1954 1955 cout << Verbose(2) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl;1953 for(int i=0;i<NDIM;i++) // store indices of this cell 1954 N[i] = LC->n[i]; 1955 //cout << Verbose(2) << "INFO: Center cell is " << N[0] << ", " << N[1] << ", " << N[2] << " with No. " << LC->index << "." << endl; 1956 1956 } else { 1957 1957 cerr << "ERROR: Vector " << CircleCenter << " is outside of LinkedCell's bounding box." << endl; … … 1959 1959 } 1960 1960 // then go through the current and all neighbouring cells and check the contained atoms for possible candidates 1961 cout << Verbose(2) << "LC Intervals:";1961 //cout << Verbose(2) << "LC Intervals:"; 1962 1962 for (int i=0;i<NDIM;i++) { 1963 1963 Nlower[i] = ((N[i]-1) >= 0) ? N[i]-1 : 0; 1964 1964 Nupper[i] = ((N[i]+1) < LC->N[i]) ? N[i]+1 : LC->N[i]-1; 1965 cout << " [" << Nlower[i] << "," << Nupper[i] << "] ";1965 //cout << " [" << Nlower[i] << "," << Nupper[i] << "] "; 1966 1966 } 1967 cout << endl;1967 //cout << endl; 1968 1968 for (LC->n[0] = Nlower[0]; LC->n[0] <= Nupper[0]; LC->n[0]++) 1969 1969 for (LC->n[1] = Nlower[1]; LC->n[1] <= Nupper[1]; LC->n[1]++) … … 1976 1976 1977 1977 // check for three unique points 1978 cout << Verbose(1) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate->x << "." << endl;1978 //cout << Verbose(2) << "INFO: Current Candidate is " << *Candidate << " at " << Candidate->x << "." << endl; 1979 1979 if ((Candidate != BaseLine->endpoints[0]->node) && (Candidate != BaseLine->endpoints[1]->node) ){ 1980 1980 … … 1987 1987 ) { 1988 1988 helper.CopyVector(&NewNormalVector); 1989 cout << Verbose(2) << "INFO: NewNormalVector is " << NewNormalVector << "." << endl;1989 //cout << Verbose(2) << "INFO: NewNormalVector is " << NewNormalVector << "." << endl; 1990 1990 radius = BaseLine->endpoints[0]->node->x.DistanceSquared(&NewSphereCenter); 1991 1991 if (radius < RADIUS*RADIUS) { 1992 1992 helper.Scale(sqrt(RADIUS*RADIUS - radius)); 1993 cout << Verbose(2) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm() << " with sphere radius " << RADIUS << "." << endl;1993 //cout << Verbose(2) << "INFO: Distance of NewCircleCenter to NewSphereCenter is " << helper.Norm() << " with sphere radius " << RADIUS << "." << endl; 1994 1994 NewSphereCenter.AddVector(&helper); 1995 1995 NewSphereCenter.SubtractVector(&CircleCenter); 1996 cout << Verbose(2) << "INFO: NewSphereCenter is at " << NewSphereCenter << "." << endl;1996 //cout << Verbose(2) << "INFO: NewSphereCenter is at " << NewSphereCenter << "." << endl; 1997 1997 1998 1998 // OtherNewSphereCenter is created by the same vector just in the other direction … … 2000 2000 OtherNewSphereCenter.AddVector(&helper); 2001 2001 OtherNewSphereCenter.SubtractVector(&CircleCenter); 2002 cout << Verbose(2) << "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << "." << endl;2002 //cout << Verbose(2) << "INFO: OtherNewSphereCenter is at " << OtherNewSphereCenter << "." << endl; 2003 2003 2004 2004 alpha = GetPathLengthonCircumCircle(CircleCenter, CirclePlaneNormal, CircleRadius, NewSphereCenter, OldSphereCenter, NormalVector, SearchDirection); … … 2019 2019 if ((*ShortestAngle - HULLEPSILON) < alpha) { 2020 2020 candidates->push_back(optCandidate); 2021 cout << Verbose( 1) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with "2021 cout << Verbose(2) << "ACCEPT: We have found an equally good candidate: " << *(optCandidate->point) << " with " 2022 2022 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2023 2023 } else { … … 2030 2030 candidates->clear(); 2031 2031 candidates->push_back(optCandidate); 2032 cout << Verbose( 1) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with "2032 cout << Verbose(2) << "ACCEPT: We have found a better candidate: " << *(optCandidate->point) << " with " 2033 2033 << alpha << " and circumsphere's center at " << optCandidate->OptCenter << "." << endl; 2034 2034 } 2035 2035 *ShortestAngle = alpha; 2036 cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl;2036 //cout << Verbose(2) << "INFO: There are " << candidates->size() << " candidates in the list now." << endl; 2037 2037 } else { 2038 if ((optCandidate != NULL) && (optCandidate->point != NULL)) 2039 cout << Verbose(1) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl; 2040 else 2041 cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; 2038 if ((optCandidate != NULL) && (optCandidate->point != NULL)) { 2039 //cout << Verbose(2) << "REJECT: Old candidate: " << *(optCandidate->point) << " is better than " << alpha << " with " << *ShortestAngle << "." << endl; 2040 } else { 2041 //cout << Verbose(2) << "REJECT: Candidate " << *Candidate << " with " << alpha << " was rejected." << endl; 2042 } 2042 2043 } 2043 2044 2044 2045 } else { 2045 cout << Verbose(1) << "REJECT: NewSphereCenter " << NewSphereCenter << " is too far away: " << radius << "." << endl;2046 //cout << Verbose(2) << "REJECT: NewSphereCenter " << NewSphereCenter << " is too far away: " << radius << "." << endl; 2046 2047 } 2047 2048 } else { 2048 cout << Verbose(1) << "REJECT: Three points from " << *BaseLine << " and Candidate " << *Candidate << " are linear-dependent." << endl;2049 //cout << Verbose(2) << "REJECT: Three points from " << *BaseLine << " and Candidate " << *Candidate << " are linear-dependent." << endl; 2049 2050 } 2050 2051 } else { 2051 if (ThirdNode != NULL) 2052 cout << Verbose(1) << "REJECT: Base triangle " << *BaseLine << " and " << *ThirdNode << " contains Candidate " << *Candidate << "." << endl; 2053 else 2054 cout << Verbose(1) << "REJECT: Base triangle " << *BaseLine << " contains Candidate " << *Candidate << "." << endl; 2052 if (ThirdNode != NULL) { 2053 //cout << Verbose(2) << "REJECT: Base triangle " << *BaseLine << " and " << *ThirdNode << " contains Candidate " << *Candidate << "." << endl; 2054 } else { 2055 //cout << Verbose(2) << "REJECT: Base triangle " << *BaseLine << " contains Candidate " << *Candidate << "." << endl; 2056 } 2055 2057 } 2056 2058 } … … 2058 2060 } 2059 2061 } else { 2060 cerr << Verbose( 1) << "ERROR: The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << "." << endl;2062 cerr << Verbose(2) << "ERROR: The projected center of the old sphere has radius " << radius << " instead of " << CircleRadius << "." << endl; 2061 2063 } 2062 2064 } else { 2063 2065 if (ThirdNode != NULL) 2064 cout << Verbose( 1) << "Circumcircle for base line " << *BaseLine << " and third node " << *ThirdNode << " is too big!" << endl;2066 cout << Verbose(2) << "Circumcircle for base line " << *BaseLine << " and third node " << *ThirdNode << " is too big!" << endl; 2065 2067 else 2066 cout << Verbose( 1) << "Circumcircle for base line " << *BaseLine << " is too big!" << endl;2067 } 2068 2069 cout << Verbose(1) << "INFO: Sorting candidate list ..." << endl;2068 cout << Verbose(2) << "Circumcircle for base line " << *BaseLine << " is too big!" << endl; 2069 } 2070 2071 //cout << Verbose(2) << "INFO: Sorting candidate list ..." << endl; 2070 2072 if (candidates->size() > 1) { 2071 2073 candidates->unique(); … … 2263 2265 for (LC->n[2] = Nlower[2]; LC->n[2] <= Nupper[2]; LC->n[2]++) { 2264 2266 List = LC->GetCurrentCell(); 2265 cout << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl;2267 //cout << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << "." << endl; 2266 2268 if (List != NULL) { 2267 2269 for (LinkedAtoms::iterator Runner = List->begin(); Runner != List->end(); Runner++) { 2268 2270 Candidate = (*Runner); 2269 cout << Verbose(2) << "Current candidate is " << *Candidate << ": ";2270 2271 // check if we only have one unique point yet ... 2271 2272 if (a != Candidate) { … … 2296 2297 if (angle < Storage[0]) { 2297 2298 //cout << Verbose(1) << "Old values of Storage: %lf %lf \n", Storage[0], Storage[1]); 2298 cout << "Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".\n";2299 cout << Verbose(2) << "Current candidate is " << *Candidate << ": Is a better candidate with distance " << norm << " and angle " << angle << " to oben " << Oben << ".\n"; 2299 2300 Opt_Candidate = Candidate; 2300 2301 Storage[0] = angle; 2301 2302 //cout << Verbose(1) << "Changing something in Storage: %lf %lf. \n", Storage[0], Storage[2]); 2302 2303 } else { 2303 cout << "Looses with angle " << angle << " to a better candidate " << *Opt_Candidate << endl;2304 //cout << Verbose(2) << "Current candidate is " << *Candidate << ": Looses with angle " << angle << " to a better candidate " << *Opt_Candidate << endl; 2304 2305 } 2305 2306 } else { 2306 cout << "Refused due to Radius " << norm << endl;2307 //cout << Verbose(2) << "Current candidate is " << *Candidate << ": Refused due to Radius " << norm << endl; 2307 2308 } 2308 2309 } else { 2309 cout << " Candidate is equal to first endpoint" << *a << "." << endl;2310 //cout << Verbose(2) << "Current candidate is " << *Candidate << ": Candidate is equal to first endpoint." << *a << "." << endl; 2310 2311 } 2311 2312 } … … 2354 2355 if (List != NULL) { 2355 2356 for (LinkedAtoms::iterator Runner = List->begin();Runner != List->end();Runner++) { 2356 cout << Verbose(2) << "Current atom is " << *(*Runner) << "." << endl;2357 2357 if ((*Runner)->x.x[i] > max_coordinate[i]) { 2358 cout << Verbose(2) << "New maximal for axis " << i << " atom is " << *(*Runner) << " at " << (*Runner)->x << "." << endl; 2358 2359 max_coordinate[i] = (*Runner)->x.x[i]; 2359 2360 MaxAtom[i] = (*Runner); … … 2399 2400 // Now, oben and helper are two orthonormalized vectors in the plane defined by Chord (not normalized) 2400 2401 2401 cout << Verbose(2) << "Looking for third point candidates \n";2402 2402 // look in one direction of baseline for initial candidate 2403 2403 CandidateList *Opt_Candidates = new CandidateList(); … … 2409 2409 AddTriangleLine(TPS[0], TPS[1], 0); 2410 2410 2411 cout << Verbose(1) << "Looking for third point candidates ...\n"; 2412 cout << Verbose(2) << "INFO: OldSphereCenter is at " << helper << ".\n"; 2411 //cout << Verbose(2) << "INFO: OldSphereCenter is at " << helper << ".\n"; 2413 2412 Find_third_point_for_Tesselation( 2414 2413 Oben, SearchDirection, helper, BLS[0], NULL, *&Opt_Candidates, &ShortestAngle, RADIUS, LC 2415 2414 ); 2416 cout << Verbose(1) << " Third Points are";2415 cout << Verbose(1) << "List of third Points is "; 2417 2416 for (CandidateList::iterator it = Opt_Candidates->begin(); it != Opt_Candidates->end(); ++it) { 2418 2417 cout << " " << *(*it)->point; … … 2509 2508 const double& RADIUS, int N, const char *tempbasename, LinkedCell *LC) 2510 2509 { 2511 cout << Verbose( 1) << "Begin of Find_next_suitable_triangle\n";2510 cout << Verbose(0) << "Begin of Find_next_suitable_triangle\n"; 2512 2511 ofstream *tempstream = NULL; 2513 2512 char NumberName[255]; … … 2553 2552 OldSphereCenter.AddVector(&helper); 2554 2553 OldSphereCenter.SubtractVector(&CircleCenter); 2555 cout << Verbose(2) << "INFO: OldSphereCenter is at " << OldSphereCenter << "." << endl;2554 //cout << Verbose(2) << "INFO: OldSphereCenter is at " << OldSphereCenter << "." << endl; 2556 2555 2557 2556 // construct SearchDirection … … 2570 2569 2571 2570 // add third point 2572 cout << Verbose(1) << "Looking for third point candidates for triangle ... " << endl;2573 2571 Find_third_point_for_Tesselation( 2574 2572 T.NormalVector, SearchDirection, OldSphereCenter, &Line, ThirdNode, Opt_Candidates, … … 2622 2620 cout << "--> New triangle with " << *BTS << " and normal vector " << BTS->NormalVector 2623 2621 << " for this triangle ... " << endl; 2624 cout << Verbose(1) << "We have "<< TrianglesOnBoundaryCount << " for line " <<BaseRay << "." << endl;2622 //cout << Verbose(1) << "We have "<< TrianglesOnBoundaryCount << " for line " << *BaseRay << "." << endl; 2625 2623 } else if (existentTrianglesCount == 1) { // If there is a planar region within the structure, we need this triangle a second time. 2626 2624 AddTrianglePoint((*it)->point, 0); … … 2722 2720 } 2723 2721 delete(Opt_Candidates); 2724 cout << Verbose( 1) << "End of Find_next_suitable_triangle\n";2722 cout << Verbose(0) << "End of Find_next_suitable_triangle\n"; 2725 2723 return result; 2726 2724 }; … … 2808 2806 if (!failflag) 2809 2807 cerr << "WARNING: Find_next_suitable_triangle failed." << endl; 2810 2811 // we inserted new lines, hence show list with connected triangles2812 cout << Verbose(1) << "List of Baselines with connected triangles so far:" << endl;2813 for (testline = Tess->LinesOnBoundary.begin(); testline != Tess->LinesOnBoundary.end(); testline++) {2814 cout << Verbose(1) << *testline->second << "\t" << testline->second->TrianglesCount << endl;2815 }2816 2808 } else { 2817 cout << Verbose(1) << "Line " << *baseline->second << " has " << baseline->second->TrianglesCount << " triangles adjacent" << endl;2809 //cout << Verbose(1) << "Line " << *baseline->second << " has " << baseline->second->TrianglesCount << " triangles adjacent" << endl; 2818 2810 if (baseline->second->TrianglesCount != 2) 2819 2811 cout << Verbose(1) << "ERROR: TESSELATION FINISHED WITH INVALID TRIANGLE COUNT!" << endl; … … 2848 2840 cerr << "ERROR: Could definitively not find all necessary triangles!" << endl; 2849 2841 } 2842 2843 cout << Verbose(2) << "Check: List of Baselines with not two connected triangles:" << endl; 2844 int counter = 0; 2845 for (testline = Tess->LinesOnBoundary.begin(); testline != Tess->LinesOnBoundary.end(); testline++) { 2846 if (testline->second->TrianglesCount != 2) { 2847 cout << Verbose(2) << *testline->second << "\t" << testline->second->TrianglesCount << endl; 2848 counter++; 2849 } 2850 } 2851 if (counter == 0) 2852 cout << Verbose(2) << "None." << endl; 2853 2850 2854 if (freeTess) 2851 2855 delete(Tess);
Note:
See TracChangeset
for help on using the changeset viewer.