- Timestamp:
- Sep 14, 2016, 6:42:53 PM (9 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, 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_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
- Children:
- d56e21
- Parents:
- 06653a
- git-author:
- Frederik Heber <heber@…> (05/26/16 09:46:06)
- git-committer:
- Frederik Heber <heber@…> (09/14/16 18:42:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Summation/SetValues/SamplingGrid.cpp
r06653a r91e7658 674 674 }; 675 675 676 static void getLengthsOf Grid(676 static void getLengthsOfWindow( 677 677 int _total[NDIM], 678 678 const SamplingGrid &_grid) … … 688 688 } else 689 689 _total[index] = 0; 690 ASSERT (_total[index] == ::pow(2, _grid.level), 690 // we can only assert that its atmost the maximum number of grid points 691 ASSERT (_total[index] <= ::pow(2, _grid.level), 691 692 "SamplingGrid::downsample() - total "+toString(_total[index]) 692 +" does not match2^level: "+toString(_grid.level));693 +" is not equal or less than 2^level: "+toString(_grid.level)); 693 694 } 694 695 } … … 788 789 static_cast<SamplingGridProperties &>(instance) = other; 789 790 instance.setWindowSize(other.begin_window, other.end_window); 790 if (_level >= other.level) { 791 ASSERT( _level <= other.level, 792 "SamplingGrid::downsample() - desired level "+toString(_level) 793 +" larger than level "+toString(other.level)+" of the given values."); 794 if (_level == other.level) { 791 795 instance.sampled_grid = other.sampled_grid; 792 796 } else { … … 801 805 int length_d[3]; 802 806 int length_s[3]; 803 getLengthsOf Grid(length_s, other);807 getLengthsOfWindow(length_s, other); 804 808 for (instance.level = other.level-1; instance.level >= _level; --instance.level) { 805 getLengthsOf Grid(length_d, instance);809 getLengthsOfWindow(length_d, instance); 806 810 // we always have an eighth of the number of sample points as we stop 811 ASSERT( sourcevalues->size() % 8 == 0, 812 "SamplingGrid::downsample() - at level "+toString( instance.level) 813 +" given grid points "+toString(sourcevalues->size())+" are not even numbered per axis anymore."); 807 814 sampledvalues_t downsampled(sourcevalues->size()/(size_t)8, 0.); 808 815 restrictFullWeight(downsampled, length_d, *sourcevalues, length_s);
Note:
See TracChangeset
for help on using the changeset viewer.
