Using the core linear interpolant MX.interpn_linear
rather than the plugin
#3668
Unanswered
martinjrobins
asked this question in
Q&A
Replies: 2 comments
-
For more context, this is an attempt to solve this issue: pybamm-team/PyBaMM#3783 |
Beta Was this translation helpful? Give feedback.
0 replies
-
interpn is in the C runtime (https://github.com/casadi/casadi/blob/main/casadi/core/runtime/casadi_interpn.hpp) so it can easily be used self-contained, even without linking to CasADi (in generated C code). MX::interpn_linear is a wrapper to the low-level C code which doesn't require any interpolant plugin class. If it's for a specific problem setup, you can always use generate C code. There is little documentation on low-level features like these, sorry |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to use the linear interpolant in casadi in a self-contained static library (in windows). I would prefer not to load up dll's at runtime and so would like to avoid using casadi's plugin system.
I notice that the linear interpolant function is in the core casadi library (https://web.casadi.org/python-api/#casadi.casadi.MX.interpn_linear) so I was hoping to use this. I'm using my static library from python hence the interest in the python api version of this function.
Is what I'm trying to do feasible, or is there a better way to go about this? If indeed I should be using
interpn_linear
, are there any docs on how the arguments to this function relate to the args to the standard interpolant functionBeta Was this translation helpful? Give feedback.
All reactions