-
Notifications
You must be signed in to change notification settings - Fork 249
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
Trilinos Import utility add restart #2285
Conversation
else: | ||
raise Exception("Other input options are not yet implemented.") | ||
|
||
def CreateCommunicators(self): | ||
## Construct and execute the MPICommunicator | ||
KratosMetis.SetMPICommunicatorProcess(self.main_model_part).Execute() |
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.
Are you sure that this can be removed?
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.
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.
Perfect! Thanks for the explanation @philbucher
@@ -108,7 +108,7 @@ def ImportModelPart(self): | |||
## Construct the Trilinos import model part utility | |||
self.trilinos_model_part_importer = trilinos_import_model_part_utility.TrilinosImportModelPartUtility(self.main_model_part, self.settings) | |||
## Execute the Metis partitioning and reading | |||
self.trilinos_model_part_importer.ExecutePartitioningAndReading() | |||
self.trilinos_model_part_importer.ImportModelPart() |
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.
IMO ExecutePartitioningAndReading is a much more self-explicative name of what this method does.
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 changed it bcs now the utility can also do restarts (and possibly also other imports, think of hdf5,...)
This way whenever a new functionality is being added in this utility it will be also available for the solvers.
Then the name ExecutePartitioningAndReading
does not fit any more
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.
Go ahead then!
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.
@philbucher are we sure we want to add all the new functionalities to the same utility? I'd rather have separate classes to read mdpa, hdf5 and restart files, for example.
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.
@jcotela this is what I would like to avoid, otherwise we will have a lot of copy-pasting with more options becoming available
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.
@philbucher I agree in principle, but my preferred solution to that would be a good I/O base class all these utilities can derive from... I guess we will see what works when we get there though...
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 talked to @jcotela and we agreed that we leave the proposed solution and change it in the future to e.g. a factory
ping |
I pushed some fixes, now everything should work smoothly. |
can we merge this? |
thanks |
This PR adds the restart loading option to the
TrilinosImportModelPartUtility
I also updated the solvers in Fluid and Structure