Skip to content

Commit

Permalink
PABLO: mark octants as "new for refinement" only if they are generate…
Browse files Browse the repository at this point in the history
…d by a refinement
  • Loading branch information
andrea-iob committed Jun 12, 2024
1 parent 0bd8c75 commit d2dbdaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/PABLO/LocalTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ namespace bitpit {
uint32_t firstChildIdx = futureIdx - (nChildren - 1);
fatherOctant.buildChildren(m_octants.data() + firstChildIdx);

// Set children information
for (int i = 0; i < nChildren; ++i) {
m_octants[firstChildIdx + i].m_info[Octant::INFO_NEW4REFINEMENT] = true;
}

// Update the mapping
if(!mapidx.empty()){
for (uint8_t i=0; i<nChildren; i++){
Expand Down
2 changes: 0 additions & 2 deletions src/PABLO/Octant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,6 @@ void Octant::buildChildren(Octant *children) const {
uint32_t dh = oct.getLogicalSize();
oct.m_morton = PABLO::computeMorton(m_dim, coords[0] + dh * dx, coords[1] + dh * dy, coords[2] + dh * dz);

oct.m_info[OctantInfo::INFO_NEW4REFINEMENT] = true;

oct.m_info[INFO_BOUNDFACE0 + xf] = false;
oct.m_info[INFO_BOUNDFACE0 + yf] = false;
oct.m_info[INFO_BOUNDFACE0 + zf] = false;
Expand Down

0 comments on commit d2dbdaf

Please sign in to comment.