-
Notifications
You must be signed in to change notification settings - Fork 19
4141 remove f90 references from both docstrings and docs #4283
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
base: main
Are you sure you want to change the base?
Changes from all commits
9d9c977
ee5a8f6
f8898c7
c017e76
b1c5dfc
14e1da0
bdd254b
0b70485
f367a6c
f087387
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -82,7 +82,7 @@ ixc = 169 * Achievable Temperature of the ECRH at the ignition point | |||||
|
|
||||||
| ## Code specifics | ||||||
|
|
||||||
| The stellarator model is largely contained within source file `stellarator.f90`. | ||||||
| The stellarator model is largely contained within source file `stellarator.py`. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The model call is in the following order | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ variable values that maximises or minimises a certain function of them, | |
| known as the figure of merit. | ||
|
|
||
| Several possible figures of merit are available, all of which are in the | ||
| source file `evaluators.f90`. | ||
| source file `evaluators.py`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this reference the figures of merit enum instead? |
||
|
|
||
| Switch `minmax` is used to control which figure of merit is to be used. If the | ||
| figure of merit is to be minimised, `minmax` should be **positive**, and if a | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ class InputVariable: | |
| """A variable to be parsed from the input file.""" | ||
|
|
||
| module: Any | ||
| """The Fortran module that this variable should be set on.""" | ||
| """The module that this variable should be set on.""" | ||
| type: type | ||
| """The expected type of the variable""" | ||
| range: tuple[NumberType, NumberType] | None = None | ||
|
|
@@ -1174,7 +1174,6 @@ def parse_input_file(data_structure_obj: DataStructure): | |
| continue | ||
|
|
||
| # matches (variable name, array index, value) | ||
| # NOTE: array index is Fortran-based hence starts at 1. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @timothy-nunn I am unsure if this comment regarding indexing is still required? |
||
| line_match = re.match( | ||
| r"([a-zA-Z0-9_]+)(?:\(([0-9]+)\))?[ ]*=[ ]*([ +\-a-zA-Z0-9.,]+).*", | ||
| stripped_line, | ||
|
|
@@ -1361,12 +1360,9 @@ def set_scalar_variable(name: str, value: ValidInputTypes, config: InputVariable | |
| """ | ||
| current_value = getattr(config.module, name, ...) | ||
|
|
||
| # use ... sentinel because None is probably a valid return from Fortran | ||
|
chris-ashe marked this conversation as resolved.
|
||
| # and definately will be when moving to a Python data structure | ||
| # use ... sentinel because None is a valid initial/default value for variables | ||
| if current_value is ...: | ||
| error_msg = ( | ||
| f"Fortran module '{config.module}' does not have a variable '{name}'." | ||
| ) | ||
| error_msg = f"Module '{config.module}' does not have a variable '{name}'." | ||
| raise ProcessValueError(error_msg) | ||
|
|
||
| setattr(config.module, name, value) | ||
|
|
@@ -1375,9 +1371,6 @@ def set_scalar_variable(name: str, value: ValidInputTypes, config: InputVariable | |
| def set_array_variable(name: str, value: str, array_index: int, config: InputVariable): | ||
| """Set an array variable in the `config.module`. | ||
|
|
||
| The way PROCESS input files are structured, each element of the array is provided on one line | ||
| so this function just needs to set the `value` at `array_index` (-1) because of Fortran-based indexing. | ||
|
|
||
|
Comment on lines
-1378
to
-1380
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @timothy-nunn are these lines still relevant? |
||
| Parameters | ||
| ---------- | ||
| name : | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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 constants in constants.py just seem to have a source link?