Skip to content
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

Add-custom-module-functions-functionality #70

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mleot
Copy link

@mleot mleot commented Nov 21, 2024

Motivation:

I would like to be able to specify custom function in my codebase (which returns a pybamm compatible function) in a BPX json file by passing the called function name and any arguments.

Example:

"OCP [V]": "mypackage.mymodule.myfunction('arg1','arg2')"

In this case, an import should be added to the preamble, for the package name, and then the function should not be treated as a mathmatical expression.

TODO:

  • Find the right way to recognize that the function is this type of function, and not the mathmatical expression string. Currently, I have looked to see if '"' exists in the string (a string argument will not normally appear in the mathmatical expression version of a BPX function).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant