Made y, z optional arguments for FunctionParameters that depend on space#4883
Open
Rishab87 wants to merge 6 commits intopybamm-team:mainfrom
Open
Made y, z optional arguments for FunctionParameters that depend on space#4883Rishab87 wants to merge 6 commits intopybamm-team:mainfrom
Rishab87 wants to merge 6 commits intopybamm-team:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4883 +/- ##
========================================
Coverage 98.70% 98.71%
========================================
Files 304 304
Lines 23482 23506 +24
========================================
+ Hits 23179 23203 +24
Misses 303 303 ☔ View full report in Codecov by Sentry. |
rtimms
reviewed
Feb 28, 2025
|
|
||
|
|
||
| def ambient_temperature(y, z, t): | ||
| def ambient_temperature(t, y=None, z=None): |
Contributor
There was a problem hiding this comment.
Ideally this should work if the user just defines def ambient_temperature(t)
Member
Author
There was a problem hiding this comment.
yes I was about to ask that, thanks for clarifying, I'll make the changes accordingly
| self.T_init = pybamm.Parameter("Initial temperature [K]") | ||
|
|
||
| def T_amb(self, y, z, t): | ||
| def T_amb(self, t, y=None, z=None): |
Contributor
There was a problem hiding this comment.
we should raise a warning here that the order of the arguments has changed
…y-x-optional-lumped
Member
Author
|
@rtimms, I've made the changes |
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Member
Author
|
Anything else I need to change here? |
Member
Author
|
Any updates on this? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Made y, z optional arguments for FunctionParameters that depend on space.This improves clarity and paves the way for supporting additional coordinate systems in thermal models.
Fixes #3631
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)
Important checks:
Please confirm the following before marking the PR as ready for review:
nox -s pre-commitnox -s testsnox -s doctests