/******************************************************************************* * This file is part of SWIFT. * Copyright (c) 2025 Katy Proctor (katy.proctor@fysik.su.se) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * ******************************************************************************/ #ifndef SWIFT_BASIC_SIDM_PART_H #define SWIFT_BASIC_SIDM_PART_H #include "timeline.h" /** * @brief Particle fields for the SIDM particles. * * All quantities related to gravity are stored in the associate #gpart. */ struct sipart { /*! Particle ID. */ long long id; /*! Pointer to corresponding gravity part. */ struct gpart* gpart; /*! Particle position. */ double x[3]; /*! Particle velocity. */ float v[3]; /* Offset between current position and position at last tree rebuild. */ float x_diff[3]; /* Offset between current position and position at last tree rebuild. */ float x_diff_sort[3]; /*! Particle mass */ float mass; /*! Particle smoothing length. */ float h; struct { /* Number of neighbours. */ float wcount; /* Number of neighbours spatial derivative. */ float wcount_dh; } density; /*! Particle time bin */ timebin_t time_bin; /*! Tree-depth at which size / 2 <= h * gamma < size */ char depth_h; #ifdef SWIFT_DEBUG_CHECKS /* Time of the last drift */ integertime_t ti_drift; /* Time of the last kick */ integertime_t ti_kick; #endif } SWIFT_STRUCT_ALIGN; #endif /* SWIFT_BASIC_SIDM_PART_H */