Changeset bdc91e for src/linkedcell.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
-
TabularUnified src/linkedcell.cpp ¶
r8e0c63 rbdc91e 187 187 N[i] = 0; 188 188 index = -1; 189 max.Zero();190 min.Zero();191 189 }; 192 190 … … 199 197 for(int i=0;i<NDIM;i++) 200 198 status = status && ((n[i] >=0) && (n[i] < N[i])); 201 if (!status)202 DoeLog(1) && (eLog()<< Verbose(1) << "indices are out of bounds!" << endl);199 // if (!status) 200 // DoeLog(1) && (eLog()<< Verbose(1) << "indices are out of bounds!" << endl); 203 201 return status; 204 202 }; … … 279 277 280 278 /** Calculates the interval bounds of the linked cell grid. 281 * \param *lower lower bounds282 * \param *upper upper bounds279 * \param lower lower bounds 280 * \param upper upper bounds 283 281 * \param step how deep to check the neighbouring cells (i.e. number of layers to check) 284 282 */ … … 286 284 { 287 285 for (int i=0;i<NDIM;i++) { 288 lower[i] = n[i]; 289 for (int s=step; s>0;--s) 290 if ((n[i]-s) >= 0) { 291 lower[i] = n[i]-s; 292 break; 293 } 294 upper[i] = n[i]; 295 for (int s=step; s>0;--s) 296 if ((n[i]+s) < N[i]) { 297 upper[i] = n[i]+s; 298 break; 299 } 286 lower[i] = n[i]-step; 287 if (lower[i] < 0) 288 lower[i] = 0; 289 if (lower[i] >= N[i]) 290 lower[i] = N[i]-1; 291 upper[i] = n[i]+step; 292 if (upper[i] >= N[i]) 293 upper[i] = N[i]-1; 294 if (upper[i] < 0) 295 upper[i] = 0; 300 296 //Log() << Verbose(0) << "axis " << i << " has bounds [" << lower[i] << "," << upper[i] << "]" << endl; 301 297 }
Note:
See TracChangeset
for help on using the changeset viewer.