Skip to content

Commit c5cb181

Browse files
authored
Merge pull request #4136 from roystgnr/simplex_dangling_pointer_fix
Use proxy neighbors everywhere in SimplexRefiner
2 parents aaff6f3 + 6c89684 commit c5cb181

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mesh/simplex_refiner.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ std::size_t SimplexRefiner::refine_via_edges(Elem & elem,
225225
// (which can't reconstruct them from scratch), and we need at least
226226
// placeholder neighbors to make sure we'll have good processor_id()
227227
// options for new nodes in future splits of the same edge.
228-
subelem[0]->set_neighbor(1, subelem[1].get());
229-
subelem[1]->set_neighbor(0, subelem[0].get());
228+
subelem[0]->set_neighbor(1, proxy_elements[elem.processor_id()].get());
229+
subelem[1]->set_neighbor(0, proxy_elements[elem.processor_id()].get());
230230

231231
BoundaryInfo & boundary_info = _mesh.get_boundary_info();
232232
std::vector<boundary_id_type> bc_ids;

0 commit comments

Comments
 (0)