-
Notifications
You must be signed in to change notification settings - Fork 3
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
New Options class #33
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
fa57c2b
Define Options and OptionsFactory classes
johnomotani ef0bcdf
Use new Options/OptionsFactory in hypnotoad
johnomotani 5c6a68e
Ensure no persistent state is set from nonorthogonal_options
johnomotani 0ca3b13
Add methods to reset nonorthogonal options
johnomotani d3642e8
Implement new options in GUI and executable scripts
johnomotani ca70c28
Use strings instead of expressions for defaults where possible
johnomotani a8b4d69
Remove hypnotoad_options.py
johnomotani 03142d7
Remove options package from requirements
johnomotani 2809a34
Update whats-new.md
johnomotani defdd59
Tidy up function that returns default if value is None
johnomotani 953b19b
Remove empty dict {} default arguments
johnomotani c7f05c5
Use a list for refine_methods rather than comma-separated string
johnomotani 5d29b4a
Use a hasattr() check instead of try...except
johnomotani ac32660
Better formatting for options doc attributes
johnomotani 36cf3c7
Move shiftedmetric to MeshRegion options
johnomotani 968efd7
Wrap text in tooltips for options widget table
johnomotani 33ba0bb
Remove line breaks from refine_methods doc
johnomotani cce1c15
Remove unused 'options_factory' objects
johnomotani 052f51d
Move with_default() to utils/utils.py, add tests
johnomotani ea78bb8
Replace OptionsFactory with external optionsfactory package
johnomotani 2369638
Update minor changes to OptionsFactory API
johnomotani 75abc97
Fix use of sin_angle_at_start and sin_angle_at_end
johnomotani a3782a6
Allow ints to be passed for floats
johnomotani ca005f1
Fix SolutionError message in refinePoint()
johnomotani 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
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
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
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.
I'd prefer to create a new object if possible, rather than reset the options, in case this object is shared elsewhere. Is modifying options definitely needed?
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 think it is necessary - once I update #26 you'll be able to try this out, but when creating nonorthogonal grids, the initial construction (creating
FineContour
s and finding wall intersections) takes a long time. Then often the grids look weird for one reason or another, and the way to fix that is to adjust the poloidal spacing of the grid points, which can be done much more quickly than building theMesh
object in the first place, because theFineContour
s don't need to change, so all the work done in constructing them can just be reused. It does make the workflow a lot better, so I think it's worth the compromise of allowing a small number of options to be changed. I've tried to make sure that there is no persistent state in theMesh
/Equilibrium
/MeshRegion
/EquilibriumRegion
that depends onnonorthogonal_options
except for the actual position of the grid points to minimise the chances of some odd history-dependant thing happening. Would still recommend building the grid once from the ground up with the final settings once they're decided on to be safe (and maybe we should enforce that in the GUI at some point).