Skip to content
Snippets Groups Projects

Improved multi-timestep SPH

Merged Matthieu Schaller requested to merge smoothing_length_derivative into master

This brings a range of improvement, mostly minor and of code clarity nature to the code. It solves:

  • Issue #84 (closed). Particles are now <128 Bytes in size.
  • Issue #85 (closed). Smoothing-lengths now evolve more accurately and we implement a time-step criterion more conservative than default Gadget-2 but that is part of EAGLE.
  • Issue #88 (closed). We now have a 'minimal' hydro implementation that can be used both as a template and an example. The doxygen documentation is based on that version. The documentation is now very extensive. This model is a poor SPH implementation and should only be used to understand the structure of the code and not be seriously run.
  • Issue #95 (closed). The engine_collect_kick() function now correctly skips empty cells.
  • Issue #96 (closed). Conserved quantities are now written to a file. We need gravity before this really get useful.
  • The description of the SPH flavour in the HDF5 files is now moved to the hydro_io.h files for consistency.

Most of it are straight-forward changes. Note that this does not fix the issue we have in MPI mode.

Merge request reports

Merged by avatar (May 28, 2025 7:12pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Matthieu Schaller Added 2 commits:

    Added 2 commits:

    • ff44be2c - The SPH description written in the HDF5 files is now in hydro/*/hydro_io.h
    • de5aa11c - Added time to the concerved quantities output
  • Sorry, those last two commits did not get pushed last night before I opened the merge request.

  • Matthieu Schaller Added 2 commits:

    Added 2 commits:

    • 3fd353ba - 1 commit from branch master
    • 8395ff22 - Merge branch 'master' into smoothing_length_derivative
  • Matthieu Schaller Added 6 commits:

    Added 6 commits:

  • By the way, sorry for the large merge request.

    Would you prefer smaller (more frequent) ones ?

  • From a clarity point of view that makes more sense, but I won't worry about it too much, as long as the changes are limited in effect.

    Edited by Peter W. Draper
  • Sorry meant "limited" not "not limited" -- fixed the previous comment,

  • Peter W. Draper Added 1 commit:

    Added 1 commit:

  • Enabling DEFAULT_SPH in const.h and compiling fails:

    /bin/bash ../libtool  --tag=CC   --mode=compile mpicc -std=gnu99 -DHAVE_CONFIG_H -I. -I..    -DTIMER -DCOUNTER -DCPU_TPS=2.30e9 -I/usr/include -g -O0  -fsanitize=address -fno-omit-frame-pointer  -Wall -Werror -MT runner.lo -MD -MP -MF .deps/runner.Tpo -c -o runner.lo runner.c
    libtool: compile:  mpicc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DTIMER -DCOUNTER -DCPU_TPS=2.30e9 -I/usr/include -g -O0 -fsanitize=address -fno-omit-frame-pointer -Wall -Werror -MT runner.lo -MD -MP -MF .deps/runner.Tpo -c runner.c  -fPIC -DPIC -o .libs/runner.o
    runner.c: In function 'runner_dokick':
    runner.c:903:9: error: incompatible type for argument 2 of 'hydro_kick_extra'
             hydro_kick_extra(p, xp, dt, half_dt);
             ^
    In file included from hydro.h:33:0,
                     from runner.c:47:
    ./hydro/Default/hydro.h:216:24: note: expected 'float' but argument is of type 'struct xpart * restrict'
         INLINE static void hydro_kick_extra(struct part* p, float dt) {}
                            ^
    runner.c:903:9: error: too many arguments to function 'hydro_kick_extra'
             hydro_kick_extra(p, xp, dt, half_dt);
             ^
    In file included from hydro.h:33:0,
                     from runner.c:47:
    ./hydro/Default/hydro.h:216:24: note: declared here
         INLINE static void hydro_kick_extra(struct part* p, float dt) {}
  • Added 1 commit:

    • 5c966fdf - Compliation problem in DEFAULT_SPH
  • Sorry about that. Looks like I have been very sloppy here. Should be fixed now.

  • Thanks, that now builds and runs as expected. Don't see any other issues, so will accept.

  • Peter W. Draper Status changed to merged

    Status changed to merged

  • I expect you want to close all the related issues!

Please register or sign in to reply
Loading