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

Fix divergence cleaning when a model has no real boundaries #269

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

sebastiangrimberg
Copy link
Contributor

This avoids solving a singular Laplace problem when calculating the scalar potential for a model with no real boundaries. For example, this can be observed by printing the output of divergence-free projection linear solve for the cavity example with PMC boundaries. After this PR, the divergence-free solves actually converge normally in a few iterations and the eigensolve converges as well.

Correctly handles the case of some subdomains having potentially no true dofs and just enforces a potential = 0 on the processor of lowest rank with some non-zero number of local true dofs.

…ple a structure which has only periodic boundaries
@sebastiangrimberg sebastiangrimberg added the bug Something isn't working label Jun 21, 2024
LeilaGhaffari added a commit to LeilaGhaffari/palace-lg that referenced this pull request Jun 25, 2024
Comment on lines 69 to 70
MPI_Comm_split(comm, color, Mpi::Rank(comm), &split_comm);
if (split_comm != MPI_COMM_NULL && Mpi::Root(split_comm))
Copy link
Collaborator

Choose a reason for hiding this comment

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

So there's only one dof on each processor with more than one dof correct?

Copy link
Contributor Author

@sebastiangrimberg sebastiangrimberg Jun 26, 2024

Choose a reason for hiding this comment

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

Yeah this was a silly overcomplication, thanks for pointing this out. Simplified in ee3dbd7.

@sebastiangrimberg sebastiangrimberg merged commit 1cdda0d into main Jun 26, 2024
17 checks passed
@sebastiangrimberg sebastiangrimberg deleted the sjg/div-free-singular-fix branch June 26, 2024 21:17
LeilaGhaffari added a commit to LeilaGhaffari/palace-lg that referenced this pull request Jul 3, 2024
Original/Duplicate pair for periodic boundary

No need for div free operator after awslabs#269: it doesn't fail when it is triply periodic but it cannot handle partially periodic meshes
LeilaGhaffari added a commit to LeilaGhaffari/palace-lg that referenced this pull request Jul 22, 2024
Original/Duplicate pair for periodic boundary

No need for div free operator after awslabs#269: it doesn't fail when it is triply periodic but it cannot handle partially periodic meshes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants