Expose pseudo-force interface using pybind11 [WIP]#126
Expose pseudo-force interface using pybind11 [WIP]#126michael-petersen merged 25 commits intodevelfrom
Conversation
Tfinal fix
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix accel func and add center manipulation tools. See thread for full discussion.
|
Added a new test of inertial vs non-inertial here. It's close but far enough that we'll have to dig in deeper, alas. But at least we have a framework for testing now. |
|
A quick look suggests that the pseudo-force computation is fairly close to what it should be. But the difference remains too large. |
|
Confirming here that for a start I can a) compile, and b) get the same results as in EXP-code/pyEXP-examples#15 for both |
…e-post error that did not affect the results.
…flagging out of bounds
…this can be queried by clients; added pseudo accel debug output for testing
There was a problem hiding this comment.
Pull Request Overview
This PR exposes a pseudo-force interface to Python via pybind11 and adds non-inertial frame support in the basis evaluation routines while simplifying the call structure of setNonInertial. Key changes include:
- Changing readwrite bindings to readonly for coefficient time and center values plus adding explicit accessor and setter functions.
- Introducing new functions for non-inertial operations (setNonInertial, setNonInertialAccel, setInertial) in both Python and C++ wrappers.
- Updating several coefficient caching and interpolation routines with minor logic tweaks and enhanced error checks.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pyEXP/CoefWrappers.cc | Updated binding definitions and added new accessor setter methods. |
| pyEXP/BasisWrappers.cc | Added non-inertial/inertial interface and overloads for setNonInertial. |
| expui/CoefStruct.H | Initialized center vector and added accessor methods. |
| expui/BiorthBasis.cc | Cached coefficient structures and adjusted interpolation logic. |
| expui/BasisFactory.cc | Revised setNonInertial parameters and added sanity checking. |
| expui/BasisFactory.H | Introduced new helper functions for non-inertial mode management. |
Files not reviewed (1)
- CMakeLists.txt: Language not supported
Typos in docstrings only. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
michael-petersen
left a comment
There was a problem hiding this comment.
All code works as expected for me, particularly with the MWE in pyEXP-examples.
The9Cat
left a comment
There was a problem hiding this comment.
Cool. I might have done this with a std::regex but this works.
|
Is there an obvious work around for earlier version? E.g. will |
|
For reference: the template for version checking can be found in the associated |
New pseudo-force features
Work so far:
setNonInertialandsetNonInertialAccelfor setting and requesting evaluation of a pseudoforcesetNonInertial. There are two variants: (1) passing a times and centers as arrays; and (2) passing an EXPOrientfile.Basis::usingNonIntertial()to tell client classes whether to use inertial or expansion frame coordinates.Comments
Code compiles but none of this has been tested.