You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added run_solver flag to sample_flow_at_points and sample_ti_at_points
The functions sample_flow_at_points and sample_ti_at_points are fine when used independently. However, if the user needs both the wind speed and TI field for the same grid, then the solver is called twice. I've added a flag to prevent that.
I think this makes sense, but it seems like we'll need some sort of error handling for the case where a user sets run_solver = False but a solve has not already happened? I think that should be possible, and I'm happy to put something in and write tests for it, but just wanted to see if you'd already thought of this.
Hi @misi9170, thanks for the feedback, I'll add some error handling 🙂
Thanks @RRiva ! In case you hadn't already found it, I think you should be able to get most of what you need with something like if self.core.state is not State.USED: (where self is the FlorisModel), although you might also have to check that the output variables are the correct shape to be consistent with a solve_for_points-type solve, since self.core.state will also be State.USED under a normal run().
This file contains hidden or 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.
Added
run_solverflag tosample_flow_at_pointsandsample_ti_at_pointsThe functions
sample_flow_at_pointsandsample_ti_at_pointsare fine when used independently. However, if the user needs both the wind speed and TI field for the same grid, then the solver is called twice. I've added a flag to prevent that.Related issue
None.
Impacted areas of the software
FlorisModelCoreAdditional supporting information
Test results, if applicable