// constrained. could use is_constrained, but
// that means computing the line index twice
const unsigned int line_index = calculate_line_index(index);
- if (line_index > lines_cache.size() ||
- lines_cache[line_index] == numbers::invalid_unsigned_int ||
- lines[lines_cache[line_index]].inhomogeneity == 0)
+ if (line_index >= lines_cache.size() ||
+ lines_cache[line_index] == numbers::invalid_unsigned_int)
return false;
else
- return true;
+ {
+ Assert(lines_cache[line_index] < lines.size(), ExcInternalError());
+ return !(lines[lines_cache[line_index]].inhomogeneity == 0);
+ }
}
// constrained. could use is_constrained, but
// that means computing the line index twice
const unsigned int line_index = calculate_line_index(line);
- if (line_index > lines_cache.size() ||
+ if (line_index >= lines_cache.size() ||
lines_cache[line_index] == numbers::invalid_unsigned_int)
return 0;
else
// constrained. could use is_constrained, but
// that means computing the line index twice
const unsigned int line_index = calculate_line_index(line);
- if (line_index > lines_cache.size() ||
+ if (line_index >= lines_cache.size() ||
lines_cache[line_index] == numbers::invalid_unsigned_int)
return 0;
else