Changeset accebe
- Timestamp:
- Jun 2, 2010, 2:30:31 PM (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:
- 116f37
- Parents:
- 7fd416
- git-author:
- Frederik Heber <heber@…> (06/02/10 14:25:12)
- git-committer:
- Frederik Heber <heber@…> (06/02/10 14:30:31)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r7fd416 raccebe 224 224 do { // do as long as we still throw one out per round 225 225 flag = false; 226 Boundaries::iterator left = BoundaryPoints[axis].end(); 227 Boundaries::iterator right = BoundaryPoints[axis].end(); 228 for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 226 Boundaries::iterator left = BoundaryPoints[axis].begin(); 227 Boundaries::iterator right = BoundaryPoints[axis].begin(); 228 Boundaries::iterator runner = BoundaryPoints[axis].begin(); 229 bool LoopOnceDone = false; 230 while (!LoopOnceDone) { 231 runner = right; 232 right++; 229 233 // set neighbours correctly 230 234 if (runner == BoundaryPoints[axis].begin()) { … … 234 238 } 235 239 left--; 236 right = runner;237 right++;238 240 if (right == BoundaryPoints[axis].end()) { 239 241 right = BoundaryPoints[axis].begin(); 242 LoopOnceDone = true; 240 243 } 241 244 // check distance … … 277 280 DoLog(1) && (Log() << Verbose(1) << "Throwing out " << *runner->second.second << "." << endl); 278 281 BoundaryPoints[axis].erase(runner); 282 runner = right; 279 283 flag = true; 280 284 } … … 376 380 TesselStruct->FlipBaseline(line); 377 381 DoLog(1) && (Log() << Verbose(1) << "INFO: Correction of concave baselines worked." << endl); 382 LineRunner = TesselStruct->LinesOnBoundary.begin(); // LineRunner may have been erase if line was deleted from LinesOnBoundary 378 383 } 379 384 } … … 639 644 /** Creates multiples of the by \a *mol given cluster and suspends them in water with a given final density. 640 645 * We get cluster volume by VolumeOfConvexEnvelope() and its diameters by GetDiametersOfCluster() 646 * TODO: Here, we need a VolumeOfGeneralEnvelope (i.e. non-convex one) 641 647 * \param *out output stream for debugging 642 648 * \param *configuration needed for path to store convex envelope file … … 666 672 GreatestDiameter = GetDiametersOfCluster(BoundaryPoints, mol, TesselStruct, IsAngstroem); 667 673 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 668 LinkedCell LCList(mol, 10.); 669 FindConvexBorder(mol, TesselStruct, &LCList, NULL); 674 LinkedCell *LCList = new LinkedCell(mol, 10.); 675 FindConvexBorder(mol, TesselStruct, (const LinkedCell *&)LCList, NULL); 676 delete (LCList); 677 670 678 671 679 // some preparations beforehand -
src/tesselation.cpp
r7fd416 raccebe 1922 1922 RemoveTesselationLine(triangle->lines[i]); 1923 1923 } else { 1924 DoLog(0) && (Log() << Verbose(0) << *triangle->lines[i] << " is still attached to another triangle: " );1924 DoLog(0) && (Log() << Verbose(0) << *triangle->lines[i] << " is still attached to another triangle: " << endl); 1925 1925 OpenLines.insert(pair<BoundaryLineSet *, CandidateForTesselation *> (triangle->lines[i], NULL)); 1926 1926 for (TriangleMap::iterator TriangleRunner = triangle->lines[i]->triangles.begin(); TriangleRunner != triangle->lines[i]->triangles.end(); TriangleRunner++) 1927 DoLog(0) && (Log() << Verbose(0) << " [" << (TriangleRunner->second)->Nr << "|" << *((TriangleRunner->second)->endpoints[0]) << ", " << *((TriangleRunner->second)->endpoints[1]) << ", " << *((TriangleRunner->second)->endpoints[2]) << "] \t");1927 DoLog(0) && (Log() << Verbose(0) << "\t[" << (TriangleRunner->second)->Nr << "|" << *((TriangleRunner->second)->endpoints[0]) << ", " << *((TriangleRunner->second)->endpoints[1]) << ", " << *((TriangleRunner->second)->endpoints[2]) << "] \t"); 1928 1928 DoLog(0) && (Log() << Verbose(0) << endl); 1929 1929 // for (int j=0;j<2;j++) { … … 2979 2979 OldBaseLineNr = Base->Nr; 2980 2980 m = 0; 2981 for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); runner++) { 2982 DoLog(0) && (Log() << Verbose(0) << "INFO: Deleting triangle " << *(runner->second) << "." << endl); 2983 OldTriangleNrs[m++] = runner->second->Nr; 2984 RemoveTesselationTriangle(runner->second); 2981 // first obtain all triangle to delete ... (otherwise we pull the carpet (Base) from under the for-loop's feet) 2982 list <BoundaryTriangleSet *> TrianglesOfBase; 2983 for (TriangleMap::iterator runner = Base->triangles.begin(); runner != Base->triangles.end(); ++runner) 2984 TrianglesOfBase.push_back(runner->second); 2985 // .. then delete each triangle (which deletes the line as well) 2986 for (list <BoundaryTriangleSet *>::iterator runner = TrianglesOfBase.begin(); !TrianglesOfBase.empty(); runner = TrianglesOfBase.begin()) { 2987 DoLog(0) && (Log() << Verbose(0) << "INFO: Deleting triangle " << *(*runner) << "." << endl); 2988 OldTriangleNrs[m++] = (*runner)->Nr; 2989 RemoveTesselationTriangle((*runner)); 2990 TrianglesOfBase.erase(runner); 2985 2991 } 2986 2992
Note:
See TracChangeset
for help on using the changeset viewer.