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

The grand reopening Part 1: Validation setup for dam break #431

Merged
merged 323 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
323 commits
Select commit Hold shift + click to select a range
ff6bf1b
include exclude bnd
svchb Jan 19, 2024
5891e7f
add version info to meta data
svchb Jan 19, 2024
974859e
fix
svchb Jan 19, 2024
9afa33b
add filename and overwrite
svchb Jan 19, 2024
c69650a
write initial values
svchb Jan 19, 2024
e91d529
format
svchb Jan 19, 2024
d81e4f9
add helper function to obtain latest file
svchb Jan 19, 2024
10f0658
improve func
svchb Jan 19, 2024
b41ad2c
format
svchb Jan 19, 2024
8e85162
fix plots
svchb Jan 19, 2024
95a1e48
rename
svchb Jan 19, 2024
d603ebf
add doc
svchb Jan 19, 2024
10b70fd
add exports
svchb Jan 19, 2024
69043c5
cleanup
svchb Jan 19, 2024
ad313fe
cleanup
svchb Jan 19, 2024
3863ccc
format
svchb Jan 19, 2024
81d9e2b
Merge branch 'plane_interpolation' into sensor_cb3
svchb Jan 19, 2024
93e3310
working example
svchb Jan 19, 2024
aa25735
add plot
svchb Jan 19, 2024
6e1d805
also save the cauchy stress components
svchb Jan 22, 2024
46661b4
format
svchb Jan 22, 2024
769ca47
fix dt
svchb Jan 22, 2024
a9fbf6d
fix
svchb Jan 22, 2024
1893ae9
fix
svchb Jan 22, 2024
497bcd4
fix viscosity
svchb Jan 22, 2024
9486a04
working 3d example for plane interpolation
svchb Jan 23, 2024
586f639
add 2d plot as well for 3d case
svchb Jan 23, 2024
8659c44
add docs
svchb Jan 23, 2024
e2f991d
fix tests
svchb Jan 23, 2024
cf5558f
fix
svchb Jan 23, 2024
e62453c
fix plot
svchb Jan 23, 2024
699beaa
fix comments
svchb Jan 23, 2024
3e7ad09
fix comment
svchb Jan 23, 2024
971be6f
update
svchb Jan 23, 2024
db52b69
format
svchb Jan 23, 2024
e47ae70
add Plots
svchb Jan 23, 2024
86837d1
fix
svchb Jan 23, 2024
12ff4ef
adjust plot
svchb Jan 23, 2024
010ddb9
reduce time
svchb Jan 23, 2024
def6be7
Merge remote-tracking branch 'refs/remotes/origin/plane_interpolation'
svchb Jan 24, 2024
9389659
Merge remote-tracking branch 'origin/sensor_cb' into sensor_cb3
svchb Jan 24, 2024
3967441
Merge branch 'save_TLSPH' into sensor_cb3
svchb Jan 24, 2024
90cbdaa
add reference
svchb Jan 24, 2024
04e62b9
add better digitized curves and error calc
svchb Jan 24, 2024
3df6e54
performance optimization and some slight adjustment to improve error
svchb Jan 25, 2024
95bf29e
Merge branch 'main' into sensor_cb
svchb Jan 25, 2024
b246c78
Merge branch 'main'
svchb Jan 26, 2024
21ec719
format
svchb Jan 26, 2024
fc81085
update
svchb Jan 30, 2024
8da0acd
update
svchb Feb 1, 2024
550e032
Merge branch 'main' into sensor_cb
svchb Feb 1, 2024
c88bb7f
format
svchb Feb 1, 2024
895925b
Merge branch 'sensor_cb' of github.com:svchb/TrixiParticles.jl into s…
svchb Feb 1, 2024
8a7da40
Merge branch 'main' into sensor_cb3
svchb Feb 1, 2024
0515b84
add reference files
svchb Feb 2, 2024
a648f57
Merge branch 'main' into sensor_cb
svchb Feb 2, 2024
8108bd7
add CSV
svchb Feb 2, 2024
22d71b4
add csv output
svchb Feb 2, 2024
8175205
Merge branch 'sensor_cb' of github.com:svchb/TrixiParticles.jl into s…
svchb Feb 2, 2024
c0a1794
Merge branch 'main' into sensor_cb
svchb Feb 2, 2024
94a4fa1
format
svchb Feb 2, 2024
3755d4f
Merge branch 'sensor_cb' of github.com:svchb/TrixiParticles.jl into s…
svchb Feb 2, 2024
65c3b0b
Merge branch 'main' into sensor_cb
svchb Feb 6, 2024
f835aa5
up
svchb Feb 7, 2024
f9693fc
Merge branch 'main' into sensor_cb
svchb Feb 7, 2024
0cc4e08
fixes
svchb Feb 7, 2024
82f8d5e
update
svchb Feb 7, 2024
7975a7b
Merge branch 'sensor_cb' of github.com:svchb/TrixiParticles.jl into s…
svchb Feb 7, 2024
07017b3
fix paths
svchb Feb 8, 2024
b1cd1fd
fixes
svchb Feb 8, 2024
58691fa
review
svchb Feb 8, 2024
1ac5e2d
review
svchb Feb 8, 2024
b1ca149
change git
svchb Feb 8, 2024
cd2f7ca
change type
svchb Feb 8, 2024
ceacf7e
remove mutable
svchb Feb 8, 2024
b12a122
add new example
svchb Feb 8, 2024
92a88fa
change to plots.jl
svchb Feb 8, 2024
b22bccb
increase the resolution
svchb Feb 8, 2024
4e156d2
include into CI
svchb Feb 8, 2024
20b0c75
move condition
svchb Feb 8, 2024
6e3a999
add more output to summary box
svchb Feb 9, 2024
5f27c34
update
svchb Feb 9, 2024
d7cd92c
remove DataEntry
svchb Feb 12, 2024
dc6905c
Merge branch 'sensor_cb' into sensor_cb3
svchb Feb 13, 2024
70490c8
update file structure
svchb Feb 13, 2024
bc84f81
fix setup
svchb Feb 13, 2024
3e34bce
fix plot
svchb Feb 13, 2024
44b6551
Merge branch 'main' into sensor_cb
svchb Feb 13, 2024
8975bf3
update
svchb Feb 14, 2024
13189a5
Merge branch 'main' into sensor_cb
svchb Feb 14, 2024
1e9f532
fix
svchb Feb 14, 2024
c696664
update
svchb Feb 14, 2024
e38972d
format
svchb Feb 14, 2024
6bf1d93
review update
svchb Feb 14, 2024
439845f
fix test
svchb Feb 14, 2024
aebd697
nvalue->n_values
svchb Feb 14, 2024
b2c9d2d
fix
svchb Feb 14, 2024
f1a073d
fixfix
svchb Feb 14, 2024
8ef914e
add check for anonymous functions
svchb Feb 14, 2024
08bf3f3
fix test
svchb Feb 14, 2024
61271d1
remove unused 'using'
svchb Feb 14, 2024
71d2efa
add simple test
svchb Feb 14, 2024
5a35aa0
fix using statements
svchb Feb 14, 2024
03b4b81
ignore
svchb Feb 15, 2024
4fc8d5c
format
svchb Feb 15, 2024
5533585
fix ignore string
svchb Feb 15, 2024
481bc79
fix json reading in example
svchb Feb 15, 2024
338b8d1
update
svchb Feb 15, 2024
aae9f22
update based on review comments
svchb Feb 16, 2024
521b42e
format
svchb Feb 16, 2024
f327cd0
change funcs to keyword args
svchb Feb 16, 2024
fd98f91
fix docs
svchb Feb 16, 2024
0008c52
format
svchb Feb 16, 2024
3c6e9c5
review comments
svchb Feb 16, 2024
0c7a049
format
svchb Feb 16, 2024
2611e73
Merge branch 'main' into sensor_cb
svchb Feb 16, 2024
128ce2e
fix tests
svchb Feb 16, 2024
153d0e0
fix test
svchb Feb 16, 2024
0e4a6ab
format
svchb Feb 16, 2024
3eb44a8
review
svchb Feb 16, 2024
7852782
format
svchb Feb 16, 2024
b11ad70
fix plot
svchb Feb 16, 2024
ba39f94
fix test
svchb Feb 16, 2024
c43fcf2
remove include
svchb Feb 16, 2024
db38d89
Merge branch 'main' into sensor_cb
efaulhaber Feb 16, 2024
93932c5
fix test
svchb Feb 16, 2024
be5a9be
Merge branch 'sensor_cb' of github.com:svchb/TrixiParticles.jl into s…
svchb Feb 16, 2024
25509d6
Merge branch 'sensor_cb' into sensor_cb3
svchb Feb 20, 2024
40e8a6f
Merge branch 'main' into sensor_cb3
svchb Feb 20, 2024
283e5f3
rm
svchb Feb 20, 2024
acd15a5
move
svchb Feb 20, 2024
bc6d75a
add reference curves
svchb Feb 20, 2024
5ba46e0
fix plot
svchb Feb 20, 2024
c6184f4
fix
svchb Feb 20, 2024
7f99b36
add files
svchb Feb 21, 2024
8a5c9ea
update
svchb Feb 21, 2024
217f9c3
cleanup
svchb Feb 21, 2024
8293d8e
format
svchb Feb 21, 2024
7437abc
update
svchb Feb 21, 2024
ecbdb3b
cleanup plot
svchb Feb 21, 2024
97d0e6c
simplify plot
svchb Feb 21, 2024
6ea4bea
switch to makie
svchb Feb 21, 2024
b0ad145
implement check
svchb Feb 21, 2024
3e7ee92
format
svchb Feb 21, 2024
ff8fa80
Merge branch 'sensor_cb3'
svchb Feb 21, 2024
74754e8
move
svchb Feb 21, 2024
13aa586
update
svchb Feb 22, 2024
be9513b
update
svchb Feb 22, 2024
21c7bcd
update to new reference
svchb Feb 22, 2024
b7c0911
update
svchb Feb 22, 2024
805185d
Merge remote-tracking branch 'origin/sensor_cb3' into Validation_dam
svchb Feb 23, 2024
b13455d
add reference files
svchb Feb 23, 2024
6977494
update
svchb Feb 23, 2024
c11a3be
update
svchb Feb 27, 2024
4dec79c
cleanup
svchb Feb 27, 2024
2b4e1cd
update
svchb Feb 27, 2024
1187f08
fix doc
svchb Feb 27, 2024
145ff30
add comparison
svchb Feb 27, 2024
95eecd4
format
svchb Feb 27, 2024
482ac80
fix plot
svchb Feb 27, 2024
05c2117
format
svchb Feb 27, 2024
178e68b
rename
svchb Feb 27, 2024
4714431
remove the dependencies
svchb Feb 27, 2024
cbeee99
remove dependencies
svchb Feb 28, 2024
30b7e5f
add 5 resolution back
svchb Feb 28, 2024
b4112b4
format
svchb Feb 28, 2024
caca014
Merge branch 'main' into sensor_cb3
svchb Feb 28, 2024
ca0efab
use include
svchb Feb 28, 2024
fcf2da1
format
svchb Feb 28, 2024
2f2740a
renaming
svchb Feb 28, 2024
b1f1d58
fix readme
svchb Feb 28, 2024
4d46ef0
fix test [skip ci]
svchb Feb 28, 2024
222b8b0
[skip ci] remove save for compare
svchb Feb 28, 2024
552c0af
[skip ci] add tspan back
svchb Feb 28, 2024
9998b53
review comments
svchb Feb 28, 2024
0bf9b85
small fixes [skip ci]
svchb Feb 28, 2024
162540a
update [skip ci]
svchb Feb 29, 2024
ccdf42c
rename [skip ci]
svchb Feb 29, 2024
b2d66b9
update [skip ci]
svchb Feb 29, 2024
dbc0a7f
fix
svchb Mar 1, 2024
ea2684c
exchange interpolation function
svchb Mar 1, 2024
9ae2ba2
rename
svchb Mar 1, 2024
f836223
exchange common time range find code
svchb Mar 1, 2024
d92399e
update reference file
svchb Mar 1, 2024
8324939
update [skip ci]
svchb Mar 1, 2024
2f26a18
format [skip ci]
svchb Mar 1, 2024
d2ba9c8
update
svchb Mar 1, 2024
071d527
Merge branch 'main' into sensor_cb3
svchb Mar 1, 2024
ab96113
Merge branch 'sensor_cb3' into Validation_dam
svchb Mar 2, 2024
9c04871
merge
svchb Mar 2, 2024
ee733e5
rename
svchb Mar 3, 2024
22c1620
rename files
svchb Mar 3, 2024
91d6d6d
fix setup
svchb Mar 3, 2024
c68100c
fix
svchb Mar 3, 2024
e3fcf0a
update readme [skip ci]
svchb Mar 3, 2024
698f604
update example
svchb Mar 5, 2024
98c3202
update
svchb Mar 5, 2024
c317b2d
update
svchb Mar 5, 2024
8b1392f
review comments
svchb Mar 5, 2024
25e82e8
update plot
svchb Mar 5, 2024
e3be11e
formnat string [skip ci]
svchb Mar 5, 2024
be19dc7
update
svchb Mar 5, 2024
40f0e3c
update
svchb Mar 6, 2024
28b2820
Merge branch 'main' into Validation_dam
svchb Mar 6, 2024
84b326c
activate test
svchb Mar 6, 2024
7ab1ad0
fix typo
svchb Mar 6, 2024
65a61e6
fix interpolation
svchb Mar 6, 2024
769135a
format
svchb Mar 6, 2024
889ce75
review update
svchb Mar 6, 2024
e932479
Merge branch 'main' into Validation_dam
svchb Mar 6, 2024
90f31bf
fix space
svchb Mar 8, 2024
86727b8
update ref files
svchb Mar 8, 2024
459b7e8
add ignore statements for info out
svchb Mar 8, 2024
2302156
in the correct place
svchb Mar 8, 2024
5935be4
format
svchb Mar 8, 2024
45f5113
Merge branch 'main' into Validation_dam
svchb Mar 8, 2024
ffd519f
upddate ignore
svchb Mar 8, 2024
5f8714b
format
svchb Mar 8, 2024
df30e4c
Merge branch 'Validation_dam' of github.com:svchb/TrixiParticles.jlOp…
svchb Mar 8, 2024
4e704fb
update ignore statement
svchb Mar 8, 2024
001c853
update path
svchb Mar 8, 2024
dcd1d2b
review fixes
svchb Mar 8, 2024
98fe4b8
fix reference files
svchb Mar 8, 2024
837524d
update reference files
svchb Mar 8, 2024
bc00e46
ups
svchb Mar 8, 2024
1f109ac
fix ignore
svchb Mar 9, 2024
d1429d7
more ignore
svchb Mar 9, 2024
17382c0
adjust error tolerance
svchb Mar 9, 2024
bb1d1e9
Merge branch 'main' into Validation_dam
svchb Mar 9, 2024
c60d5d1
fix problems with threading
svchb Mar 12, 2024
c9dcad9
Merge branch 'Validation_dam' of github.com:svchb/TrixiParticles.jlOp…
svchb Mar 12, 2024
e46a213
Merge branch 'main' into Validation_dam
svchb Mar 12, 2024
0d4f599
format
svchb Mar 12, 2024
d782064
Merge branch 'Validation_dam' of github.com:svchb/TrixiParticles.jlOp…
svchb Mar 12, 2024
462edfb
mixing new line
svchb Mar 12, 2024
cdea25d
suppress error for 1.9
svchb Mar 12, 2024
8705b03
Merge branch 'main' into Validation_dam
svchb Mar 12, 2024
29ef250
add more ignore
svchb Mar 12, 2024
df37f30
Merge branch 'Validation_dam' of github.com:svchb/TrixiParticles.jlOp…
svchb Mar 12, 2024
cfb493f
Merge branch 'main' into Validation_dam
svchb Mar 12, 2024
220ad11
Merge branch 'main' into Validation_dam
svchb Mar 12, 2024
7899bc4
Merge branch 'main' into Validation_dam
svchb Mar 14, 2024
ebe830c
rename
svchb Mar 18, 2024
b1e3510
Merge branch 'main' into Validation_dam
svchb Mar 18, 2024
4f4687f
update
svchb Mar 18, 2024
d9debb8
Merge branch 'Validation_dam' of github.com:svchb/TrixiParticles.jlOp…
svchb Mar 18, 2024
7c08858
fix naming
svchb Mar 18, 2024
ac2cdfa
revert
svchb Mar 18, 2024
38c2b4a
suppress deprecation warnings
svchb Mar 18, 2024
c3e845a
Merge branch 'main' into Validation_dam
svchb Mar 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions examples/fluid/dam_break_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,57 @@
using TrixiParticles
using OrdinaryDiffEq

