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 EffectiveSource code #6400

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nilsvu
Copy link
Member

@nilsvu nilsvu commented Dec 9, 2024

Proposed changes

Bundles the EffectiveSource (https://github.com/barrywardell/EffectiveSource) code in external/ (GPL MIT licensed). This is a widely used code in the self-force community to compute the effective source of a scalar point charge in Kerr spacetime.

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@nilsvu nilsvu requested a review from a team December 10, 2024 23:38
@kidder
Copy link
Member

kidder commented Dec 11, 2024

why are we putting this into spectre and not just using it as an optional external dependency?

@nilsvu
Copy link
Member Author

nilsvu commented Dec 11, 2024

It won't ever change and is easier to bundle than to install as an extra dependency (in a recent effort to make the code easier to use we have been bundling other dependencies like libsharp as well). It's one .c file, and the original repo doesn't even have a build system, so it's easier to bundle the .c file.

@nilsdeppe
Copy link
Member

Can you ask Barry if he'd be willing to relicense to something more permissive so we don't have to worry about GPL things again?

@nilsvu
Copy link
Member Author

nilsvu commented Dec 11, 2024

Ok I'll ask!

@nilsvu
Copy link
Member Author

nilsvu commented Jan 21, 2025

The code is licensed under MIT now 👍 I updated this PR

nilsdeppe
nilsdeppe previously approved these changes Jan 21, 2025
Copy link
Member

@nilsdeppe nilsdeppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for working with Barry to get the license changed!

Comment on lines +3 to +9
add_library(${LIBRARY} kerr-circular.c)

target_link_libraries(
${LIBRARY}
PRIVATE
GSL::gsl
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't matter until we get other dependencies worked out so tracking doesn't tell us we are broken. We could add the header files to track those as well. Up to you :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok sure added the add_interface_lib_headers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I think there are still some bugs in how to do this (I have another repo where I fixed it and need to backport). Just remove it for now, sorry!

#include <gsl/gsl_sf_ellint.h>

/* The particle's coordinate location and 4-velocity */
static struct coordinate xp;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an FYI, I'm worried all of this code isn't threadsafe., but I haven't looked in detail and I don't know if it matters :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep probably not threadsafe, I've been working around that when calling the functions

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.

3 participants