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

Complex-valued coarse preconditioner #310

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

simlapointe
Copy link
Contributor

@simlapointe simlapointe commented Dec 10, 2024

This change uses the true complex-valued system matrix for the coarse solve (sparse direct solve) instead of the real-valued approximation. We still use the real-valued sparse matrix libraries and pass the 2x2 block matrix [A_r -A_i; A_i A_r] to the solver. Further speedup could be obtained by using complex-valued sparse matrix libraries, but this would require a bit more work, including updating MFEM interfaces.

@simlapointe simlapointe requested a review from hughcars December 10, 2024 20:34
@simlapointe simlapointe added enhancement New feature or request performance Related to performance labels Dec 10, 2024
@simlapointe simlapointe linked an issue Dec 10, 2024 that may be closed by this pull request
@simlapointe simlapointe marked this pull request as ready for review December 10, 2024 21:30
Copy link
Collaborator

@hughcars hughcars left a comment

Choose a reason for hiding this comment

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

Tried it out with MGMaxLevels 1 on the cavity, great that the ksp solves in a single iteration now (with an exact preconditioner effectively).

I pushed a branch with some suggested changes hughcars/complex-pc:

  1. A new SetSubVector to avoid the use of idx.
  2. Reordering some callsites to put IoData ahead of all across the code base. This then means the variadic function avoids using an extra argument for data that was already being pass in as part of IoData.

palace/linalg/ksp.cpp Outdated Show resolved Hide resolved
palace/linalg/solver.cpp Outdated Show resolved Hide resolved
scripts/schema/config/solver.json Outdated Show resolved Hide resolved
@simlapointe simlapointe requested a review from hughcars December 18, 2024 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Related to performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complex-valued coarse solver
2 participants