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
There is no direct function in the Model class to view variables (similar to parameters). It would be great to have a function like model.variables() in addition to model.parameters().
The text was updated successfully, but these errors were encountered:
Hi. I think that's fine. It can be added if someone wants to put the work in.
Personally, I never saw a use case for querying the variables. Like parameters, those we need to automate parameter sweeps. Or even optimization schemes. What are the variables good for? From an automation perspective. (Inside the Comsol model itself they're obviously useful.)
Do you plan to work on this? The demo model (from the tutorial) doesn't define any custom variables. The first step would be to add some, as an example, to that model. Then write a demo script that queries them. So that we see what the new function (method of the Model class) would do. We're eventually going to need something like that anyway, as I'm not adding library code that doesn't come with automated tests.
If you don't want to contribute the code, we can leave this issue open as a feature request.
john-hen
changed the title
No direct function in Model class to see variables (similar to parameters)
Add API method for inspection of user-defined variables
Jul 12, 2024
There is no direct function in the Model class to view variables (similar to parameters). It would be great to have a function like model.variables() in addition to model.parameters().
The text was updated successfully, but these errors were encountered: