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

Replace Kerr-Schild with Spherical-Kerr-Schild for FishboneMoncriefDisk #5800

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

jyoo1042
Copy link
Contributor

Proposed changes

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

Copy link
Member

@wthrowe wthrowe left a comment

Choose a reason for hiding this comment

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

I'm confused about what is going on with the mass and spin. It seems that some places are being hardcoded to 1 and 0, but not all places.

@@ -270,7 +272,7 @@ struct EvolutionMetavars<tmpl::list<InterpolationTargetTags...>,
::Events::Tags::ObserverMesh<volume_dim>,
::Events::Tags::ObserverInverseJacobian<
volume_dim, Frame::ElementLogical, Frame::Inertial>>>,
error_tags,
error_tags, dt_tags,
Copy link
Member

Choose a reason for hiding this comment

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

Observing the time derivatives is a bad idea. You don't get the current value, but rather whatever the last RHS evaluation was, which was probably at a different time and possibly on a substep.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this commit.

tmpl::push_back<tags<DataType, Frame>,
typename internal_tags::inv_jacobian<DataType, Frame>>;

// Overload and call the second one.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this comment.

// to do transformation below. copy x into x_sks and alter at each
// element index s.
const double sks_to_ks_factor =
sqrt(r_squared + square(fm_disk_.bh_spin_a_)) / radius;
Copy link
Member

Choose a reason for hiding this comment

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

Drop spin term? You seem to be changing it to zero everywhere else.

Copy link
Member

Choose a reason for hiding this comment

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

This is correct. I was confused before.

for (size_t i = 0; i < 3; ++i) {
get_element(magnetic_field_sks.get(j), s) +=
get_element(inv_jacobians.get(j, i), s) *
get_element(magnetic_field_ks.get(i), s);
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't need to be done pointwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed it.

@@ -111,19 +111,21 @@ void test_serialize() {

template <typename DataType>
void test_variables(const DataType& used_for_size) {
const double bh_mass = 1.12;
// const double bh_mass = 1.12;
const double bh_mass = 1.;
Copy link
Member

Choose a reason for hiding this comment

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

Revert? Drop comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dropped the comment and changed the mass from 1.

# normalization resolution for a faster testing.
# normalization = 1.71896376101037762218 # 51 before the change
normalization = 1.3733086119266160185503622 # 51 after the change
# normalization = 1.3686080052126354811292686 # 255 after the change.
Copy link
Member

Choose a reason for hiding this comment

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

"the change"?

// Test a few of the GR components to make sure that the implementation
// correctly forwards to the background solution of the base class.
// // Test a few of the GR components to make sure that the implementation
// // correctly forwards to the background solution of the base class.
Copy link
Member

Choose a reason for hiding this comment

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

Change back.

Catch::Matchers::ContainsSubstring(
"Value 2 is below the lower bound of 4"));
#ifdef SPECTRE_DEBUG
CHECK_THROWS_WITH(
Copy link
Member

Choose a reason for hiding this comment

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

Something went wrong with the formatting in this section. The original version looked correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you talking about the extra indentation?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

get<gr::Tags::Shift<DataType, 3>>(
background_spacetime_.variables(
x, 0.0, tmpl::list<gr::Tags::Shift<DataType, 3>>{},
make_not_null(&vars->sph_kerr_schild_cache)))
Copy link
Member

Choose a reason for hiding this comment

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

Compute this outside the loop. I think it can even go outside the lambda.

Copy link
Member

Choose a reason for hiding this comment

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

Ping. Also move inv_jacobians, now that I look harder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

get_element(get(get<gr::Tags::Lapse<DataType>>(
background_spacetime_.variables(
x, 0.0, tmpl::list<gr::Tags::Lapse<DataType>>{},
make_not_null(&vars->sph_kerr_schild_cache)))),
Copy link
Member

Choose a reason for hiding this comment

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

Same as for the shift.

Copy link
Member

Choose a reason for hiding this comment

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

Ping.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

// to do transformation below. copy x into x_sks and alter at each
// element index s.
const double sks_to_ks_factor =
sqrt(r_squared + square(fm_disk_.bh_spin_a_)) / radius;
Copy link
Member

Choose a reason for hiding this comment

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

This is correct. I was confused before.

get<gr::Tags::Shift<DataType, 3>>(
background_spacetime_.variables(
x, 0.0, tmpl::list<gr::Tags::Shift<DataType, 3>>{},
make_not_null(&vars->sph_kerr_schild_cache)))
Copy link
Member

Choose a reason for hiding this comment

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

Ping. Also move inv_jacobians, now that I look harder.

get_element(get(get<gr::Tags::Lapse<DataType>>(
background_spacetime_.variables(
x, 0.0, tmpl::list<gr::Tags::Lapse<DataType>>{},
make_not_null(&vars->sph_kerr_schild_cache)))),
Copy link
Member

Choose a reason for hiding this comment

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

Ping.

Catch::Matchers::ContainsSubstring(
"Value 2 is below the lower bound of 4"));
#ifdef SPECTRE_DEBUG
CHECK_THROWS_WITH(
Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Member

@wthrowe wthrowe left a comment

Choose a reason for hiding this comment

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

Please push fixup commits in the future.

@wthrowe wthrowe merged commit 8126111 into sxs-collaboration:develop Feb 28, 2024
22 checks passed
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.

2 participants