Changeset 6c0b3f for src/Fragmentation/Summation/SetValues/SamplingGrid.cpp
- Timestamp:
- Jun 8, 2016, 10:45:28 PM (9 years ago)
- Children:
- 26f238
- Parents:
- 6369bc
- git-author:
- Frederik Heber <heber@…> (05/26/16 09:46:06)
- git-committer:
- Frederik Heber <heber@…> (06/08/16 22:45:28)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Summation/SetValues/SamplingGrid.cpp
r6369bc r6c0b3f 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.
