Changeset 6bd7e0 for src/Tesselation/boundary.cpp
- Timestamp:
- Jan 2, 2012, 1:34:28 PM (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:
- d78531
- Parents:
- f55ae5
- git-author:
- Frederik Heber <heber@…> (12/19/11 16:46:11)
- git-committer:
- Frederik Heber <heber@…> (01/02/12 13:34:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tesselation/boundary.cpp
rf55ae5 r6bd7e0 322 322 * \param *BoundaryPts set of boundary points to use or NULL 323 323 * \param *TesselStruct Tesselation filled with points, lines and triangles on boundary on return 324 * \param *LCList atoms in LinkedCell list324 * \param *LCList atoms in LinkedCell_deprecated list 325 325 * \param *filename filename prefix for output of vertex data 326 326 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 327 327 */ 328 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename)328 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell_deprecated *LCList, const char *filename) 329 329 { 330 330 Info FunctionInfo(__func__); … … 711 711 GreatestDiameter = GetDiametersOfCluster(BoundaryPoints, mol, TesselStruct, IsAngstroem); 712 712 PointCloudAdaptor< molecule > cloud(mol, mol->name); 713 LinkedCell *LCList = new LinkedCell(cloud, 10.);714 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell *&)LCList, NULL);713 LinkedCell_deprecated *LCList = new LinkedCell_deprecated(cloud, 10.); 714 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell_deprecated *&)LCList, NULL); 715 715 delete (LCList); 716 716 delete[] BoundaryPoints; … … 815 815 double phi[NDIM]; 816 816 map<molecule *, Tesselation *> TesselStruct; 817 map<molecule *, LinkedCell *> LCList;817 map<molecule *, LinkedCell_deprecated *> LCList; 818 818 819 819 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) … … 821 821 LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << "."); 822 822 PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name); 823 LCList[(*ListRunner)] = new LinkedCell (cloud, 10.); // get linked cell list823 LCList[(*ListRunner)] = new LinkedCell_deprecated(cloud, 10.); // get linked cell list 824 824 LOG(1, "Pre-creating tesselation for molecule " << *ListRunner << "."); 825 825 TesselStruct[(*ListRunner)] = NULL; 826 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL);826 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell_deprecated *&)LCList[(*ListRunner)], 5., NULL); 827 827 } 828 828 … … 1017 1017 /** Checks whether there are no atoms inside a sphere around \a CurrentPosition 1018 1018 * except those atoms present in \a *filler. 1019 * If filler is NULL, then we just call LinkedCell ::GetPointsInsideSphere() and1019 * If filler is NULL, then we just call LinkedCell_deprecated::GetPointsInsideSphere() and 1020 1020 * check whether the return list is empty. 1021 1021 * @param *filler … … 1024 1024 */ 1025 1025 bool isSpaceAroundPointVoid( 1026 LinkedCell *LC,1026 LinkedCell_deprecated *LC, 1027 1027 molecule *filler, 1028 1028 const double boundary, … … 1111 1111 bool firstInsertion = true; 1112 1112 const Box &Domain = World::getInstance().getDomain(); 1113 map<molecule *, LinkedCell *> LCList;1113 map<molecule *, LinkedCell_deprecated *> LCList; 1114 1114 std::vector<molecule *> List = World::getInstance().getAllMolecules(); 1115 1115 MoleculeListClass *MolList = World::getInstance().getMolecules(); … … 1119 1119 LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << "."); 1120 1120 PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name); 1121 LCList[(*ListRunner)] = new LinkedCell (cloud, 10.); // get linked cell list1121 LCList[(*ListRunner)] = new LinkedCell_deprecated(cloud, 10.); // get linked cell list 1122 1122 } 1123 1123 … … 1169 1169 // Check whether there is anything too close by and whether atom is outside of domain 1170 1170 FillIt = true; 1171 for (std::map<molecule *, LinkedCell *>::iterator ListRunner = LCList.begin(); ListRunner != LCList.end(); ++ListRunner) {1171 for (std::map<molecule *, LinkedCell_deprecated *>::iterator ListRunner = LCList.begin(); ListRunner != LCList.end(); ++ListRunner) { 1172 1172 FillIt = FillIt && isSpaceAroundPointVoid( 1173 1173 ListRunner->second, … … 1234 1234 LOG(0, MolList->ListOfMolecules.size() << " molecules have been inserted."); 1235 1235 1236 for (std::map<molecule *, LinkedCell *>::iterator ListRunner = LCList.begin(); !LCList.empty(); ListRunner = LCList.begin()) {1236 for (std::map<molecule *, LinkedCell_deprecated *>::iterator ListRunner = LCList.begin(); !LCList.empty(); ListRunner = LCList.begin()) { 1237 1237 delete ListRunner->second; 1238 1238 LCList.erase(ListRunner); … … 1244 1244 * \param *mol molecule structure with Atom's and Bond's 1245 1245 * \param *&TesselStruct Tesselation filled with points, lines and triangles on boundary on return 1246 * \param *&LCList atoms in LinkedCell list1246 * \param *&LCList atoms in LinkedCell_deprecated list 1247 1247 * \param RADIUS radius of the virtual sphere 1248 1248 * \param *filename filename prefix for output of vertex data 1249 1249 * \return true - tesselation successful, false - tesselation failed 1250 1250 */ 1251 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell *&LCList, const double RADIUS, const char *filename = NULL)1251 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell_deprecated *&LCList, const double RADIUS, const char *filename = NULL) 1252 1252 { 1253 1253 Info FunctionInfo(__func__); … … 1272 1272 PointCloudAdaptor< molecule > cloud(mol, mol->name); 1273 1273 if (LCList == NULL) { 1274 LCList = new LinkedCell (cloud, 2.*RADIUS);1274 LCList = new LinkedCell_deprecated(cloud, 2.*RADIUS); 1275 1275 freeLC = true; 1276 1276 }
Note:
See TracChangeset
for help on using the changeset viewer.