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

WIP: [Breaking] Linear Solver Updates #1174

Open
wants to merge 58 commits into
base: develop
Choose a base branch
from

Conversation

lroberts36
Copy link
Collaborator

@lroberts36 lroberts36 commented Sep 12, 2024

PR Summary

This PR adds a number of solver related things:

  • Adds a CG solver. I am not sure how useful this is since it seems to work poorly with AMR and multigrid preconditioning, but I think it is at least nice to have in there for testing.
  • Adds simple diagonal preconditioners for CG and BiCGSTAB
  • Adds the option to use a user defined task for prolongation in during multigrid solves instead of the prolongation facilities provided by the Parthenon infrastructure. This more easily allows for physical boundary aware prolongation operators.
  • Adds a number of different boundary aware prolongation operators (constant, bilinear, and Kwak) to the poisson_gmg example.
  • Adds explicit setting of boundary fluxes and fluxes at refinement boundaries in the poisson_gmg example.
  • Adds a base class for solvers to simplify switching between solvers for downstream codes
  • Adds stage based solvers that can include multiple separate variables as part of the state vector.

To facilitate these changes to the solvers and examples, two small changes are made to the rest of the infrastructure:

  • Extends the neighbor information that @brryan put into SparsePacks to work with multigrid neighbors and include physical boundary information as well. This is a breaking change, since now physical boundaries are denoted with a large, negative level in the array containing neighbor information in SparsePack
  • Adds a mechanism for getting a flat index from a multi-d Indexer.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

@lroberts36 lroberts36 changed the title WIP: MG Preconditioned CG solver Linear Solver Updates Sep 26, 2024
@lroberts36 lroberts36 changed the title Linear Solver Updates [Breaking] Linear Solver Updates Sep 26, 2024
@lroberts36 lroberts36 changed the title [Breaking] Linear Solver Updates WIP: [Breaking] Linear Solver Updates Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaks-downstream enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants