Changeset 1024cb for src/tesselation.cpp
- Timestamp:
- May 31, 2010, 5:32:27 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, Candidate_v1.7.0, 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:
- e08c46
- Parents:
- 42af9e (diff), a7b761b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - git-author:
- Frederik Heber <heber@…> (05/31/10 17:29:30)
- git-committer:
- Frederik Heber <heber@…> (05/31/10 17:32:27)
- File:
-
- 1 edited
-
src/tesselation.cpp (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.cpp
r42af9e r1024cb 21 21 #include "Plane.hpp" 22 22 #include "Exceptions/LinearDependenceException.hpp" 23 #include "Helpers/Assert.hpp" 24 25 #include "Helpers/Assert.hpp" 23 26 24 27 class molecule; … … 357 360 // get ascending order of endpoints 358 361 PointMap OrderMap; 359 for (int i = 0; i < 3; i++) 362 for (int i = 0; i < 3; i++) { 360 363 // for all three lines 361 364 for (int j = 0; j < 2; j++) { // for both endpoints … … 363 366 // and we don't care whether insertion fails 364 367 } 368 } 365 369 // set endpoints 366 370 int Counter = 0; … … 371 375 Counter++; 372 376 } 373 if (Counter < 3) { 374 DoeLog(0) && (eLog() << Verbose(0) << "We have a triangle with only two distinct endpoints!" << endl); 375 performCriticalExit(); 376 } 377 } 378 ; 377 ASSERT(Counter >= 3,"We have a triangle with only two distinct endpoints!"); 378 }; 379 379 380 380 381 /** Destructor of BoundaryTriangleSet. … … 682 683 } 683 684 685 /** 686 * gets the Plane defined by the three triangle Basepoints 687 */ 688 Plane BoundaryTriangleSet::getPlane() const{ 689 ASSERT(endpoints[0] && endpoints[1] && endpoints[2], "Triangle not fully defined"); 690 691 return Plane(*endpoints[0]->node->node, 692 *endpoints[1]->node->node, 693 *endpoints[2]->node->node); 694 } 695 696 Vector BoundaryTriangleSet::getEndpoint(int i) const{ 697 ASSERT(i>=0 && i<3,"Index of Endpoint out of Range"); 698 699 return *endpoints[i]->node->node; 700 } 701 702 string BoundaryTriangleSet::getEndpointName(int i) const{ 703 ASSERT(i>=0 && i<3,"Index of Endpoint out of Range"); 704 705 return endpoints[i]->node->getName(); 706 } 707 684 708 /** output operator for BoundaryTriangleSet. 685 709 * \param &ost output stream … … 688 712 ostream &operator <<(ostream &ost, const BoundaryTriangleSet &a) 689 713 { 690 ost << "[" << a.Nr << "|" << a. endpoints[0]->node->getName() << "," << a.endpoints[1]->node->getName() << "," << a.endpoints[2]->node->getName() << "]";714 ost << "[" << a.Nr << "|" << a.getEndpointName(0) << "," << a.getEndpointName(1) << "," << a.getEndpointName(2) << "]"; 691 715 // ost << "[" << a.Nr << "|" << a.endpoints[0]->node->Name << " at " << *a.endpoints[0]->node->node << "," 692 716 // << a.endpoints[1]->node->Name << " at " << *a.endpoints[1]->node->node << "," << a.endpoints[2]->node->Name << " at " << *a.endpoints[2]->node->node << "]"; … … 1208 1232 ; 1209 1233 1210 /** PointCloud implementation of GetTerminalPoint.1211 * Uses PointsOnBoundary and STL stuff.1212 */1213 TesselPoint * Tesselation::GetTerminalPoint() const1214 {1215 Info FunctionInfo(__func__);1216 PointMap::const_iterator Runner = PointsOnBoundary.end();1217 Runner--;1218 return (Runner->second->node);1219 }1220 ;1221 1222 1234 /** PointCloud implementation of GoToNext. 1223 1235 * Uses PointsOnBoundary and STL stuff. … … 1231 1243 ; 1232 1244 1233 /** PointCloud implementation of GoToPrevious.1234 * Uses PointsOnBoundary and STL stuff.1235 */1236 void Tesselation::GoToPrevious() const1237 {1238 Info FunctionInfo(__func__);1239 if (InternalPointer != PointsOnBoundary.begin())1240 InternalPointer--;1241 }1242 ;1243 1244 1245 /** PointCloud implementation of GoToFirst. 1245 1246 * Uses PointsOnBoundary and STL stuff. … … 1249 1250 Info FunctionInfo(__func__); 1250 1251 InternalPointer = PointsOnBoundary.begin(); 1251 }1252 ;1253 1254 /** PointCloud implementation of GoToLast.1255 * Uses PointsOnBoundary and STL stuff.1256 */1257 void Tesselation::GoToLast() const1258 {1259 Info FunctionInfo(__func__);1260 InternalPointer = PointsOnBoundary.end();1261 InternalPointer--;1262 1252 } 1263 1253 ; … … 1455 1445 CenterVector.Zero(); 1456 1446 for (int i = 0; i < 3; i++) 1457 CenterVector += (*BTS->endpoints[i]->node->node);1447 CenterVector += BTS->getEndpoint(i); 1458 1448 CenterVector.Scale(1. / 3.); 1459 1449 DoLog(2) && (Log() << Verbose(2) << "CenterVector of base triangle is " << CenterVector << endl); … … 2569 2559 // fill the set of neighbours 2570 2560 TesselPointSet SetOfNeighbours; 2561 2571 2562 SetOfNeighbours.insert(CandidateLine.BaseLine->endpoints[1]->node); 2572 2563 for (TesselPointList::iterator Runner = CandidateLine.pointlist.begin(); Runner != CandidateLine.pointlist.end(); Runner++) … … 4802 4793 if (LastTriangle != NULL) { 4803 4794 stringstream sstr; 4804 sstr << "-"<< TrianglesOnBoundary.size() << "-" << LastTriangle-> endpoints[0]->node->getName() << "_" << LastTriangle->endpoints[1]->node->getName() << "_" << LastTriangle->endpoints[2]->node->getName();4795 sstr << "-"<< TrianglesOnBoundary.size() << "-" << LastTriangle->getEndpointName(0) << "_" << LastTriangle->getEndpointName(1) << "_" << LastTriangle->getEndpointName(2); 4805 4796 NumberName = sstr.str(); 4806 4797 if (DoTecplotOutput) {
Note:
See TracChangeset
for help on using the changeset viewer.
