-
Notifications
You must be signed in to change notification settings - Fork 191
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 BoostVelocity option to ShapeMap #6363
base: develop
Are you sure you want to change the base?
Conversation
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.
Some questions about angles that I have to think about a bit 🤔
struct BoostVelocity { | ||
using type = std::array<double, 3>; | ||
static constexpr Options::String help = { | ||
"Boost velocity to transform horizon with in Cartesian Kerr-Schild " |
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.
Fix sentence
@@ -17,9 +17,10 @@ template <typename DataType> | |||
Scalar<DataType> kerr_horizon_radius( | |||
const std::array<DataType, 2>& theta_phi, const double mass, | |||
const std::array<double, 3>& dimensionless_spin) { |
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.
Take the boost velocity as an argument here as well, can't hurt
*/ | ||
template <typename DataType> | ||
Scalar<DataType> kerr_schild_radius_from_boyer_lindquist( | ||
const double boyer_lindquist_radius, | ||
const std::array<DataType, 2>& theta_phi, double mass, | ||
const std::array<double, 3>& dimensionless_spin); | ||
const std::array<double, 3>& dimensionless_spin, | ||
const std::array<double, 3>& boost_velocity); |
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.
Default this to zero, then you don't have to change some places where you call this function with zero boost.
1.0 / (1.0 - (square(boost_velocity_x) + square(boost_velocity_y) + | ||
square(boost_velocity_z))); | ||
|
||
Scalar<DataType> unboosted_kerr_schild_radius = |
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.
Move this up and return it directly if the boost is zero.
Scalar<DataVector> boosted_radius = Scalar<DataVector>{ | ||
sqrt(square(get<0>(boosted_coords)) + square(get<1>(boosted_coords)) + | ||
square(get<2>(boosted_coords)))}; |
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.
magnitude(boosted_coords)
// Boosted horizon should be equivalent to applying Lorentz transformation | ||
// on unboosted coordinates. | ||
CHECK_ITERABLE_APPROX( | ||
kerr_schild_radius_from_boyer_lindquist(r_plus, theta_phi, mass, |
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.
Maybe I have to think about this more, but I am confused about angles. The angles passed in here should be in the boosted frame I think. So these should be the angles you get when you transform the boosted Cartesian coords to polar coords.
* Kerr-Schild coordinates and find that the boosted Kerr-Schild radius \f$r'\f$ | ||
* as a function of angles satisfies | ||
* \f[ | ||
* r'^2 = r^2 (1 + \gamma^2 \left( \beta_x\cos\phi\sin\theta + |
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.
Are these angles in the boosted or unboosted frame? I think they should be in the boosted frame (see comment in the test below).
Proposed changes
Allows for boosted Kerr horizons in ShapeMap by adding a
boost_velocity
argument togr::Solutions::kerr_schild_radius_from_boyer_lindquist
. The previously returned Kerr-Schild radius is now Lorentz boosted before being returned. The new input optionBoostVelocity
, which takes an array of three doubles, has been added toShapeMap
.Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.