Peano
Loading...
Searching...
No Matches
hydro_part.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of SWIFT.
3 * Copyright (c) 2016 Matthieu Schaller (schaller@strw.leidenuniv.nl)
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19#ifndef SWIFT_MINIMAL_HYDRO_PART_H
20#define SWIFT_MINIMAL_HYDRO_PART_H
21
35//#include "adaptive_softening_struct.h"
36//#include "black_holes_struct.h"
37//#include "chemistry_struct.h"
38//#include "cooling_struct.h"
39//#include "feedback_struct.h"
40//#include "mhd_struct.h"
41//#include "particle_splitting_struct.h"
42//#include "rt_struct.h"
43//#include "sink_struct.h"
44//#include "star_formation_struct.h"
45//#include "timestep_limiter_struct.h"
46//#include "tracers_struct.h"
47
55struct xpart {
56
58 float x_diff[3];
59
61 float x_diff_sort[3];
62
64 float v_full[3];
65
67 float a_grav[3];
68
70 float u_full;
71
73// struct particle_splitting_data split_data;
74
76// struct cooling_xpart_data cooling_data;
77
78 /* Additional data used by the tracers */
79// struct tracers_xpart_data tracers_data;
80
81 /* Additional data used by the tracers */
82// struct star_formation_xpart_data sf_data;
83
85// struct feedback_xpart_data feedback_data;
86
88// struct mhd_xpart_data mhd_data;
89
91
99struct part {
100
102 long long id;
103
105 struct gpart* gpart;
106
109
111 float v[3];
112
114 float a_hydro[3];
115
117 float mass;
118
120 float h;
121
123 float u;
124
126 float u_dt;
127
129 float rho;
130
131 /* Store density/force specific stuff. */
132 union {
133
141 struct {
142
144 float wcount;
145
148
150 float rho_dh;
151
153 float div_v;
154
156 float rot_v[3];
157
159
167 struct {
168
170 float f;
171
173 float pressure;
174
177
179 float v_sig;
180
182 float h_dt;
183
185 float balsara;
186
188 };
189
190 // DEVIATION - in SWIFT, xpart resides in a dedicated buffer
192
194// struct adaptive_softening_part_data adaptive_softening_data;
195
197// struct mhd_part_data mhd_data;
198
200// struct chemistry_part_data chemistry_data;
201
203// struct cooling_part_data cooling_data;
204
206// struct feedback_part_data feedback_data;
207
209// struct black_holes_part_data black_holes_data;
210
212// struct sink_part_data sink_data;
213
215// struct rt_part_data rt_data;
216
218// struct rt_timestepping_data rt_time_data;
219
221// timebin_t time_bin;
222
224// struct timestep_limiter_data limiter_data;
225
226#ifdef SWIFT_DEBUG_CHECKS
227
228 /* Time of the last drift */
229 integertime_t ti_drift;
230
231 /* Time of the last kick */
232 integertime_t ti_kick;
233
234#endif
235
237
238#endif /* SWIFT_MINIMAL_HYDRO_PART_H */
struct xpart SWIFT_STRUCT_ALIGN
Point< dim, fp > Point
Definition geometry.h:242
Particle fields for the SPH particles.
Definition hydro_part.h:99
float wcount
Definition hydro_part.h:144
float u
Definition hydro_part.h:123
float mass
Definition hydro_part.h:117
float rot_v[3]
Definition hydro_part.h:156
float h_dt
Definition hydro_part.h:182
float rho
Definition hydro_part.h:129
xpart xpart
Definition hydro_part.h:191
float wcount_dh
Definition hydro_part.h:147
struct gpart * gpart
Definition hydro_part.h:105
float a_hydro[3]
Definition hydro_part.h:114
float h
Definition hydro_part.h:120
float rho_dh
Definition hydro_part.h:150
float pressure
Definition hydro_part.h:173
struct part::@3::@6 force
Structure for the variables only used in the force loop over neighbours.
float u_dt
Definition hydro_part.h:126
struct part::@3::@5 density
Structure for the variables only used in the density loop over neighbours.
long long id
Definition hydro_part.h:102
Geo::Point _x
Definition hydro_part.h:108
float f
Definition hydro_part.h:170
float v[3]
Definition hydro_part.h:111
float balsara
Definition hydro_part.h:185
float soundspeed
Definition hydro_part.h:176
float div_v
Definition hydro_part.h:153
float v_sig
Definition hydro_part.h:179
Particle fields not needed during the SPH loops over neighbours.
Definition hydro_part.h:55
float x_diff_sort[3]
Definition hydro_part.h:61
float x_diff[3]
Definition hydro_part.h:58
float v_full[3]
Definition hydro_part.h:64
float u_full
Definition hydro_part.h:70
float a_grav[3]
Definition hydro_part.h:67