Update for consistency with Gala#219
Conversation
…ields. Origin for getFields can be (0, 0, 0) with an optional toggle.
There was a problem hiding this comment.
Pull request overview
Updates the EXP basis evaluation APIs to be consistent with Gala by making getAccel() / getFields() evaluate in the coefficient-defined coordinate origin (with an opt-out for getFields(..., origin=true)), and adjusts header installation/including for CUDA-related headers.
Changes:
- Add an
originboolean toBasis::getFields/getFieldsCoefsand plumb it through the pybind layer. - Shift
computeAccelimplementations to use the coefficient center (coefctr) sogetAccel()operates in simulation coordinates. - Install CUDA
.cuHheaders publicly and update internal includes to use quoted form ("...").
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
pyEXP/BasisWrappers.cc |
Updates Python bindings/signatures and docstrings for the new origin behavior. |
include/SLGridMP2.H |
Switch CUDA header includes to quoted form for installed-header resolution. |
include/EmpCylSL.H |
Same include-path adjustment for CUDA headers. |
include/cudaParticle.cuH |
Adjust include style to quoted form to work from installed include directories. |
include/cudaMappingConstants.cuH |
Same include-path adjustment for CUDA headers. |
include/BiorthCyl.H |
Consolidate/add CUDA includes under HAVE_LIBCUDA==1 with quoted includes. |
include/BiorthCube.H |
Same CUDA include consolidation as BiorthCyl.H. |
expui/CMakeLists.txt |
Adds CUDA .cuH headers to the public installed header set. |
expui/BiorthBasis.cc |
Applies coefficient-center shifting inside computeAccel; updates an internal getFields call to use origin=true. |
expui/BasisFactory.H |
Extends the public Basis API with origin parameter (virtual signature change). |
expui/BasisFactory.cc |
Implements centering logic for getFields / getFieldsCoefs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/5f75bca1-eb95-4f51-8ab6-9272eb114eca Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/56a9b4d8-bfcc-4bf8-9b5d-ccaa48888105 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/56a9b4d8-bfcc-4bf8-9b5d-ccaa48888105 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
…getFieldsCoefs Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/48c9ee4b-35ac-4a63-b3cb-8ecac31ecc71 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
| // Shift to center | ||
| x -= coefctr(0); | ||
| y -= coefctr(1); | ||
| z -= coefctr(2); | ||
|
|
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Implemented in d650ae1. Cylindrical::computeAccel now guards the R==0 case after centering, initializing in-plane components to zero and only performing the x/R, y/R conversion when R > 0.0.
| // Shift to center | ||
| x -= coefctr(0); | ||
| y -= coefctr(1); | ||
| z -= coefctr(2); | ||
|
|
There was a problem hiding this comment.
@copilot apply changes based on this feedback
| // Shift to center | ||
| x -= coefctr(0); | ||
| y -= coefctr(1); | ||
| z -= coefctr(2); | ||
|
|
There was a problem hiding this comment.
@copilot apply changes based on this feedback
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/588ca0c8-f717-4041-8cf3-86e2c5314792 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Feature update
The
getAccelandgetFieldsAPI now evaluate in the coordinate origin specified by the coefficients. Previous behavior required the user to supply the desired center.Details
getAccel()has the same call signature in the API but now uses the center metadata fields in the registered coefficient instance so that the coordinates are simulation coordinatesgetFields()' retains the original behavior. If one needs the same behavior asgetAccel(), one supplies the optional boolean fieldorigin=false`.Warnings
While not formally an API-breaking change, any workflows that use either of these two member functions and assumed expansion origin will find that they now are using the original simulation origin. For this reason, I am basing this PR on devel.
Additional minor fix
Updated the public header target to include CUDA-specific files.
ToDo