Skip to content

Commit

Permalink
add global patch id to patch diag attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Jan 5, 2024
1 parent 618c8f6 commit af969da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/diagnostic/diagnostic_model_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,21 @@ class ModelView : public IModelView
dict["lower"] = grid.AMRBox().lower.toVector();
dict["upper"] = grid.AMRBox().upper.toVector();
dict["mpi_rank"] = static_cast<std::size_t>(core::mpi::rank());
dict["patch_id"] = patchID;
return dict;
}


NO_DISCARD static auto getEmptyPatchProperties()
{
// should be consistent with function `getPatchProperties` above
PatchProperties dict;
dict["origin"] = std::vector<double>{};
dict["nbrCells"] = std::vector<std::uint32_t>{};
dict["lower"] = std::vector<int>{};
dict["upper"] = std::vector<int>{};
dict["mpi_rank"] = std::size_t{0};
dict["patch_id"] = std::string{""};
return dict;
}

Expand Down

0 comments on commit af969da

Please sign in to comment.