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

Support weak form in elliptic DG #5679

Merged
merged 4 commits into from
Dec 17, 2023

Conversation

nilsvu
Copy link
Member

@nilsvu nilsvu commented Dec 16, 2023

Proposed changes

Almost gets the elliptic solver to work on large sphere domains! The attached Lorentzian.yaml configuration works, only BBH ID needs some more treatment (next PR).

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

Allows to use this with buffers that have tags other than
Tags::div<FluxTags>. For example, the elliptic DG operator
buffers the divergence directly in the output.
@nilsvu nilsvu force-pushed the elliptic_weak_form branch 2 times, most recently from e8697e0 to 1c80301 Compare December 16, 2023 03:28
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! A couple suggestions. Feel free to squash & rebase right away!

@@ -74,9 +78,19 @@ void InitializeGeometry<Dim>::operator()(
*inertial_coords =
element_map->operator()(*logical_coords, 0., functions_of_time);
// Jacobian
// Note: we can try to use `::dg::metric_identity_jacobian_quantities` here.
// When I tried (NV, Dec 2022) the DG residuals diverged on a sphere domain
Copy link
Member

Choose a reason for hiding this comment

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

Q: Dec. 2022 or Dec. 2023?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops 👍

for (size_t i = 0; i < lhs.size(); ++i) {
lhs[i] += 0.5 * rhs[i];
lhs[i] += sign * 0.5 * rhs[i];
Copy link
Member

Choose a reason for hiding this comment

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

[optional] consider precomputing sign * 0.5 outside the loop. That multiplication is 1/3 the FLOPS in this expression. At least a few years ago, compilers weren't doing that automatically :(

@nilsdeppe nilsdeppe added the auto-merge GitHub's auto-merge has been enabled for this PR. label Dec 17, 2023
@nilsdeppe nilsdeppe merged commit e8c48be into sxs-collaboration:develop Dec 17, 2023
22 checks passed
@nilsvu nilsvu deleted the elliptic_weak_form branch December 17, 2023 03:15
@nilsvu nilsvu mentioned this pull request Dec 20, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge GitHub's auto-merge has been enabled for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants