-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement the time integration method used in DualSPHysics and add docs for time integration #716
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #716 +/- ##
==========================================
- Coverage 70.53% 70.50% -0.03%
==========================================
Files 96 97 +1
Lines 5976 5978 +2
==========================================
Hits 4215 4215
- Misses 1761 1763 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This approach allows us to use specialized time integration methods that do not work with | ||
general `ODEProblem`s. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like for example?
### [Leapfrog kick-drift-kick](@id kick_drift_kick) | ||
|
||
The kick-drift-kick scheme of the leapfrog method, updating positions ``u`` | ||
and velocities ``v`` with the functions ``\operatorname{kick}`` and ``\operatorname{drift}``, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function kick below is (u,v, t) here it is (u,t) this difference should be explained
### Symplectic position Verlet | ||
|
||
When the density is integrated (with [`ContinuityDensity`](@ref)), the density is appended | ||
to ``v`` as additional dimension, so all previously mentioned schemes treat the density |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to ``v`` as additional dimension, so all previously mentioned schemes treat the density | |
to ``v`` as an additional dimension, so all previously mentioned schemes treat the density |
The SPH code [DualSPHysics](https://github.com/DualSPHysics/DualSPHysics) implements | ||
a variation of the drift-kick-drift scheme where the density is updated separately. | ||
In the following, we will call the derivative of the density ``R(v, u, t)``, | ||
even though it is actually included in the ``\operatorname{kick}`` as additional dimension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though it is actually included in the ``\operatorname{kick}`` as additional dimension. | |
even though it is actually included in the ``\operatorname{kick}`` as an additional dimension. |
Note that the method `VelocityVerlet` does not work with TrixiParticles.jl for the same and | ||
other additional reasons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird jump. Please include the explanation in the previous text. Also redundant because of the warning below.
uprev, uprev2, f, t, | ||
dt, reltol, p, calck, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uprev, uprev2, f, t, | |
dt, reltol, p, calck, | |
uprev, uprev2, f, t, dt, reltol, p, calck, |
tTypeNoUnits} | ||
# We only use inplace functions in TrixiParticles, so there is no point | ||
# in implementing the non-inplace version. | ||
error("`SymplecticPositionVerlet` only supports inplace functions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error("`SymplecticPositionVerlet` only supports inplace functions") | |
error("`SymplecticPositionVerlet` supports only in-place functions.") |
# verify_f2(integrator.f.f2, integrator.k[2].x[2], duprev, uprev, integrator.p, | ||
# integrator.t, integrator, cache) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# verify_f2(integrator.f.f2, integrator.k[2].x[2], duprev, uprev, integrator.p, | |
# integrator.t, integrator, cache) |
@@ -171,6 +171,13 @@ @Article{Bonet1999 | |||
publisher = {Elsevier BV}, | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also cite a DualSPHysics paper in which this is explained.
Supersedes #693.
Closes #683.
Find the rendered docs for this PR here:
https://trixi-framework.github.io/TrixiParticles.jl/previews/PR716/