Skip to content
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

add a distance() function and subtract off problem::center in position() #2988

Draft
wants to merge 11 commits into
base: development
Choose a base branch
from

Conversation

zhichen3
Copy link
Collaborator

@zhichen3 zhichen3 commented Nov 7, 2024

PR summary

  1. Adds a separate function to calculate distance, mainly because the old way gets the 2d spherical case wrong.
  2. Also subtracts off problem::center in position(). I think that's done in all cases where we call position except in rad_util.H, but that happens only in nonCartesian coordinate, and problem::center should be 0 at those cases. So I think it doesn't affect things.
  3. Most places calculate the position separately, I changed it to using position()
  4. Also make sure problem::center is 0 for spherical2d

PR motivation

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite to more than roundoff level
  • all newly-added functions have docstrings as per the coding conventions
  • the CHANGES file has been updated, if appropriate
  • if appropriate, this change is described in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant