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

Make magnetic field configuration runtime choice #5548

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

nilsdeppe
Copy link
Member

Proposed changes

Closes #4562

We will also be able to add a mutator or something to add it to the numerical initial data. I haven't looked into that, but that'll allow us to superpose a B-field in BNS simulations quite easily.

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

@nilsdeppe nilsdeppe requested a review from kidder October 7, 2023 22:16
@nilsdeppe nilsdeppe changed the title Make magnetic field configuration rutime choice Make magnetic field configuration runtime choice Oct 7, 2023
@@ -194,32 +195,14 @@ class MagnetizedTovStar : public virtual evolution::initial_data::InitialData,
using tov_star = RelativisticEuler::Solutions::TovStar;

public:
struct PressureExponent {
using type = size_t;
struct MagneticFields {
Copy link
Member

Choose a reason for hiding this comment

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

update the class documentation to using arbitrary fields

2, 0.04, 2500.0, std::array{0.0, 0.0, 0.0}, 100.0),
std::make_unique<
grmhd::AnalyticData::InitialMagneticFields::Toroidal>(
2, 0.04, 2500.0, std::array{0.0, 0.0, 0.0}, 100.0))));
Copy link
Member

Choose a reason for hiding this comment

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

Add a test where you compare the created B field from two different solutions where the InitialMagneticField pointers are in order (Poloidal, Toroidal) vs (Toroidal, Poloidal)

@nilsdeppe
Copy link
Member Author

Rebased and pushed fixups. Thanks for the review!

@nilsdeppe nilsdeppe merged commit 06b2395 into sxs-collaboration:develop Oct 20, 2023
22 checks passed
@nilsdeppe nilsdeppe deleted the bns_simulations branch October 20, 2023 02:13
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