- Timestamp:
- Oct 13, 2015, 8:14:32 PM (9 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:
- 17e4fd
- Parents:
- cceb8c
- git-author:
- Frederik Heber <heber@…> (09/07/15 06:25:28)
- git-committer:
- Frederik Heber <heber@…> (10/13/15 20:14:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Jobs/WindowGrid_converter.cpp
rcceb8c r445ce6 244 244 } 245 245 246 /// reset grid to zero everywhere 247 246 248 VMG::Grid::iterator griditer = window.Iterators().Local().Begin(); 247 249 // griditer.advance(pre_offset[0]*total[1]*total[2]); 250 for(N[0]=0; N[0] < total[0]; ++N[0]) 251 for(N[1]=0; N[1] < total[1]; ++N[1]) 252 for(N[2]=0; N[2] < total[2]; ++N[2]) { 253 ASSERT( griditer != window.Iterators().Local().End(), 254 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 255 window(*griditer++) = 0.; 256 } 257 258 #ifndef NDEBUG 259 ASSERT( griditer == window.Iterators().Local().End(), 260 "InterfaceVMGJob::addWindowOntoGrid() - griditer is not at end of window."); 261 #endif 262 263 /// then apply charges onto grid 264 265 griditer = window.Iterators().Local().Begin(); 266 SamplingGrid::sampledvalues_t::const_iterator copyiter = grid.sampled_grid.begin(); 267 // NOTE: GridIterator::operator+=()'s implementation in vmg is broken. DON'T USE! 268 // griditer += pre_offset[0] * total[1] * total[2]; 248 269 for(N[0]=0; N[0] < pre_offset[0]; ++N[0]) 249 270 for(N[1]=0; N[1] < total[1]; ++N[1]) … … 251 272 ASSERT( griditer != window.Iterators().Local().End(), 252 273 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 253 window(*griditer++) = 0.; 254 } 255 SamplingGrid::sampledvalues_t::const_iterator copyiter = grid.sampled_grid.begin(); 274 griditer++; 275 } 256 276 for(N[0]=0; N[0] < length[0]; ++N[0]) { 257 // griditer .advance(pre_offset[1]*total[2]);277 // griditer += pre_offset[1] * total[2]; 258 278 for(N[1]=0; N[1] < pre_offset[1]; ++N[1]) 259 279 for(N[2]=0; N[2] < total[2]; ++N[2]) { 260 280 ASSERT( griditer != window.Iterators().Local().End(), 261 281 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 262 window(*griditer++) = 0.;282 griditer++; 263 283 } 264 284 for(N[1]=0; N[1] < length[1]; ++N[1]) { 265 // griditer.advance(pre_offset[2]); 266 for(N[2]=0; N[2] < pre_offset[2]; ++N[2]) 267 window(*griditer++) = 0.; 285 // griditer += pre_offset[2]; 286 for(N[2]=0; N[2] < pre_offset[2]; ++N[2]) { 287 griditer++; 288 } 289 268 290 for(N[2]=0; N[2] < length[2]; ++N[2]) { 269 291 ASSERT( griditer != window.Iterators().Local().End(), … … 273 295 window(*griditer++) += prefactor*(*copyiter++); 274 296 } 275 // griditer .advance(post_offset[2]);297 // griditer += post_offset[2]; 276 298 for(N[2]=0; N[2] < post_offset[2]; ++N[2]) { 277 299 ASSERT( griditer != window.Iterators().Local().End(), 278 300 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 279 window(*griditer++) = 0.;301 griditer++; 280 302 } 281 303 } 282 // griditer .advance(post_offset[1]*total[2]);304 // griditer += post_offset[1] * total[2]; 283 305 for(N[1]=0; N[1] < post_offset[1]; ++N[1]) 284 306 for(N[2]=0; N[2] < total[2]; ++N[2]) { 285 307 ASSERT( griditer != window.Iterators().Local().End(), 286 308 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 287 window(*griditer++) = 0.;288 } 289 } 290 // griditer.advance(post_offset[0]*total[1]*total[2]);309 griditer++; 310 } 311 } 312 // griditer += post_offset[0] * total[1] * total[2]; 291 313 for(N[0]=0; N[0] < post_offset[0]; ++N[0]) 292 314 for(N[1]=0; N[1] < total[1]; ++N[1]) … … 294 316 ASSERT( griditer != window.Iterators().Local().End(), 295 317 "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window."); 296 window(*griditer++) = 0.;318 griditer++; 297 319 } 298 320 #ifndef NDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.