Skip to content

Commit

Permalink
feature-wrap-partition: add tree offset to newly_adapted indices
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbrandt committed Aug 1, 2024
1 parent 8dfa831 commit f6e79a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/p4est_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,14 +821,14 @@ p4est_wrap_adapt (p4est_wrap_t * pp)
if (quadrant->level > *level) {
/* quadrant was newly refined, store its index in the new p4est */
lqid = (p4est_locidx_t *) sc_array_push (pp->newly_refined);
*lqid = (p4est_locidx_t) zz;
*lqid = (p4est_locidx_t) zz + tree->quadrants_offset;
zz += P4EST_CHILDREN;
qz++;
}
else if (quadrant->level < *level) {
/* quadrant was newly coarsened, store its index in the new p4est */
lqid = (p4est_locidx_t *) sc_array_push (pp->newly_coarsened);
*lqid = (p4est_locidx_t) zz;
*lqid = (p4est_locidx_t) zz + tree->quadrants_offset;
zz++;
qz += P4EST_CHILDREN;
}
Expand Down

0 comments on commit f6e79a6

Please sign in to comment.