Changeset ce7bfd for src/Tesselation/BoundaryPolygonSet.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/BoundaryPolygonSet.cpp
r2a3124 rce7bfd 44 44 Nr(-1) 45 45 { 46 Info FunctionInfo(__func__);46 //Info FunctionInfo(__func__); 47 47 } 48 48 ; … … 54 54 BoundaryPolygonSet::~BoundaryPolygonSet() 55 55 { 56 Info FunctionInfo(__func__);56 //Info FunctionInfo(__func__); 57 57 endpoints.clear(); 58 LOG( 1, "Erasing polygon Nr." << Nr << " itself.");58 LOG(5, "DEBUG: Erasing polygon Nr." << Nr << " itself."); 59 59 } 60 60 ; … … 67 67 Vector * BoundaryPolygonSet::GetNormalVector(const Vector &OtherVector) const 68 68 { 69 Info FunctionInfo(__func__);69 //Info FunctionInfo(__func__); 70 70 // get normal vector 71 71 Vector TemporaryNormal; … … 97 97 if (TotalNormal->ScalarProduct(OtherVector) > 0.) 98 98 TotalNormal->Scale(-1.); 99 LOG( 1, "Normal Vector is " << *TotalNormal << ".");99 LOG(4, "DEBUG: Normal Vector is " << *TotalNormal << "."); 100 100 101 101 return TotalNormal; … … 109 109 void BoundaryPolygonSet::GetCenter(Vector * const center) const 110 110 { 111 Info FunctionInfo(__func__);111 //Info FunctionInfo(__func__); 112 112 center->Zero(); 113 113 int counter = 0; … … 117 117 } 118 118 center->Scale(1. / (double) counter); 119 LOG( 1, "Centeris at " << *center << ".");119 LOG(4, "DEBUG: Center of BoundaryPolygonSet is at " << *center << "."); 120 120 } 121 121 … … 126 126 bool BoundaryPolygonSet::ContainsBoundaryTriangle(const BoundaryTriangleSet * const triangle) const 127 127 { 128 Info FunctionInfo(__func__);128 //Info FunctionInfo(__func__); 129 129 return ContainsPresentTupel(triangle->endpoints, 3); 130 130 } … … 137 137 bool BoundaryPolygonSet::ContainsBoundaryLine(const BoundaryLineSet * const line) const 138 138 { 139 Info FunctionInfo(__func__);139 //Info FunctionInfo(__func__); 140 140 return ContainsPresentTupel(line->endpoints, 2); 141 141 } … … 148 148 bool BoundaryPolygonSet::ContainsBoundaryPoint(const BoundaryPointSet * const point) const 149 149 { 150 Info FunctionInfo(__func__);150 //Info FunctionInfo(__func__); 151 151 for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++) { 152 LOG(0, "Checking against " << **Runner);153 152 if (point == (*Runner)) { 154 LOG( 0, "Contained.");153 LOG(4, "DEBUG: Checking against " << **Runner << ": Contained."); 155 154 return true; 156 155 } 157 156 } 158 LOG(0, " Not contained.");159 157 return false; 160 158 } … … 167 165 bool BoundaryPolygonSet::ContainsBoundaryPoint(const TesselPoint * const point) const 168 166 { 169 Info FunctionInfo(__func__);167 //Info FunctionInfo(__func__); 170 168 for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++) 171 169 if (point == (*Runner)->node) { 172 LOG( 0, "Contained.");170 LOG(4, "DEBUG: Checking against " << **Runner << ": Contained."); 173 171 return true; 174 172 } 175 LOG(0, " Not contained.");176 173 return false; 177 174 } … … 185 182 bool BoundaryPolygonSet::ContainsPresentTupel(const BoundaryPointSet * const * Points, const int dim) const 186 183 { 187 Info FunctionInfo(__func__);184 //Info FunctionInfo(__func__); 188 185 int counter = 0; 189 LOG( 1, "Polygon is " << *this);186 LOG(5, "DEBUG Polygon is " << *this); 190 187 for (int i = 0; i < dim; i++) { 191 LOG( 1, "Testing endpoint " << *Points[i]);188 LOG(5, "DEBUG: Testing endpoint " << *Points[i]); 192 189 if (ContainsBoundaryPoint(Points[i])) { 193 190 counter++; … … 208 205 bool BoundaryPolygonSet::ContainsPresentTupel(const PointSet &endpoints) const 209 206 { 210 Info FunctionInfo(__func__);207 //Info FunctionInfo(__func__); 211 208 size_t counter = 0; 212 LOG( 1, "Polygon is " << *this);209 LOG(5, "DEBUG: Polygon is " << *this); 213 210 for (PointSet::const_iterator Runner = endpoints.begin(); Runner != endpoints.end(); Runner++) { 214 LOG( 1, "Testing endpoint " << **Runner);211 LOG(5, "DEBUG: Testing endpoint " << **Runner); 215 212 if (ContainsBoundaryPoint(*Runner)) 216 213 counter++; … … 239 236 TriangleSet * BoundaryPolygonSet::GetAllContainedTrianglesFromEndpoints() const 240 237 { 241 Info FunctionInfo(__func__);238 //Info FunctionInfo(__func__); 242 239 pair<TriangleSet::iterator, bool> Tester; 243 240 TriangleSet *triangles = new TriangleSet; … … 250 247 Tester = triangles->insert(Sprinter->second); 251 248 if (Tester.second) 252 LOG( 0, "Adding triangle " << *(Sprinter->second));249 LOG(4, "DEBUG: Adding triangle " << *(Sprinter->second)); 253 250 } 254 251 } 255 252 256 LOG( 1, "The Polygon of " << endpoints.size() << " endpoints has " << triangles->size() << " unique triangles in total.");253 LOG(3, "DEBUG: The Polygon of " << endpoints.size() << " endpoints has " << triangles->size() << " unique triangles in total."); 257 254 return triangles; 258 255 } … … 265 262 bool BoundaryPolygonSet::FillPolygonFromTrianglesOfLine(const BoundaryLineSet * const line) 266 263 { 267 Info FunctionInfo(__func__);264 //Info FunctionInfo(__func__); 268 265 pair<PointSet::iterator, bool> Tester; 269 266 if (line == NULL) 270 267 return false; 271 LOG( 1, "Filling polygon from line " << *line);268 LOG(3, "DEBUG: Filling polygon from line " << *line); 272 269 for (TriangleMap::const_iterator Runner = line->triangles.begin(); Runner != line->triangles.end(); Runner++) { 273 270 for (int i = 0; i < 3; i++) { 274 271 Tester = endpoints.insert((Runner->second)->endpoints[i]); 275 272 if (Tester.second) 276 LOG( 1, "Inserting endpoint " << *((Runner->second)->endpoints[i]));273 LOG(4, "DEBUG: Inserting endpoint " << *((Runner->second)->endpoints[i])); 277 274 } 278 275 }
Note:
See TracChangeset
for help on using the changeset viewer.