-
Notifications
You must be signed in to change notification settings - Fork 17
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
[All] Unification of MainKratos.py #858
Conversation
I'll approve this merge AFTER the release 9.0 of the GUI, and in a PR delete the json entry where the apps inform of their main script, since i'll be the same for everyone. |
Not sure at all, but maybe it's not a bad idea to keep that json entry (just in case). Up to you. |
Ok, I will have a look at it with @maceligueta . |
As discussed in here this adds the
analysis_stage
field to theProjectParameters.json
input file (e.g."analysis_stage" : "KratosMultiphysics.FluidDynamicsApplication.fluid_dynamics_analysis"
.This makes possible to do a dynamic import of it, that turns into the unification of all the
MainKratos.py
scripts of the interface so we will have a uniqueAnalysisStageWithFlush
, which will be stored in theexec
folder of the interface. Note that this requires to assume that the Python module name (in snake_case) matches the class name (in UpperCamelCase) (e.g.KratosMultiphysics.FluidDynamicsApplication.fluid_dynamics_analysis
implements the classFluidDynamicsAnalysis
). This was the case in all the cases except theFSIApplication
(see this PR) and the DEM application.Besides this, the
analysis_stage
could be used for other (e.g. the unification of the ROM scripts @Rbravo555 @SADPR ) and documentation purposes.I updated all the applications of the interface. Some comments and missing TODOs would be:
I tested all the updated applications. However for the next applications I didn't run the predefined examples completely as I didn't compiled all the required apps
I note however that the input files are properly generated, meaning that the execution is interrupted (as expected) when the dynamic import takes place. Hence, I dare say that everything should be fine (letting you know just in case)