-
Notifications
You must be signed in to change notification settings - Fork 8
Minor updates to field coefficient bases and OutVel #143
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
Conversation
…ordinate transformation which works way better for power laws and exponentials
…mass; this doesn't affect any computation in EXP so far
…locityBasis constructor
…' field sufficies'; (2) fix a shadowing error in the density file construction that did not set the class version of 'rmin' and 'rmax' from the file resulting in a poor basis construction if 'rmin' and 'rmax' were *not* set in the configuration file as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a failing Zang disk velocity test by updating the basis limits, removes redundant "weight" fields, and introduces support for using "mmax" in cylindrical field coefficient calculations. Key changes include:
- Removal of obsolete keys in OutVel configuration.
- Updates to the OrthoFunction interface and internal usage following the removal of the "segment" parameter.
- Adjustments in integration and coefficient assignment in Mestel disk and FieldBasis routines.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/OutVel.cc | Removes obsolete keys from configuration before constructing basis. |
pyEXP/CoefWrappers.cc | Updates docstring to reflect cylindrical coefficient output. |
include/OrthoFunction.H | Removes the 'segment' parameter and associated member variable. |
exputil/mestel.cc | Adjusts integration weighting to improve mass calculation accuracy. |
exputil/OrthoFunction.cc | Revises indexing and removes the use of the 'segment' parameter. |
expui/FieldBasis.cc | Streamlines key processing, updates coefficient dimensions, and refines spherical evaluation. |
Comments suppressed due to low confidence (2)
exputil/mestel.cc:161
- The integration formula has been altered by weighting 'lst' with (rr-dr) instead of rr. Please verify that this change correctly reflects the intended radial integration for the disk mass calculation.
cum += 0.5*dr*(lst*(rr-dr) + cur*rr) * 2.0*M_PI;
expui/FieldBasis.cc:460
- The change from using 'rsqrt(fabs(1.0 - costhcosth))' to 'r' as input for poly_eval in the spherical evaluation may affect the computed coefficients. Please confirm that this adjustment is intentional.
auto p = (*ortho)(r);
…consquences in the C++ code from the pybind11 mapping
New updates include:
To DoWould be really useful for someone besides me to try this stuff...I'm still a bit nervous after the last go around that issues still lurk. |
Looks good to me. I fixed one typo in the comments and suppressed one warning in I also bumped the version. This looks good to go to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Yes, the base class (gen2d in this case) should have a virtual destructor, not that it would matter much for this case. How did you catch that??
I'll do the merge. We can sort additional issues later, if they arise. After all, this is a really a bug fix. |
These changes result from tracking down weirdness in the
pyEXP
Zang disk velocity testweight
field from the field return. This is the same asdensity
so both redundant and confusing.mmax
instead oflmax
for cylindrical field coefficients.OrthoFunction
class in favor of the usual coodrdinate mapping set by thermapping
key.OrthoFunction
for an exponential density weight, demonstrating the recovery of the generalized Laguerre polynomials to high accuracy (e.g. 1 inTo be done