[1D] Pruning may not remove adjacent grid points
This commit is contained in:
parent
b3a1e1e47c
commit
6b9fc98fc8
1 changed files with 8 additions and 0 deletions
|
|
@ -151,6 +151,14 @@ int Refiner::analyze(size_t n, const doublereal* z,
|
|||
}
|
||||
}
|
||||
|
||||
// Don't allow pruning to remove multiple adjacent grid points
|
||||
// in a single pass.
|
||||
for (size_t j = 2; j < n-1; j++) {
|
||||
if (m_keep[j] == -1 && m_keep[j-1] == -1) {
|
||||
m_keep[j] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return int(m_loc.size());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue