Changeset 5d41b3f for src/LinkedCell
- Timestamp:
- Feb 22, 2012, 11:28:52 AM (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:
- cbcda6
- Parents:
- ce81e76
- git-author:
- Frederik Heber <heber@…> (02/06/12 17:44:02)
- git-committer:
- Frederik Heber <heber@…> (02/22/12 11:28:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/LinkedCell/LinkedCell_Model.cpp
rce81e76 r5d41b3f 289 289 { 290 290 tripleIndex index; 291 Vector x(Partition* position);291 Vector x(Partition*domain.enforceBoundaryConditions(position)); 292 292 LOG(2, "INFO: Transformed position is " << x << "."); 293 293 for (int i=0;i<NDIM;i++) { … … 450 450 /** Calculates the interval bounds of the linked cell grid. 451 451 * 452 * \note we assume for index to allows be valid, i.e. within the range of LinkedCell_Model::N. 452 * The neighborhood bounds works as follows: We give the lower, left, front 453 * corner of the box and the number of boxes to go in each direction (i.e. the 454 * relative upper, right, behind corner). We assure that the first corner is 455 * within LinkedCell_Model::N, whether the relative second corner is within the 456 * domain must be assured via applying its boundary conditions, see 457 * LinkedCell_Model::applyBoundaryConditions() 458 * 459 * \note we check whether \a index is valid, i.e. within the range of LinkedCell_Model::N. 453 460 * 454 461 * \param index index to give relative bounds to … … 466 473 for (size_t i=0;i<NDIM;++i) { 467 474 ASSERT(index[i] >= 0, 468 "LinkedCell_Model::getNeighborhoodBounds() - index "+toString(index)+" out of lower bounds."); 475 "LinkedCell_Model::getNeighborhoodBounds() - index " 476 +toString(index)+" out of lower bounds."); 469 477 ASSERT (index[i] < getSize(i), 470 "LinkedCell_Model::getNeighborhoodBounds() - index "+toString(index)+" out of upper bounds."); 478 "LinkedCell_Model::getNeighborhoodBounds() - index " 479 +toString(index)+" out of upper bounds."); 471 480 switch (domain.getConditions()[i]) { 472 481 case BoundaryConditions::Wrap: … … 505 514 break; 506 515 } 516 // check afterwards whether we now have correct 517 ASSERT((neighbors.first[i] >= 0) && (neighbors.first[i] < getSize(i)), 518 "LinkedCell_Model::getNeighborhoodBounds() - lower border " 519 +toString(neighbors.first)+" is out of bounds."); 507 520 } 508 521 LOG(3, "INFO: Resulting neighborhood bounds are [" << neighbors.first << "]<->[" << neighbors.second << "].");
Note:
See TracChangeset
for help on using the changeset viewer.