Skip to content

Add give_opposite!/post_mutation! callbacks to CoupledDofsRestriction - #143

Open
pjaap wants to merge 4 commits into
masterfrom
feature/post_mutation_coupling
Open

pjaap wants to merge 4 commits into
masterfrom
feature/post_mutation_coupling

Conversation

@pjaap

@pjaap pjaap commented Sep 8, 2026

Copy link
Copy Markdown
Member
  • CoupledDofsRestriction now accepts optional give_opposite! and post_mutation! functions to support arbitrary mutation operators (e.g. flipped velocity components for periodic Stokes problems)
  • Add Example266_PeriodicStokes demonstrating periodic Navier--Stokes with divergence-free convection reconstruction

- CoupledDofsRestriction now accepts optional give_opposite! and
  post_mutation! functions to support arbitrary mutation operators
  (e.g. flipped velocity components for periodic Stokes problems)
- Add Example266_PeriodicStokes demonstrating periodic Navier--Stokes
  with divergence-free convection reconstruction
This removes the requirement for give_opposite! to be symmetric
@pjaap

pjaap commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

I flipped the box finding logic in get_periodic_coupling_matrix to remove the requirement of give_opposite! to be symmetric. Therefore an atranspose is called after the adjacency is computed.

Hopefully this does not break anything. One really needs to be careful not to mix up local (boundary) and global face numbers and distinguish between values and indices.

@pjaap

pjaap commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Moreover, the interpolation is now done precisely on ON_BFACES instead of ON_FACES @chmerdon this should be fine, right?

Comment thread examples/Example266_PeriodicStokes.jl Outdated
Comment thread examples/Example266_PeriodicStokes.jl Outdated
Comment thread examples/Example266_PeriodicStokes.jl Outdated
Comment thread src/common_restrictions/coupled_dofs_restriction.jl Outdated
@pjaap

pjaap commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Updated the intro text and replaced give_opposite! with source_target_transform!

@pjaap
pjaap force-pushed the feature/post_mutation_coupling branch from dec9f77 to afce56e Compare September 9, 2026 11:27
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.

2 participants