-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MPM] Cleanup set and fill buffer size #11650
Merged
+11
−22
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm saying something stupid, but shouldn't the database of
self.grid_model_part
be already filled if you're restarting theModel
container?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only
self.material_point_model_part
is imported using theRestartUtility
, whileself.grid_model_part
is imported as usual using themdpa
file. So it is necessary to set again the buffer size of the grid model part, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But, as far as I understand, in a standard case (no restart) the
self.grid_model_part
is imported once at the beginning of the simulation from its corresponding mdpa. Assuming this, theself.grid_model_part
will be part of theModel
container meaning that it will be serialized, together with all its data when doing the save of the restart. Hence, when loading from the restart data file theself.grid_model_part
will be there with its corresponding data. With your current implementation you are wiping the data ofself.grid_model_part
.In any case, I'm not aware of the particularities of your application so this is maybe the behavior you intend to achieve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not the one who implemented the restart in the
ParticleMechanicsApplication
, so I'm not really familiar with it. But I think that in the current implementation only theself.material_point_model_part
is serialized with all its data when doing the save of the restart through theSaveRestartProcess
. Theself.grid_model_part
andself.initial_mesh_model_part
(both part of theModel
container) are not serialized and data is not saved. And I think it makes sense because theself.initial_mesh_model_part
is used only at the very beginning of the simulation (not needed and not loaded in the restart) while theself.grid_model_part
is only used for the computations (and thus it is loaded using themdpa
file as in the standard case).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rubenzorrilla was my last comment clear? Can we merge this?
I am not changing the behavior of the application, I only need to define the variables
TIME
andSTEP
otherwise theVtkOutput
process is not working and I am doing it by usingauxiliary_solver_utilities.SetAndFillBuffer
like it is done in other applications.If something is not clear about how the restart is implemented in our application I think we can discuss it separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go ahead. I was just pointing that the good way to go would be to serialize the
Model
. If you already have a working implementation I've no objections about.