# Size parameters
H = 0.6
W = 2 * H

# ==========================================================================================
# ==== Resolution
fluid_particle_spacing = 0.02
fluid_particle_spacing = H / 40

# Change spacing ratio to 3 and boundary layers to 1 when using Monaghan-Kajtar boundary model
boundary_layers = 3
boundary_layers = 4
spacing_ratio = 1

boundary_particle_spacing = fluid_particle_spacing / spacing_ratio

# ==========================================================================================
# ==== Experiment Setup
gravity = 9.81

tspan = (0.0, 5.7 / sqrt(gravity))

# Boundary geometry and initial fluid particle positions
initial_fluid_size = (2.0, 1.0)
tank_size = (floor(5.366 / boundary_particle_spacing) * boundary_particle_spacing, 4.0)
initial_fluid_size = (W, H)
tank_size = (floor(5.366 * H / boundary_particle_spacing) * boundary_particle_spacing, 4.0)

fluid_density = 1000.0
sound_speed = 20 * sqrt(gravity * initial_fluid_size[2])
sound_speed = 20 * sqrt(gravity * H)
state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density,
exponent=7, clip_negative_pressure=false)
exponent=1, clip_negative_pressure=false)

tank = RectangularTank(fluid_particle_spacing, initial_fluid_size, tank_size, fluid_density,
n_layers=boundary_layers, spacing_ratio=spacing_ratio,
acceleration=(0.0, -gravity), state_equation=state_equation)

