--- /dev/null
+Changed: Adjusted ranges for GridRefinement::refine_and_coarsen_fixed_fraction():
+Now criteria of every cell will be considered.
+<br>
+(Marc Fehling, 12/05/2019)
// compute thresholds
typename Vector<Number>::const_iterator pp = tmp.begin();
- for (double sum = 0;
- (sum < top_fraction * total_error) && (pp != (tmp.end() - 1));
+ for (double sum = 0; (sum < top_fraction * total_error) && (pp != tmp.end());
++pp)
sum += *pp;
double top_threshold = (pp != tmp.begin() ? (*pp + *(pp - 1)) / 2 : *pp);
typename Vector<Number>::const_iterator qq = (tmp.end() - 1);
for (double sum = 0;
- (sum < bottom_fraction * total_error) && (qq != tmp.begin());
+ (sum < bottom_fraction * total_error) && (qq != tmp.begin() - 1);
--qq)
sum += *qq;
double bottom_threshold = (qq != (tmp.end() - 1) ? (*qq + *(qq + 1)) / 2 : 0);
// refinemnt as well.
{
const unsigned int refine_cells = pp - tmp.begin(),
- coarsen_cells = tmp.end() - qq;
+ coarsen_cells = tmp.end() - 1 - qq;
if (static_cast<unsigned int>(
tria.n_active_cells() +