Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1029b3e
Revise `vtk2trixi` so that it returns a `NamedTuple` instead of an `I…
marcelschurer Mar 19, 2026
b4f5ed6
Merge branch 'main' into dev
efaulhaber Apr 16, 2026
d628a6d
Merge branch 'main' into dev
LasNikas Apr 17, 2026
fe406a9
Change API of `DensityDiffusionAntuono` (#1142)
efaulhaber Apr 20, 2026
44bd163
Merge branch 'main' into dev
LasNikas Apr 20, 2026
c418464
Merge branch 'main' into dev
efaulhaber Apr 21, 2026
9d0dc0d
Merge branch 'main' into dev
LasNikas Apr 21, 2026
704722a
Merge branch 'main' into dev
LasNikas Apr 22, 2026
b0144b4
Drop `n_clamped_particles` (#964)
LasNikas Apr 22, 2026
af4764b
Make pressure clipping in `BoundaryModelDummyParticles` optional (#1143)
efaulhaber Apr 28, 2026
c43f535
Merge branch 'main' into dev
efaulhaber Apr 28, 2026
a8cc1cd
Fix merge of NEWS.md
efaulhaber Apr 28, 2026
3d7c0c2
Switch to sub-packages of OrdinaryDiffEq.jl (#1154)
efaulhaber Apr 28, 2026
92884cb
Refactor SPH system initialization to use keyword arguments (#1144)
svchb Apr 28, 2026
06e8214
Update NEWS.md and prepare release (#1162)
efaulhaber Apr 28, 2026
8555d0f
Update NEWS.md
efaulhaber Apr 28, 2026
8c92832
Apply Copilot suggestion
efaulhaber Apr 28, 2026
dff57fa
Apply Copilot suggestion
efaulhaber Apr 28, 2026
f798da8
Fix unit tests
efaulhaber Apr 28, 2026
d087d2c
Fix dam break GPU example
efaulhaber Apr 28, 2026
579199b
Refactor dam break simulation parameters for clarity
svchb Apr 28, 2026
8baa8e2
Fix syntax error in dam_break_2d_gpu.jl
svchb Apr 28, 2026
962ba40
fix
svchb Apr 28, 2026
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
88 changes: 80 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,86 @@ used in the Julia ecosystem. Notable changes will be documented in this file for

### API Changes

- Clipping of negative pressure values in the `BoundaryModelDummyParticles` is now disabled
by default and can be enabled with the keyword argument `clip_negative_pressure=true` (#1143).
- The example files are now loading sub-packages of OrdinaryDiffEq.jl instead of
OrdinaryDiffEq.jl itself. For example, `using OrdinaryDiffEqLowStorageRK` instead of
`using OrdinaryDiffEq` (#1154).
- `DensityDiffusionAntuono` now only has the kwarg `delta` and no positional
arguments (#1142).
- Return type of `vtk2trixi` changed to `NamedTuple` including an optional
`:initial_condition` field if `create_initial_condition=true` is passed (#959).
- Public system constructors now use keyword arguments for configuration values.
This affects `WeaklyCompressibleSPHSystem`, `EntropicallyDampedSPHSystem`,
`ImplicitIncompressibleSPHSystem`, `TotalLagrangianSPHSystem`, `DEMSystem`,
and `BoundaryDEMSystem`.

#### Migration Guide for Keyword-Based System Constructors

The initial condition remains the only positional argument for the affected system
constructors. All method, material, and configuration arguments that were previously
passed positionally now need to be passed as keywords.
Existing optional keyword arguments remain available. For example, the
`density_calculator` keyword of `EntropicallyDampedSPHSystem` still defaults to
`SummationDensity()`.

Here are examples, where `ic` is the initial condition, `kernel` is the
smoothing kernel, and `h` is the smoothing length:

```julia
WeaklyCompressibleSPHSystem(ic, density_calculator, state_equation, kernel, h;
kwargs...)
# becomes
WeaklyCompressibleSPHSystem(ic; smoothing_kernel=kernel, smoothing_length=h,
density_calculator, state_equation, kwargs...)

EntropicallyDampedSPHSystem(ic, kernel, h, sound_speed; kwargs...)
# becomes
EntropicallyDampedSPHSystem(ic; smoothing_kernel=kernel, smoothing_length=h,
sound_speed, kwargs...)

ImplicitIncompressibleSPHSystem(ic, kernel, h, reference_density; kwargs...)
# becomes
ImplicitIncompressibleSPHSystem(ic; smoothing_kernel=kernel, smoothing_length=h,
reference_density, kwargs...)

TotalLagrangianSPHSystem(ic, kernel, h, young_modulus, poisson_ratio; kwargs...)
# becomes
TotalLagrangianSPHSystem(ic; smoothing_kernel=kernel, smoothing_length=h,
young_modulus, poisson_ratio, kwargs...)

DEMSystem(ic, contact_model; kwargs...)
# becomes
DEMSystem(ic; contact_model, kwargs...)

BoundaryDEMSystem(ic, normal_stiffness)
# becomes
BoundaryDEMSystem(ic; normal_stiffness)
```

### Performance

- Greatly improved GPU performance of WCSPH and TLSPH
(#1128, #1117, #1124, #1125, #1130, #1116, #1139, #1149).
See [#1131](https://github.com/trixi-framework/TrixiParticles.jl/issues/1131)
for a detailed breakdown including benchmark results.

### Features

- Added a `SortingCallback` that can be used to sort particles by their spatial location
to improve performance (#1044).

### Important Bugfixes

- Fixed a bug where `DensityDiffusionAntuono` could not be used together with open
boundaries and `BoundaryModelDynamicalPressureZhang` (#1043).
- Fixed a bug where no-slip boundary conditions were not applied correctly when not using
`ViscosityAdami` (#1089).

## Version 0.4.4

### API Changes

- Custom quantities called in the `PostprocessCallback` are now passed CPU arrays when
the simulation is run on a GPU (#1065).

Expand All @@ -21,13 +101,6 @@ used in the Julia ecosystem. Notable changes will be documented in this file for
- Added new validation case hydrostatic water column (#724).
- Added Carreau–Yasuda non-Newtonian viscosity model (#1010).

### Performance

- Greatly improved GPU performance of WCSPH and TLSPH
(#1128, #1117, #1124, #1125, #1130, #1116, #1139, #1149).
See [#1131](https://github.com/trixi-framework/TrixiParticles.jl/issues/1131)
for a detailed breakdown including benchmark results.

### Important Bugfixes

- Fixed the periodic array of cylinders example file (#975).
Expand Down Expand Up @@ -62,7 +135,6 @@ used in the Julia ecosystem. Notable changes will be documented in this file for

- Added GPU and FP32 support for DEM (#979).


### Performance
- Improved GPU performance with shifting up to a factor of 10x (#974, #993).

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "TrixiParticles"
uuid = "66699cd8-9c01-4e9d-a059-b96c86d16b3a"
version = "0.4.5-dev"
version = "0.5"
authors = ["erik.faulhaber <44124897+efaulhaber@users.noreply.github.com>"]

[deps]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ with Julia v1.10 and newer. We recommend using the latest stable release of Juli
### For users
TrixiParticles.jl is a registered Julia package.
You can install TrixiParticles.jl,
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) (used for time integration)
and [Plots.jl](https://github.com/JuliaPlots/Plots.jl) by executing the following commands
time integration sub-packages of [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl)
(for example `OrdinaryDiffEqLowStorageRK`), and [Plots.jl](https://github.com/JuliaPlots/Plots.jl)
by executing the following commands
in the Julia REPL:
```julia
julia> using Pkg

julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEq", "Plots"])
julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSymplecticRK", "Plots"])
```

### For developers
Expand All @@ -92,7 +93,7 @@ git clone git@github.com:trixi-framework/TrixiParticles.jl.git
cd TrixiParticles.jl
mkdir run
julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Add TrixiParticles.jl to `run` project
julia --project=run -e 'using Pkg; Pkg.add(["OrdinaryDiffEq", "Plots"])' # Add additional packages
julia --project=run -e 'using Pkg; Pkg.add(["OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqSymplecticRK", "Plots"])' # Add additional packages
```

If you installed TrixiParticles.jl this way, you always have to start Julia with the
Expand Down Expand Up @@ -133,7 +134,7 @@ You can find the documentation for the latest release
[![arXiv:2506.21206](https://img.shields.io/badge/arXiv-2506.21206-yellow)](https://arxiv.org/abs/2506.21206)
[![doi:10.1016/j.cpc.2025.109898](https://zenodo.org/badge/doi/10.1016/j.cpc.2025.109898.svg)](https://doi.org/10.1016/j.cpc.2025.109898)
[![reproduce me!](https://img.shields.io/badge/reproduce-me!-brightgreen)](https://github.com/trixi-framework/paper-2025-particle-based_preprocessing)

## Cite Us

If you use TrixiParticles.jl in your own research or write a paper using results obtained
Expand Down Expand Up @@ -190,4 +191,3 @@ or [create an issue](https://github.com/trixi-framework/TrixiParticles.jl/issues
</p>

The project has benefited from funding from [hereon](https://www.hereon.de/), [HiRSE](https://www.helmholtz-hirse.de/), and through [ScienceServe](https://www.helmholtz.de/en/research/current-calls-for-applications/article/scienceserve-boosting-research-software-at-helmholtz/) for the MATRIX project.

4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
DocumenterMermaid = "a078cd44-4d9c-4618-b545-3ab9d77f9177"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[compat]
Expand All @@ -15,5 +15,5 @@ Documenter = "1"
DocumenterCitations = "1"
DocumenterMermaid = "0.2"
Literate = "2"
OrdinaryDiffEq = "6"
OrdinaryDiffEqLowStorageRK = "1"
Plots = "1"
14 changes: 7 additions & 7 deletions docs/literate/src/tut_custom_kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
# of TrixiParticles.jl by custom implementations from within a simulation file,
# without ever cloning the repository.

# First, we import TrixiParticles.jl and
# First, we import TrixiParticles.jl and the time integration sub-package
# `OrdinaryDiffEqLowStorageRK` of
# [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl), which we will
# use at the very end for the time integration.
using TrixiParticles
using OrdinaryDiffEq
using OrdinaryDiffEqLowStorageRK

# ## Load a simulation file

Expand Down Expand Up @@ -117,13 +118,12 @@ nothing # hide
# `examples/fluid/dam_break_2d.jl` with our custom kernel and the corresponding
# smoothing length.
# ```@cast @__NAME__; width=100, height=50, delay=0, loop=true, loop_delay=5
# trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"),
# trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl");
# smoothing_kernel=MyGaussianKernel(),
# smoothing_length=smoothing_length);
# smoothing_length);
# ```
trixi_include(joinpath(examples_dir(), "fluid", "dam_break_2d.jl"), #!md
smoothing_kernel=MyGaussianKernel(), #!md
smoothing_length=smoothing_length) #!md
trixi_include(joinpath(examples_dir(), "fluid", "dam_break_2d.jl"); #!md
smoothing_kernel=MyGaussianKernel(), smoothing_length) #!md

# See [Visualization](@ref) for how to visualize the final solution.
# For the simplest visualization, we can use [Plots.jl](https://docs.juliaplots.org/stable/):
Expand Down
Loading
Loading