Skip to content

Commit c9ada05

Browse files
committed
fix vtk writer usage in partition
1 parent 92ade51 commit c9ada05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/preprocessing/partition/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ class preprocessingTriangulation : public triangulation
110110
const bool write_ghost = _write_ghost_neighbors_to_vtu;
111111
_write_ghost_neighbors_to_vtu = false;
112112

113-
vtk_writer writer(this, true, true);
113+
// Wrap `this` in a non-owning shared_ptr so we can pass the base mesh type.
114+
// via a no-op deleter
115+
auto self = boost::shared_ptr<preprocessingTriangulation>(this, [](preprocessingTriangulation*) {});
116+
auto base = boost::static_pointer_cast<triangulation>(self);
117+
vtk_writer writer(base, true, true);
114118
writer.set_write_ghost_neighbors(_write_ghost_neighbors_to_vtu);
115119
writer.update_data(output_variables);
116120
writer.write_vtu(file_name);

0 commit comments

Comments
 (0)