# ==========================================================================================
# ==== Fluid
smoothing_length = 3.0 * fluid_particle_spacing
smoothing_length = 3.5 * fluid_particle_spacing
smoothing_kernel = WendlandC2Kernel{2}()

fluid_density_calculator = ContinuityDensity()
viscosity = ArtificialViscosityMonaghan(alpha=0.02, beta=0.0)
density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1)
# density_diffusion = DensityDiffusionAntuono(tank.fluid, delta=0.1)
# Alternatively the density diffusion model by Molteni & Colagrossi can be used,
# which will run faster.
# density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1)
density_diffusion = DensityDiffusionAntuono(tank.fluid, delta=0.1)

fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator,
state_equation, smoothing_kernel,
smoothing_length, viscosity=viscosity,
density_diffusion=density_diffusion,
acceleration=(0.0, -gravity), correction=nothing)
acceleration=(0.0, -gravity),
correction=nothing)

# ==========================================================================================
# ==== Boundary
Expand All @@ -65,18 +73,32 @@ boundary_system = BoundarySPHSystem(tank.boundary, boundary_model)

# ==========================================================================================
# ==== Simulation
semi = Semidiscretization(fluid_system, boundary_system)
semi = Semidiscretization(fluid_system, boundary_system, threaded_nhs_update=true)
ode = semidiscretize(semi, tspan)

info_callback = InfoCallback(interval=100)
saving_callback = SolutionSavingCallback(dt=0.02, prefix="")

solution_prefix = ""
saving_callback = SolutionSavingCallback(dt=0.02, prefix=solution_prefix)

# Save at certain timepoints which allows comparison to the results of Marrone et al.,
# i.e. (1.5, 2.36, 3.0, 5.7, 6.45).
# Please note that the images in Marrone et al. are obtained at a particle_spacing = H/320,
# which takes between 2 and 4 hours.
saving_paper = SolutionSavingCallback(save_times=[0.0, 0.371, 0.584, 0.743, 1.411, 1.597],
prefix="marrone_times")

# This can be overwritten with `trixi_include`
extra_callback = nothing

use_reinit = false
density_reinit_cb = use_reinit ? DensityReinitializationCallback(semi.systems[1], dt=0.01) :
density_reinit_cb = use_reinit ?
DensityReinitializationCallback(semi.systems[1], interval=10) :
nothing
stepsize_callback = StepsizeCallback(cfl=1.1)
stepsize_callback = StepsizeCallback(cfl=0.9)

callbacks = CallbackSet(info_callback, saving_callback, stepsize_callback)
callbacks = CallbackSet(info_callback, saving_callback, stepsize_callback, extra_callback,
density_reinit_cb, saving_paper)

sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt=1.0, # This is overwritten by the stepsize callback
Expand Down
2 changes: 1 addition & 1 deletion src/TrixiParticles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Reexport: @reexport
using CSV: CSV
using Dates
using DataFrames: DataFrame
using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect
using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect, PresetTimeCallback
using FastPow: @fastpow
using ForwardDiff: ForwardDiff
using JSON: JSON
Expand Down
24 changes: 15 additions & 9 deletions src/callbacks/solution_saving.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@doc raw"""
SolutionSavingCallback(; interval::Integer=0, dt=0.0,
SolutionSavingCallback(; interval::Integer=0, dt=0.0, save_times=Array{Float64, 1}([]),
save_initial_solution=true, save_final_solution=true,
output_directory="out", append_timestamp=false,
max_coordinates=2^15, custom_quantities...)
output_directory="out", append_timestamp=false, max_coordinates=2^15,
custom_quantities...)


Callback to save the current numerical solution in VTK format in regular intervals.
Either pass `interval` to save every `interval` time steps,
Expand All @@ -19,6 +20,7 @@ To ignore a custom quantity for a specific system, return `nothing`.
- `dt`: Save the solution in regular intervals of `dt` in terms
of integration time by adding additional `tstops`
(note that this may change the solution).
- `save_times=[]` List of times at which to save a solution.
- `save_initial_solution=true`: Save the initial solution.
- `save_final_solution=true`: Save the final solution.
- `output_directory="out"`: Directory to save the VTK files.
Expand Down Expand Up @@ -64,6 +66,7 @@ saving_callback = SolutionSavingCallback(dt=0.1, my_custom_quantity=kinetic_ener
"""
mutable struct SolutionSavingCallback{I, CQ}
interval :: I
save_times :: Array{Float64, 1}
save_initial_solution :: Bool
save_final_solution :: Bool
write_meta_data :: Bool
Expand All @@ -76,13 +79,14 @@ mutable struct SolutionSavingCallback{I, CQ}
end

