Skip to content

Add new CurlCurlSolve() to propagators#244

Closed
Monoclod wants to merge 4 commits into
struphy-hub:develfrom
Monoclod:devel
Closed

Add new CurlCurlSolve() to propagators#244
Monoclod wants to merge 4 commits into
struphy-hub:develfrom
Monoclod:devel

Conversation

@Monoclod
Copy link
Copy Markdown

Add a new propagator called CurlCurlSolve() to find weak solutions to the curl-curl problem.

Find $\mathbf{E} \in H(\textnormal{curl},\Omega)$ such that

$$ \int_\Omega (\nabla \times \mathbf F) \cdot (\nabla \times \mathbf E)\ \textrm{d} \mathbf x - \sigma \int_\Omega \mathbf F \cdot \mathbf E\ \textrm d \mathbf x = \sum_i \int_\Omega \mathbf F \cdot \mathbf J _i\ \textrm d \mathbf x \qquad \forall \mathbf F \in H(\textnormal{curl}), $$

where $\mathbf J _i:\Omega \to \mathbb R^3$ is a real-valued vector field and $\sigma \in \mathbb R$ is a scalar.
Boundary terms from integration by parts are assumed to vanish.

The equation is discretized as

$$ \left( \mathbb C^\top \cdot \mathbb M^2 \cdot \mathbb C - \sigma \mathbb M^1 \right)\cdot \boldsymbol e^{n+1} =\sum_i \mathbb P^1 \cdot \boldsymbol J _i , $$

where $M^1$ and $M^2$ are objects of the struphy.feec.mass.WeightedMassOperators class, and $\mathbb P^1$ is the projector into the space $V^1_h$.

The method does not converge properly for sufficiently high spline degrees and sufficiently fine mesh grids due to the inherent ill-conditionedness of the curl-curl problem; this should be solved by proper initial conditioning.

Add curl-curl solver to propagators
@spossann spossann added the good first issue Good for newcomers label May 13, 2026
@spossann
Copy link
Copy Markdown
Member

@Monoclod well done! Please add some tests that prove that the new propagator works. For the convergence of higher degrees, I suggest you take a function with more variations, so that the error is larger, and set tol=1e-7 in the solver.

Monoclod added 3 commits May 13, 2026 16:42
The file contains a 1d test and a 2d test; both can be performed in different directions with different spline degrees and mesh fineness
@Monoclod
Copy link
Copy Markdown
Author

Added a test for the propagator (and fixed a few comments). They seem to converge fine even for tolerances of 1e-10, oddly better than my previous attempt

@spossann
Copy link
Copy Markdown
Member

@Monoclod can you merge with devel to see if the tests pass?

@spossann spossann closed this May 20, 2026
@spossann
Copy link
Copy Markdown
Member

will be merged from another branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants