Changeset ce7bfd for src/Tesselation/BoundaryLineSet.cpp
- Timestamp:
- Apr 4, 2012, 11:30:11 AM (13 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:
- 03a589
- Parents:
- 2a3124
- git-author:
- Frederik Heber <heber@…> (03/13/12 19:35:15)
- git-committer:
- Frederik Heber <heber@…> (04/04/12 11:30:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tesselation/BoundaryLineSet.cpp
r2a3124 rce7bfd 42 42 Nr(-1) 43 43 { 44 Info FunctionInfo(__func__);44 //Info FunctionInfo(__func__); 45 45 for (int i = 0; i < 2; i++) 46 46 endpoints[i] = NULL; … … 55 55 BoundaryLineSet::BoundaryLineSet(BoundaryPointSet * const Point[2], const int number) 56 56 { 57 Info FunctionInfo(__func__);57 //Info FunctionInfo(__func__); 58 58 // set number 59 59 Nr = number; … … 66 66 skipped = false; 67 67 // clear triangles list 68 LOG( 0, "New Line with endpoints " << *this << ".");68 LOG(5, "DEBUG: New Line with endpoints " << *this << "."); 69 69 } 70 70 ; … … 80 80 skipped(false) 81 81 { 82 Info FunctionInfo(__func__);82 //Info FunctionInfo(__func__); 83 83 // set endpoints in ascending order 84 84 SetEndpointsOrdered(endpoints, Point1, Point2); … … 87 87 Point2->AddLine(this); // 88 88 // clear triangles list 89 LOG( 0, "New Line with endpoints " << *this << ".");89 LOG(5, "DEBUG: New Line with endpoints " << *this << "."); 90 90 } 91 91 ; … … 97 97 BoundaryLineSet::~BoundaryLineSet() 98 98 { 99 Info FunctionInfo(__func__);99 //Info FunctionInfo(__func__); 100 100 int Numbers[2]; 101 101 … … 144 144 void BoundaryLineSet::AddTriangle(BoundaryTriangleSet * const triangle) 145 145 { 146 Info FunctionInfo(__func__);147 LOG( 0, "Add " << triangle->Nr << " to line " << *this << ".");146 //Info FunctionInfo(__func__); 147 LOG(5, "DEBUG: Add " << triangle->Nr << " to line " << *this << "."); 148 148 triangles.insert(TrianglePair(triangle->Nr, triangle)); 149 149 } … … 156 156 bool BoundaryLineSet::IsConnectedTo(const BoundaryLineSet * const line) const 157 157 { 158 Info FunctionInfo(__func__);158 //Info FunctionInfo(__func__); 159 159 if ((endpoints[0] == line->endpoints[0]) || (endpoints[1] == line->endpoints[0]) || (endpoints[0] == line->endpoints[1]) || (endpoints[1] == line->endpoints[1])) 160 160 return true; … … 172 172 bool BoundaryLineSet::CheckConvexityCriterion() const 173 173 { 174 Info FunctionInfo(__func__);174 //Info FunctionInfo(__func__); 175 175 double angle = CalculateConvexity(); 176 176 if (angle > -MYEPSILON) { 177 LOG( 0, "ACCEPT: Angle is greater than pi: convex.");177 LOG(3, "ACCEPT: Angle is greater than pi: convex."); 178 178 return true; 179 179 } else { 180 LOG( 0, "REJECT: Angle is less than pi: concave.");180 LOG(3, "REJECT: Angle is less than pi: concave."); 181 181 return false; 182 182 } … … 190 190 double BoundaryLineSet::CalculateConvexity() const 191 191 { 192 Info FunctionInfo(__func__);192 //Info FunctionInfo(__func__); 193 193 Vector BaseLineCenter, BaseLineNormal, BaseLine, helper[2], NormalCheck; 194 194 // get the two triangles … … 234 234 //LOG(0, "INFO: BaselineNormal is " << BaseLineNormal << "."); 235 235 if (NormalCheck.NormSquared() < MYEPSILON) { 236 LOG( 0, "ACCEPT: Normalvectors of both triangles are the same: convex.");236 LOG(3, "ACCEPT: Normalvectors of both triangles are the same: convex."); 237 237 return true; 238 238 } … … 248 248 bool BoundaryLineSet::ContainsBoundaryPoint(const BoundaryPointSet * const point) const 249 249 { 250 Info FunctionInfo(__func__);250 //Info FunctionInfo(__func__); 251 251 for (int i = 0; i < 2; i++) 252 252 if (point == endpoints[i]) … … 262 262 class BoundaryPointSet *BoundaryLineSet::GetOtherEndpoint(const BoundaryPointSet * const point) const 263 263 { 264 Info FunctionInfo(__func__);264 //Info FunctionInfo(__func__); 265 265 if (endpoints[0] == point) 266 266 return endpoints[1]; … … 278 278 class BoundaryTriangleSet *BoundaryLineSet::GetOtherTriangle(const BoundaryTriangleSet * const triangle) const 279 279 { 280 Info FunctionInfo(__func__);280 //Info FunctionInfo(__func__); 281 281 if (triangles.size() == 2) { 282 282 for (TriangleMap::const_iterator TriangleRunner = triangles.begin(); TriangleRunner != triangles.end(); ++TriangleRunner)
Note:
See TracChangeset
for help on using the changeset viewer.