Skip to content
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

Use overlapping schwarz for oscillator tutorial #391

Merged
merged 9 commits into from
Feb 5, 2024

Conversation

BenjaminRodenberg
Copy link
Member

Exchange displacement instead of forces. This leads to identical results, but makes the modelling a bit clearer and fits better into the domain decomposition framework.

What we did before:

Screenshot from 2023-11-15 22-01-49

What we do now:

Screenshot from 2023-11-15 22-02-31

Inside of each participant, we still translate the displacement of the other participant to a force, because this fits better into the generalized alpha framework. This, however, is an implementation detail of the solver and does not really interfere with the coupling scheme.

oscillator/README.md Outdated Show resolved Hide resolved
@BenjaminRodenberg
Copy link
Member Author

Decision after discussion with @uekerman: Similar to #381 this modification of the case should go into tutorials/oscillator-schwarz. This will result in some amount of code duplication, but there are the following arguments for keeping both version of the tutorial:

  • Add FMU version to oscillator example #322 uses the coupling scheme that exchanges forces, not displacements and would therefore require a larger update
  • Providing examples where the same scenario is coupled with different coupling schemes is generally valuable

I will also modify #388 to work with the overlapping schwarz-version of the tutorial, because this is also the case I'm investigating for my thesis.

@MakisH
Copy link
Member

MakisH commented Nov 27, 2023

Decision after discussion with @uekerman: Similar to #381 this modification of the case should go into tutorials/oscillator-schwarz. This will result in some amount of code duplication, but there are the following arguments for keeping both version of the tutorial:

Isn't the "overlapping" part easier to understand from the top-view? So, tutorials/oscillator-overlap?

@BenjaminRodenberg
Copy link
Member Author

Decision after discussion with @uekerman: Similar to #381 this modification of the case should go into tutorials/oscillator-schwarz. This will result in some amount of code duplication, but there are the following arguments for keeping both version of the tutorial:

Isn't the "overlapping" part easier to understand from the top-view? So, tutorials/oscillator-overlap?

Probably yes. I think "Schwarz" is also a broader term and might refer to completely different setups. With "Overlap" the main feature is clear.

Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

Some cleanup is needed before we continue

Edit: I was somehow looking at an older commit. Abort.

oscillator/precice-config.xml.orig Outdated Show resolved Hide resolved
@BenjaminRodenberg
Copy link
Member Author

Some cleanup is needed before we continue

Edit: I was somehow looking at an older commit. Abort.

Yeah. Felt like a déjà vu to me :) Then all good? Can you ✔️ ?

Copy link
Member

@uekerman uekerman left a comment

Choose a reason for hiding this comment

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

Name and README is good to go IMO (besides last edits below).
I did not run the case.

oscillator-overlap/README.md Outdated Show resolved Hide resolved

![Schematic drawing of oscillator example with overlapping domain decomposition](images/tutorials-oscillator-overlap-dd.png)

Note that this case applies an overlapping Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. We will refer to the solver computing the trajectory of $m_1$ as `Mass-Left` and to the solver computing the trajectory of $m_2$ as `Mass-Right`. For more information, please refer to [1].
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note that this case applies an overlapping Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. We will refer to the solver computing the trajectory of $m_1$ as `Mass-Left` and to the solver computing the trajectory of $m_2$ as `Mass-Right`. For more information, please refer to [1].
Note that this case applies an overlapping Schwarz-type coupling method and not (like most other tutorials in this repository) a Dirichlet-Neumann coupling. This results in a symmetric setup of the solvers. We refer to the solver computing the trajectory of $m_1$ as `Mass-Left` and to the solver computing the trajectory of $m_2$ as `Mass-Right`.

There is no [1] on this page and the paper does also not discuss this case. We could maybe refer to BR's thesis here later.

Copy link
Member

Choose a reason for hiding this comment

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

Not a concrete suggestion, but a brainstorming idea: In principle, you can even use references to the literature cards we render on the website. They will not render correctly outside the repository, but we could later find a solution for that.

Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

I have not tried to run it, but it looks clean. 👍
I would just really like that, since we already converged in different occasions on why it makes sense that we stick to the standard tutorial structure, that we try to enforce it.

oscillator-overlap/python/oscillator.py Outdated Show resolved Hide resolved
oscillator-overlap/README.md Outdated Show resolved Hide resolved
Copy link
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

The new structure makes looks nice! It is fine to not have dedicated config files for such a simple solver. The command-line arguments in the run.sh scripts are enough of a configuration.

I have ran the tutorial and I get the following errors:

  • Left: 0.01,0.02597530032202172
  • Right: 0.01,0.025058100518940307

@MakisH MakisH merged commit 2113377 into precice:develop Feb 5, 2024
3 checks passed
@BenjaminRodenberg BenjaminRodenberg deleted the do-overlapping-schwarz branch February 5, 2024 22:07
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