Skip to content

Adaptivity improvements #4184

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

Merged
merged 7 commits into from
Jun 17, 2025
Merged

Conversation

lindsayad
Copy link
Member

@lindsayad lindsayad commented Jun 3, 2025

@lindsayad lindsayad marked this pull request as draft June 3, 2025 18:42
@lindsayad lindsayad closed this Jun 11, 2025
@lindsayad lindsayad force-pushed the sc-with-adaptivity branch from 1db4795 to b57a129 Compare June 11, 2025 16:46
@lindsayad lindsayad reopened this Jun 11, 2025
@lindsayad lindsayad changed the title [WIP] Add support for adaptivity to static condensation Add support for adaptivity to static condensation Jun 11, 2025
@lindsayad lindsayad force-pushed the sc-with-adaptivity branch from 458dc7b to e9bb873 Compare June 11, 2025 17:20
@lindsayad lindsayad force-pushed the sc-with-adaptivity branch from e9bb873 to c4e48be Compare June 11, 2025 18:42
@moosebuild
Copy link

moosebuild commented Jun 11, 2025

Job Coverage, step Generate coverage on 7d2f546 wanted to post the following:

Coverage

Inconsistent report tags were found between the head and base reports.
This can happen when reports are missing from either the head or the base.

Inconsistent tags:
distributed_odd
Full coverage report

This comment will be updated on new commits.

@lindsayad lindsayad marked this pull request as ready for review June 11, 2025 21:02
@lindsayad
Copy link
Member Author

MetaPhysicL failure again 😦

@lindsayad lindsayad force-pushed the sc-with-adaptivity branch from 3d07782 to 24e132a Compare June 11, 2025 22:18
@lindsayad lindsayad requested a review from roystgnr June 12, 2025 03:23
This ensures that if there is no mesh refinement before another
call to project vectors that vector projection will work

Refs attempt to `disable_refine_in_reinit` in idaholab/moose#30742
@lindsayad lindsayad changed the title Add support for adaptivity to static condensation Adaptivity improvements Jun 12, 2025
lindsayad added a commit to lindsayad/moose that referenced this pull request Jun 12, 2025
lindsayad added a commit to lindsayad/moose that referenced this pull request Jun 12, 2025
Because we do not use the SC dof map in any way for solution projection.
And static condensation doesn't even make much sense without matrices
Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

I think I'm happy with this, though I'd love for @jwpeterson to take a look too.

std::unordered_map<processor_id_type, std::unordered_set<dof_id_type>> _nonlocal_uncondensed_dofs;

/// Used for temporary storage of uncondensed degrees of freedom active on an element
std::vector<dof_id_type> _elem_uncondensed_dofs;
Copy link
Member

Choose a reason for hiding this comment

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

Likewise for these two. Though I admit we're now up to three more arguments, and my suggestion is getting less compelling, it just feels confusing to have temporary storage saved as members.

Copy link
Member Author

Choose a reason for hiding this comment

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

So you would prefer this?

void StaticCondensationDofMap::add_uncondensed_dof(
    const dof_id_type full_dof_number,
    const bool involved_in_constraints,
    std::unordered_map<dof_id_type, dof_id_type> & uncondensed_global_to_local_map,
    std::unordered_set<dof_id_type> & local_uncondensed_dofs_set,
    std::unordered_map<processor_id_type, std::unordered_set<dof_id_type>> &
        nonlocal_uncondensed_dofs,
    std::vector<dof_id_type> & elem_uncondensed_dofs,
    dof_id_type & uncondensed_local_dof_number,
    std::unordered_set<dof_id_type> constraint_dofs)

Copy link
Member Author

Choose a reason for hiding this comment

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

c2bd8d6 uses local variables

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, honestly. It feels like that "scratch space" could be members of a nested class, even?

I wouldn't go that far now, though. If this was a public API I'd be anxious over getting the best design before we exposed it to users and had to support it, but with a private API we can redo at any time I'm just expressing mild preferences.

@roystgnr
Copy link
Member

We can merge without kicking that test - MetaPhysicL failure again. I'm so baffled by that one. LIBMESH_RUN doesn't affect MetaPhysicl make check and we don't set METAPHYSICL_RUN so we shouldn't be getting anything non-deterministic from MPI, and none of the unit tests there respect --n_threads= either.

@lindsayad lindsayad force-pushed the sc-with-adaptivity branch from c2bd8d6 to 7d2f546 Compare June 17, 2025 17:19
@lindsayad
Copy link
Member Author

I force pushed the last commit just with the blank line removals that @jwpeterson pointed out. I'll merge if/once this passes CI

@lindsayad lindsayad merged commit 307463b into libMesh:devel Jun 17, 2025
21 checks passed
@lindsayad lindsayad deleted the sc-with-adaptivity branch June 17, 2025 21:33
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.

4 participants