Changeset bdc91e for src/boundary.cpp
- Timestamp:
- Jul 1, 2010, 2:33:13 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:
- edb454
- Parents:
- 8e0c63
- git-author:
- Frederik Heber <heber@…> (07/01/10 14:26:41)
- git-committer:
- Frederik Heber <heber@…> (07/01/10 14:33:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r8e0c63 rbdc91e 296 296 * \param *out output stream for debugging 297 297 * \param *mol molecule structure with Atom's and Bond's. 298 * \param *BoundaryPts set of boundary points to use or NULL 298 299 * \param *TesselStruct Tesselation filled with points, lines and triangles on boundary on return 299 300 * \param *LCList atoms in LinkedCell list … … 301 302 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 302 303 */ 303 void FindConvexBorder(const molecule* mol, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename)304 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename) 304 305 { 305 306 Info FunctionInfo(__func__); … … 312 313 313 314 // 1. Find all points on the boundary 314 if (BoundaryP oints == NULL) {315 316 315 if (BoundaryPts == NULL) { 316 BoundaryFreeFlag = true; 317 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 317 318 } else { 318 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 319 BoundaryPoints = BoundaryPts; 320 DoLog(0) && (Log() << Verbose(0) << "Using given boundary points set." << endl); 319 321 } 320 322 321 323 // printing all inserted for debugging 322 for (int axis=0; axis < NDIM; axis++) 323 { 324 DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl); 325 int i=0; 326 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 327 if (runner != BoundaryPoints[axis].begin()) 328 DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second); 329 else 330 DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second); 331 i++; 332 } 333 DoLog(0) && (Log() << Verbose(0) << endl); 334 } 324 for (int axis=0; axis < NDIM; axis++) { 325 DoLog(1) && (Log() << Verbose(1) << "Printing list of candidates for axis " << axis << " which we have inserted so far." << endl); 326 int i=0; 327 for(Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) { 328 if (runner != BoundaryPoints[axis].begin()) 329 DoLog(0) && (Log() << Verbose(0) << ", " << i << ": " << *runner->second.second); 330 else 331 DoLog(0) && (Log() << Verbose(0) << i << ": " << *runner->second.second); 332 i++; 333 } 334 DoLog(0) && (Log() << Verbose(0) << endl); 335 } 335 336 336 337 // 2. fill the boundary point list … … 338 339 for (Boundaries::iterator runner = BoundaryPoints[axis].begin(); runner != BoundaryPoints[axis].end(); runner++) 339 340 if (!TesselStruct->AddBoundaryPoint(runner->second.second, 0)) 340 Do eLog(2) && (eLog()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present!" << endl);341 DoLog(2) && (Log()<< Verbose(2) << "Point " << *(runner->second.second) << " is already present." << endl); 341 342 342 343 DoLog(0) && (Log() << Verbose(0) << "I found " << TesselStruct->PointsOnBoundaryCount << " points on the convex boundary." << endl); … … 672 673 673 674 IsAngstroem = configuration->GetIsAngstroem(); 675 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct); 674 676 GreatestDiameter = GetDiametersOfCluster(BoundaryPoints, mol, TesselStruct, IsAngstroem); 675 BoundaryPoints = GetBoundaryPoints(mol, TesselStruct);676 677 LinkedCell *LCList = new LinkedCell(mol, 10.); 677 FindConvexBorder(mol, TesselStruct, (const LinkedCell *&)LCList, NULL);678 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell *&)LCList, NULL); 678 679 delete (LCList); 680 delete[] BoundaryPoints; 679 681 680 682 … … 684 686 else 685 687 clustervolume = ClusterVolume; 688 689 delete TesselStruct; 686 690 687 691 for (int i = 0; i < NDIM; i++) … … 736 740 mol->CenterInBox(); 737 741 } 742 delete GreatestDiameter; 738 743 // update Box of atoms by boundary 739 744 mol->SetBoxDimension(&BoxLengths); … … 892 897 } 893 898 } 899 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) { 900 delete LCList[*ListRunner]; 901 delete TesselStruct[(*ListRunner)]; 902 } 894 903 delete[](M); 895 904 delete[](MInverse);
Note:
See TracChangeset
for help on using the changeset viewer.