-
Notifications
You must be signed in to change notification settings - Fork 170
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
Reduce computation time massively in large het_map objects #1024
Merged
misi9170
merged 16 commits into
NREL:develop
from
Bartdoekemeijer:feature/improve_hetmap_speed
Feb 11, 2025
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8122a09
Reduce computation time massively in large het_map objects by avoidin…
Bartdoekemeijer 588f1bd
Import copy library
Bartdoekemeijer 6054a64
Enforce appropriate shape for interpolant object
Bartdoekemeijer f413c2a
ruff formatting
paulf81 4776c9a
Merge branch 'develop' into pr/Bartdoekemeijer/1024
paulf81 3762506
bugfix
paulf81 b9c355d
Add a test of applying a het map
paulf81 8569786
Merge branch 'develop' into pr/Bartdoekemeijer/1024
paulf81 906ec95
Merge branch 'develop' into pr/Bartdoekemeijer/1024
paulf81 83afb7b
Add convert to array
paulf81 93b7eb7
Add convert to array
paulf81 45a4dab
Add to new tests
paulf81 449f465
Merge branch 'develop' into pr/Bartdoekemeijer/1024
paulf81 11bffef
Clean up
paulf81 7e38413
Add comments and rename variables for clarity.
misi9170 181f78a
Change FlowField.het_map to be a numpy array rather than a list.
misi9170 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
Oops, something went wrong.
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.
Wouldn't this need to be assigned to F as it is above @Bartdoekemeijer
?
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 reason for this is that
F.values
is of shape(N, 1)
, rather than shape(N)
. If I don't maintain that shape, the code returns an error.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 still if you don't assign to
F
in line 305 you can't reference it in line 308 (it doesn't exist). Similarly I thinkmultiplier
doesn't exist yet at line 305 so followed the example of the earlier case and usedspeed_multipliers[0]