[HDF5] Update - 7 - ModelPartIO#11490
Merged
sunethwarna merged 29 commits intomasterfrom Aug 12, 2025
Merged
Conversation
…hdf5/update/model_part_io
…hdf5/update/model_part_io
…hdf5/update/model_part_io
…hdf5/update/model_part_io
…hdf5/update/model_part_io
…hdf5/update/model_part_io
Member
Author
|
This is ready for your review @matekelemen :) |
matekelemen
reviewed
Jun 23, 2025
| auto& r_local_nodes = r_communicator.LocalMesh().Nodes(); | ||
| auto& r_ghost_nodes = r_communicator.GhostMesh().Nodes(); | ||
|
|
||
| for (auto& p_node : rModelPart.Nodes().GetContainer()) { |
Contributor
There was a problem hiding this comment.
yikes
I hope PointerVectorSet::GetContainer is going away, so it'd be best to think ahead and use iterators instead.
Suggested change
| for (auto& p_node : rModelPart.Nodes().GetContainer()) { | |
| for (auto it_node=rModelPart.Nodes().ptr_begin(); it_node!=rModelPart.Nodes().ptr_end(); ++it_node) { | |
| const auto& rp_node = *it_node; |
| } | ||
|
|
||
| std::tuple<unsigned, unsigned> PartitionedModelPartIO::StartIndexAndBlockSize(std::string const& rPath) const | ||
| void PartitionedModelPartIO::SetCommunicator(ModelPart& rModelPart) const |
Contributor
There was a problem hiding this comment.
this function does way more than simply setting a member variable. Ideally, the function's name should reflect this, but at the very least it should be documented.
Comment on lines
+101
to
104
| if (mpFile->GetTotalProcesses() == 1) { | ||
| KRATOS_ERROR << "Using PartitionedModelPartIO with single process file access." << std::endl; | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
is this actually a problem?
Member
Author
There was a problem hiding this comment.
It hangs (used to, haven't checked recently).
applications/HDF5Application/custom_io/hdf5_partitioned_model_part_io.cpp
Outdated
Show resolved
Hide resolved
Comment on lines
+122
to
+124
| block_for_each(r_nodes, [my_pid](auto& rNode) { | ||
| rNode.FastGetSolutionStepValue(PARTITION_INDEX) = my_pid; | ||
| }); |
Contributor
There was a problem hiding this comment.
does this include the ghost nodes? If yes, then we're doing unnecessary communication here.
Co-authored-by: Máté Kelemen <44344022+matekelemen@users.noreply.github.com>
matekelemen
reviewed
Jul 12, 2025
matekelemen
approved these changes
Aug 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Updates
ModelPartIOandPartitionedModelPartIOto new features. TheParitionedModelPartIOwill be moved tompi_extensionin a future PR.🆕 Changelog
ModelPartIOandParitionedModelPartIO