-
Notifications
You must be signed in to change notification settings - Fork 33
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
Easier generation of description dictionaries #367
Easier generation of description dictionaries #367
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #367 +/- ##
==========================================
+ Coverage 73.26% 73.29% +0.02%
==========================================
Files 270 271 +1
Lines 23097 23122 +25
==========================================
+ Hits 16922 16947 +25
Misses 6175 6175
☔ View full report in Codecov by Sentry. |
def get_default_sweeper_class(cls): | ||
from pySDC.implementations.sweeper_classes.generic_implicit import generic_implicit | ||
|
||
return generic_implicit |
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.
Why is that the default sweeper class for this problem type? Could also be IMEX?
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.
Indeed, but I guess the IMEX as standard should come with a bigger rework of pySDC, right ?
I actually planned to address your concerns a bit. The idea behind the sweeper is that for a given choice of |
I do like the idea of "allowing" only certain combinations of data- and sweeper-type, or to prevent wrong combinations. I also like the idea of doing this automatically somehow, but we really need to make sure we don't add more obstacles to the code, esp. ones we're going to regret at some point. And esp. not because there is no strong need to. |
I guess we already have that. If you use a sweeper with a datatype that are incompatible, it will raise an error in What I want to do here is just to speed up time-to-simulation for inexperienced users. What I want is the user to be able to supply a problem class and dump parameters and get a description back that is ready to run sth. |
I get what you're saying. If the specification of sweepers is a sensible one, can be overruled and "users" know about this, then I'm on board. |
Cool, then I need a list of what sweeper to use with which datatype. |
@tlunet rightfully remarked that the setup of a problem to run is not very inviting to new users. I have to admit, after 2 years of using pySDC, I still copy paste a description every time I need a new one. This PR is meant as a starting point to address this. It introduces a new function called
generate_description
and you can basically dump all variables in there and it will distribute them to the correct sub dictionaries forstep_params
and so on.Also, there is a new interface for a default sweeper for a given problem. Most of the time, there is an obvious choice for a certain sweeper to use, but this needs to be implemented for each problem individually.