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

[Backward] Fix trapezoidal rule in EulerImplicitSolver #5169

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hugtalbot
Copy link
Contributor

@hugtalbot hugtalbot commented Dec 17, 2024

Fix #5140

NB: it would be nice to have the image of the issue added (as text) in the doc


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@hugtalbot hugtalbot added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Dec 17, 2024
@hugtalbot hugtalbot added this to the v25.06 milestone Dec 17, 2024
@hugtalbot hugtalbot requested a review from alxbilger December 17, 2024 16:22
Copy link
Contributor

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

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

Here is what I have for Backward Euler:

$$ \left( \left( 1 + \alpha \Delta t \right) M - \Delta t B - \Delta t \left( \Delta t + \beta \right) K \right) \Delta v = \Delta t F(x_n, v_n) + \Delta t \left( -\alpha M + \left( \beta + \Delta t \right) K \right) v_n $$

and for the trapezoidal rule:

$$ \left[ \left(1 + \frac{1}{2} \alpha \Delta t \right) M - \frac{1}{2} \Delta t B - \frac{1}{2} \Delta t \left( \frac{1}{2} \Delta t + \beta \right) K \right] \Delta v = \Delta t F(x_n, v_n) + \Delta t \left( -\alpha M + \left( \beta + \frac{1}{2} \Delta t \right) K \right) v_n $$

So, your changes make sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trapezoidal rule in Euler implicit solver
2 participants