function SolutionSavingCallback(; interval::Integer=0, dt=0.0,
save_initial_solution=true,
save_final_solution=true,
save_times=Array{Float64, 1}([]),
save_initial_solution=true, save_final_solution=true,
output_directory="out", append_timestamp=false,
prefix="", verbose=false, write_meta_data=true,
max_coordinates=Float64(2^15), custom_quantities...)
if dt > 0 && interval > 0
throw(ArgumentError("Setting both interval and dt is not supported!"))
if (dt > 0 && interval > 0) || (length(save_times) > 0 && (dt > 0 || interval > 0))
throw(ArgumentError("Setting multiple save times for the same solution " *
"callback is not possible. Use either `dt`, `interval` or `save_times`."))
end

if dt > 0
Expand All @@ -93,13 +97,15 @@ function SolutionSavingCallback(; interval::Integer=0, dt=0.0,
output_directory *= string("_", Dates.format(now(), "YY-mm-ddTHHMMSS"))
end

solution_callback = SolutionSavingCallback(interval,
solution_callback = SolutionSavingCallback(interval, save_times,
save_initial_solution, save_final_solution,
write_meta_data, verbose, output_directory,
prefix, max_coordinates, custom_quantities,
-1)

if dt > 0
if length(save_times) > 0
return PresetTimeCallback(save_times, solution_callback)
elseif dt > 0
# Add a `tstop` every `dt`, and save the final solution.
return PeriodicCallback(solution_callback, dt,
initialize=initialize_save_cb!,
Expand Down
Loading
Loading