Skip to content

Commit cd10d4e

Browse files
authored
Move piece node outside of function loop. (FEniCS#3120)
1 parent 09ed420 commit cd10d4e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cpp/dolfinx/io/VTKFile.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -663,14 +663,14 @@ void write_function(
663663
add_field(_u.get().name + field_ext[0], size);
664664
add_field(_u.get().name + field_ext[1], size);
665665
}
666+
}
666667

667-
// Add data for each process to the PVTU object
668-
for (int r = 0; r < mpi_size; ++r)
669-
{
670-
std::filesystem::path vtu = create_vtu_path(r);
671-
pugi::xml_node piece_node = grid_node.append_child("Piece");
672-
piece_node.append_attribute("Source") = vtu.filename().c_str();
673-
}
668+
// Add data for each process to the PVTU object
669+
for (int r = 0; r < mpi_size; ++r)
670+
{
671+
std::filesystem::path vtu = create_vtu_path(r);
672+
pugi::xml_node piece_node = grid_node.append_child("Piece");
673+
piece_node.append_attribute("Source") = vtu.filename().c_str();
674674
}
675675

676676
// Write PVTU file

0 commit comments

Comments
 (0)