Skip to content

Add InterfaceExactDerivativeMatrix for conforming meshes - #497

Draft
PaulineVidal wants to merge 134 commits into
develfrom
pvidal_interface_derivative_matrix
Draft

Add InterfaceExactDerivativeMatrix for conforming meshes#497
PaulineVidal wants to merge 134 commits into
develfrom
pvidal_interface_derivative_matrix

Conversation

@PaulineVidal

@PaulineVidal PaulineVidal commented Jan 12, 2026

Copy link
Copy Markdown
Collaborator

Add an operator which computes the coupled interface derivatives along a direction with the exact formula.

Description

InterfaceDerivativeMatrix solves the following matrix system,

$$\begin{bmatrix} s'(\mathcal{X}_1) \\\ \vdots \\\ s'(\mathcal{X}_I) \\\ \vdots \\\ s'(\mathcal{X}_{N-1}) \end{bmatrix} = \begin{bmatrix} 1 & -a^1 & \dots & & \\\ -b^2 & 1 & -a^2 & \dots & \\\ \vdots & & & & \\\ & & \ddots & & \\\ & \cdots & -b^{N-1} & 1 & \\\ \end{bmatrix} \begin{bmatrix} c^1 - b^1 s'(\mathcal{X}_0) \\\ \vdots \\\ c^I \\\ \vdots \\\ c^{N-1} - a^{N-1}s'(\mathcal{X}_{N}) \end{bmatrix}$$

We write it as follows, $S = (I -M)^{-1}C.$

It allows us to compute the interface derivatives in 1D.

InterfaceDerivativeMatrix operator deals with 2D patches applying this 1D formula.

It means on the following case, (implemented test case)
image

we build a InterfaceDerivativeMatrix in the directions,

  • 1|2|3 with periodic boundary conditions,
  • 4|5|6 with periodic boundary conditions,
  • 7|8|9 with periodic boundary conditions,
  • 1|4|7 with "Greville" boundary conditions,
  • 2|5|8 with "Greville" boundary conditions,
  • 3|6|9 with "Greville" boundary conditions.

InterfaceDerivativeMatrix stores SingleInterfaceDerivativeCalcultor defined and instantiated before.
The matrix $(I-M)$ can be defined at the instantiation of InterfaceDerivativeMatrix and only depends on the mesh.

When the InterfaceDerivativeMatrix::solve() operator is called, the vector $C$ is defined from the function values.
The operator solves the matrix system $S = (I -M)^{-1}C$. Then, it fills in the derivative fields given as parameters
with the values in the $S$ solution vector.


Please complete the checklist to ensure that all tasks are completed before marking your pull request as ready for review.

All Submissions

  • Have you ensured that all lines changed in this PR are justified by a comment found in the description ?
  • Have you updated the CHANGELOG.md ?
  • Have you linked any issues that should be closed when this PR is merged (using closing keywords) ?
  • Have you checked that the AUTHORS file is up to date ?
  • Have you checked that the copyright information in the LICENCE file is up to date (including dates) ?
  • Do you follow the conventions specified in our coding standards ?

New Feature Submissions

  • Have you added tests for the new functionalities ?
  • Have you documented the new functionalities:
    • API documentation describing the available methods, when each should be used and how to use them ?
    • User-friendly documentation in README files (which may link to the API documentation).
    • If the new functionality is non-trivial to use, provide a tutorial or example ? (optional)

Changes to Existing Features

  • Have you checked that existing tests cover all code after the changes ?
  • Have you checked that existing tests are still passing ?
  • Have you checked that the existing documentation is still accurate (API and README files) ?

Changes to the CI

  • Have you made the same changes to both the GitHub CI and the GitLab CI (for the private fork) ?

PaulineVidal and others added 30 commits April 15, 2025 21:44
Add `SingleInterfaceDerivativesCalculator` operator and tests to compute an interface derivative with the different cases:

- Interpolation type: Hermite boundary conditions ; additional interpolation points
- Mesh type: uniform ; non-uniform
- Formula type: exact ; approximation. 
- Patch connections: E|E ; E|W ; W|E ; W|W ; E|S

See merge request gysela-developpers/gyselalibxx!869

--------------------------------------------

Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
…o 'main_pvidal'

Add single interface derivatives calculator

See merge request gysela-developpers/gyselalibxx!869

--------------------------------------------

Co-authored-by: Pauline Vidal <pauline.vidal@ipp.mpg.de>
Add `SingleInterfaceDerivativesCalculator` operator and tests to compute an interface derivative with the different cases:

- Interpolation type: Hermite boundary conditions ; additional interpolation points
- Mesh type: uniform ; non-uniform
- Formula type: exact ; approximation. 
- Patch connections: E|E ; E|W ; W|E ; W|W ; E|S

See merge request gysela-developpers/gyselalibxx!869

--------------------------------------------

Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
Remove modification MultipatchConnectivity.
Remove test file.
Add `SingleInterfaceDerivativesCalculator` operator and tests to compute an interface derivative with the different cases:

- Interpolation type: Hermite boundary conditions ; additional interpolation points
- Mesh type: uniform ; non-uniform
- Formula type: exact ; approximation. 
- Patch connections: E|E ; E|W ; W|E ; W|W ; E|S

See merge request gysela-developpers/gyselalibxx!869

--------------------------------------------

Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
PaulineVidal and others added 8 commits January 9, 2026 10:28
Add `SingleInterfaceDerivativesCalculator` operator and tests to compute an interface derivative with the different cases:

- Interpolation type: Hermite boundary conditions ; additional interpolation points
- Mesh type: uniform ; non-uniform
- Formula type: exact ; approximation. 
- Patch connections: E|E ; E|W ; W|E ; W|W ; E|S

See merge request gysela-developpers/gyselalibxx!869

--------------------------------------------

Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
Add a `SingleInterfaceDerivativeCalculatorCollection` to store a collection of `SingleInterfaceDerivativeCalculator`.

Change the template parameters of `SingleInterfaceDerivativeCalculator`. The boundary conditions are now inputs in the constructor.  

Move useful operators in the test files `single_interface_derivatives_calculator_test.cpp` in a `interface_derivatives_utils.hpp` file.

See merge request gysela-developpers/gyselalibxx!874

--------------------------------------------

Co-authored-by: Pauline Vidal <142578924+PaulineVidal@users.noreply.github.com>
Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
Update the `main_pvidal` branch after merge including DDC changes.

See merge request gysela-developpers/gyselalibxx!882

--------------------------------------------
@github-actions

Copy link
Copy Markdown

This PR is failing tests so it has been put back into draft. Please remove the draft status when the tests pass.

@github-actions
github-actions Bot marked this pull request as draft January 12, 2026 14:31
@PaulineVidal
PaulineVidal force-pushed the pvidal_interface_derivative_matrix branch from d967fb9 to 9c5c9d5 Compare January 12, 2026 14:58
Comment thread vendor/ddc
@PaulineVidal PaulineVidal changed the title Add InterfaceExactDerivativeMatrix Add InterfaceExactDerivativeMatrix for conforming mesh Jan 13, 2026
@PaulineVidal PaulineVidal changed the title Add InterfaceExactDerivativeMatrix for conforming mesh Add InterfaceExactDerivativeMatrix for conforming meshes Jan 13, 2026
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