Skip to content

Conversation

@yoonso0-0
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

@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch 2 times, most recently from 95111cd to bcdfc3a Compare November 2, 2022 21:35
* \f$e^{abcd}\f$ and \f$e^{ijk}\f$ are usual antisymmetric _symbols_ (which
* only have the value \f$\pm 1\f$) with 4 and 3 indices, respectively, with the
* convention \f$e^{0123} = e^{123} = +1\f$.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

We use the (sensible) convention e_{0123}=+1!

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with @teukolsky!

@yoonso0-0, just so that I follow the convention here: e is just [abcd], and epsilon is the tensor, right?
So that epsilon_{0123} = -epsilon^{0123} = +1; but e_{0123} = e^{0123} = +1 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! I missed the point that e was the permutation symbol and epsilon the tensor. It's best not to treat the indices of e as things that can be raised or lowered, so as to avoid confusion. A good notation is e=[\alpha \beta \gamma \delta], with [0123]=+1. Then there's no confusion: \epsilon_{\alpha\beta\gamma\beta]=1/\sqrt{\det{-g}} [\alpha\beta\gamma\delta].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ermost correct :) @teukolsky sorry for the confusion! I'll update the docs.

* \f$e^{abcd}\f$ and \f$e^{ijk}\f$ are usual antisymmetric _symbols_ (which
* only have the value \f$\pm 1\f$) with 4 and 3 indices, respectively, with the
* convention \f$e^{0123} = e^{123} = +1\f$.
*
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with @teukolsky!

@yoonso0-0, just so that I follow the convention here: e is just [abcd], and epsilon is the tensor, right?
So that epsilon_{0123} = -epsilon^{0123} = +1; but e_{0123} = e^{0123} = +1 ?

"Options related to constraint damping"};
using group = ForceFreeGroup;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

The force-free current includes a damping term, that acts as an effective resistivity.
It might make sense to add an option for that, too. Sometimes this needs to be adjusted.
Eta might be a good name; it has the same dimensions as the Kappa's

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out!

From your paper I see Nu was used and in Alic's paper SigmaB was used. I think we can use Eta when we describe our equations, but would prefer some descriptive name inside the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

something like RelaxationParameter? I cannot think of a good name on this, but I can put this parameter in a separate option group named like ForceFreeCurrent:

Copy link
Contributor

Choose a reason for hiding this comment

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

How about ParallelConductivity? Physically that parameter is the conductivity parallel to magnetic field lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds nice 👍

@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch 2 times, most recently from f856de6 to 07fe16c Compare November 3, 2022 20:52
@yoonso0-0
Copy link
Contributor Author

Rebased and pushed fixups

@yoonso0-0 yoonso0-0 requested a review from ermost November 3, 2022 20:57
ermost
ermost previously approved these changes Nov 4, 2022
Copy link
Contributor

@ermost ermost left a comment

Choose a reason for hiding this comment

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

fixUps look good to me

ermost
ermost previously approved these changes Nov 4, 2022
namespace ForceFree {

namespace detail {
void fluxes_impl(
Copy link
Member

Choose a reason for hiding this comment

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

Change the detail namespace to an anonymous namespace. Alternatively, combine this function with the one that calls it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nilsdeppe I think I asked about this to you before, on separating _impl function inside a detail namespace. If I remember correctly this is for reducing memory allocations when computing the DG time derivative.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wthrowe GRMHD is also using this _impl splitting

Copy link
Member

Choose a reason for hiding this comment

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

Yes, in the GRMHD system it's done because we need to compute the fluxes and sources on different grids with FD


tilde_e_flux->get(j, i) += -get(lapse) * it.sign() *
tilde_b_one_form.get(k) /
get(sqrt_det_spatial_metric);
Copy link
Member

Choose a reason for hiding this comment

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

Move it.sign() to immediately after the -. This reduces the number of DataVector math operations by one. General rule is to put all non-DataVector factors first.

Optional: the one_form variables are only used in the combination lapse * one_form / sqrt_det_spatial_metric, so those factors could be included in the precomputed value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed a fixup for this.

@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch 2 times, most recently from 0c5d991 to e51c178 Compare November 8, 2022 23:51
@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch from e51c178 to 2c71146 Compare November 15, 2022 17:43
@yoonso0-0
Copy link
Contributor Author

yoonso0-0 commented Nov 15, 2022

Rebased and pushed fixup. I interchanged Psi and Phi part in the docs to match the code arguments order

@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch from 2c71146 to df2aa9f Compare November 16, 2022 03:12
@yoonso0-0
Copy link
Contributor Author

@wthrowe I pushed another fixup taking care of what's addressed in #4381

@wthrowe
Copy link
Member

wthrowe commented Nov 17, 2022

Will this system use subcell? I'm not familiar enough with it to know what typical results look like.

@nilsdeppe
Copy link
Member

Yes

@wthrowe
Copy link
Member

wthrowe commented Nov 17, 2022

OK, sounds good then. Go ahead and squash.

@yoonso0-0 yoonso0-0 force-pushed the ffe/add_tags_and_fluxes branch from df2aa9f to 795c5dd Compare November 17, 2022 20:39
@nilsdeppe nilsdeppe merged commit b2ebf67 into sxs-collaboration:develop Nov 19, 2022
@yoonso0-0 yoonso0-0 deleted the ffe/add_tags_and_fluxes branch November 20, 2022 01:25
@yoonso0-0
Copy link
Contributor Author

yoonso0-0 commented Nov 20, 2022

Thanks for the review!

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.

5 participants