-
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
[Core] update analysis stage #2135
Conversation
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.
hi @philbucher this looks pretty fine to me.
what i am not clear is the distinction between "new" and "old" processes. could u explain didactically what is happening?
if len(list_of_processes) == 0: | ||
KratosMultiphysics.Logger.PrintInfo("FluidDynamicsAnalysis", "Using the old way to create the processes, this will be removed!") | ||
from process_factory import KratosProcessFactory | ||
factory = KratosProcessFactory(self.model) |
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.
could u explain in short what is happening here?
the KratosProcessFactory is still the same right? or did u change it?
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 did not change the ProccesFactory
If I enter this if
it means that there are no processes inside a processes
dict present in the ProjectParams. This is how the current interface looks like
Then I construct the processes the same way they were constructed previously
@RiccardoRossi I changed the naming, old processes was not really a good name I meant old interface, i.e. if a block of processes is present outside of the In the future they would be grouped under "processes", see the example in the first post |
ok, all of this makes sense to me. can i ask to document this in the wiki prior to merging the PR? |
Sure, will let you know when I am done with it |
ping @KratosMultiphysics/technical-committee I added the wiki for the AnalysisStage and the PythonSolver Please have a look |
Nice workd @philbucher ! |
@maceligueta maybe I misunderstand what you mean, but I am not intending to have all the results in one file. |
Of course printing the results of each application in separate files is an option. But I prefer to print together all the meshes from the different coupled applications. It's very convenient, as you can embed your code in GiD (for example) and switch to post-process and take a look at the results, while the computation is still running. No need to do merges or open several post-processors. |
@maceligueta I think I understand now: If you want to use this but not follow the usual interface of the processes, then in your derived Regarding disabling the regular output of the original applications: Does this answer your question? |
Thanks for the clarification @philbucher . Actually it was just a comment about the wiki: there it says that physics and couplings are bounded to the solver, however, couplings not related to physics can fall outside the solver. They will probably go to the processes or methods of the Analysis. Sorry if I was not very clear. So, even if the explanation at the wiki is simple, the actual coupled codes usually mess things up. |
@loumalouomega now I am done with the changes. Note that the Fluid does not work with this yet, bcs the Fluid solvers do not yet derive from the base-solver and also don't take the model as input. I spoke with @jcotela and he is going the changes very soon. Contact is working |
OK, I was working on the fluid this morning, but I have reverted to avoid
conflicts with your changes
El lun., 28 may. 2018 17:27, Philipp Bucher <[email protected]>
escribió:
… @loumalouomega <https://github.com/loumalouomega> now I am done with the
changes.
Note that the Fluid does not work with this yet, bcs the Fluid solvers do
not yet derive from the base-solver and also don't take the model as input.
I spoke with @jcotela <https://github.com/jcotela> and he is going the
changes very soon.
Contact is working
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2135 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATEMgFugmQPml-3BEm0UbxMqjWy9PpRFks5t3BddgaJpZM4UGExr>
.
|
restart saving is handled through a process, added in #2283 |
@jcotela can you please have a close look at the updates to the FluidAnalysis in case I missed sth? |
ping can we merge this now? Its blocking further developments |
this looks fine to me, but having seen the troubles in the last weeks, i would like @rubenzorrilla to give his approval |
@RiccardoRossi makes sense to me |
i took a look at the FSI but I cannot get the example from GiD to work. @rubenzorrilla is it up to date? The tests in FSI work except the one that always fails |
ping @rubenzorrilla |
|
||
def _CreateProcesses(self, parameter_name, initialization_order): | ||
"""Create a list of processes | ||
Format: |
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.
This seems too much complex to me. Is it required by any technical reason?
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.
The idea behind grouping the processes is that one can loop them.
this way we can solve #869 and also automatize the computation of the ComputingModelPart
(which is quite error-prone)
Without the extra level it would not be possible to specify the order of execution (like it is required e.g. in Fluids)
Users can still add their custom processes, but it should be done under processes
or output_processes
respectively
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!
Thanks |
This PR significantly improves the capabilities of the baseclass of the
AnalysisStage
. Common functionalities from the already existingAnalysisStage
s have been moved to the baseclass, to avoid code duplication and make the usage easier.Solver construction is handled properly now
Now the processes are constructed and handled completely through the baseclass. In case the list of initialization matters (like it does in fluid) the order can be passed as a list
All processes involved in the analysis are now grouped in projectparams.json =>
Along with this come two more goodies:
We can finally do #869 !
Also it will be possible to automatize the computation of the ComputingModelPart (quite error prone atm)
NO existing code breaks!!! I implemented methods in the AnalysisStage of Fluid and Structure that make sure the old format still works
I adapted one test in StructuralMechanics as a proof of concept, the remaining ones I will update in another PR
@jcotela the test in Fluid also works. We should talk next week abt these modifications
The derived
AnalysisStages
s become much cleaner!I know this a big step, so please take your time to review.
Requires #2068 to work
@ipouplana this is the PR I was refering to. Please also have a look, I think the PoroAnalysisStage will become much simpler after this
@loumalouomega I also had a look at the one in contact, it should not be much effort adapting it