Skip to content

bugfix: rwg projectors#190

Open
PaulOlyslager wants to merge 1 commit intokrcools:masterfrom
PaulOlyslager:bugfix/projectors
Open

bugfix: rwg projectors#190
PaulOlyslager wants to merge 1 commit intokrcools:masterfrom
PaulOlyslager:bugfix/projectors

Conversation

@PaulOlyslager
Copy link
Copy Markdown
Contributor

  • switched DualLoops and DualStars
  • fixed iterative projectors for rwg

- switched DualLoops and DualStars
- fixed iterative projectors for rwg
@PaulOlyslager PaulOlyslager mentioned this pull request Feb 19, 2026
@krcools
Copy link
Copy Markdown
Owner

krcools commented Apr 4, 2026

@cmuenger are you happy with this?

@cmuenger
Copy link
Copy Markdown

cmuenger commented Apr 4, 2026

I'm a bit concerned about the inconsistency between using the projectors for RT and GWP basis functions. With @PaulOlyslager's changes in this PR, the iterative computation of the projectors for RT basis functions now yields the actual projectors, which is probably what a user expects.

However, for the computation to be efficient for higher-order basis functions, the computation is off by a factor of a Gram matrix (to avoid the computation of the inverse square root of a matrix). Thus, the higher-order projectors must be compensated by an inverse Gram matrix placed between them. This has to be done actively when using higher-order projectors. This does not affect the Bourhis Theta, since the Theta operator contains the Gram matrices in between the projectors.

In the lowest-order case, the Gram matrix whose square root is needed appears to be diagonal, see Paul's changes.

Regarding the name change, do we now have the following naming convention? @PaulOlyslager
Stars: Local stars -> P\Sigma = \Sigma (\Sigma^T*\Sigma)^+ \Sigma^T
Loops: Local loops + global loops -> P\Lambda H = I - P \Sigma

Dual stars: Local loops -> \mathbb{P}\Lambda = \Lambda(\Lambda^T\Lambda)^+\Lambda^T
Dual loops: Local stars + global loops -> \mathbb{P}\Sigma H = I-\mathbb{P}\Lambda

For clarity, the convenience functions P\Lambda and \mathbb{P}\Sigma should be renamed to P\LambdaH and \mathbb{P}\SigmaH. This issue goes back to my initial code, where I did not make this proper distinction. But if we improve the usability of the qH-projector code in this PR, we should also include this small tweak.

@PaulOlyslager
Copy link
Copy Markdown
Contributor Author

I think this inconsistency has its roots in the theory, I just made sure that if you use iterative or direct on the projection object you end up with the same operator. Maybe we can introduce an abstract type: l2 projector and L2 projector because that is in essence the difference.

The naming convention is indeed, I agree to add the letter H for clarity.
Stars: Local stars -> P\Sigma = \Sigma (\Sigma^T*\Sigma)^+ \Sigma^T
Loops: Local loops + global loops -> P\Lambda H = I - P \Sigma

Dual stars: Local loops (on primal mesh) -> \mathbb{P}\Lambda = \Lambda(\Lambda^T\Lambda)^+\Lambda^T
Dual loops: Local stars (on primal mesh) + global loops -> \mathbb{P}\Sigma H = I-\mathbb{P}\Lambda

@cmuenger
Copy link
Copy Markdown

cmuenger commented Apr 9, 2026

Yes, consistency between direct and iterative is more important than between different basis functions.

I think the abstract types are a good idea. It allows for flexibility to implement l2 or L2 projectors in other cases. We probably should document/ add comments to the code to clarify this difference between the projectors for RWG and GWP.

If we introduce the l2 and L2 projectors, should the initial implementation I did be revived? However, not as the default as Paul's implementation follows the "standard" framework for quasi-Helmholtz projectors.

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.

3 participants