Peano
Loading...
Searching...
No Matches
hydro_properties.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_HYDRO_PROPERTIES
20#define SWIFT_HYDRO_PROPERTIES
21
27/* Config parameters. */
28#include <config.h>
29#include <cstdio>
30
31#if defined(HAVE_HDF5)
32#include <hdf5.h>
33#endif
34
35/* Local includes. */
36#include "hydro_parameters.h"
37//#include "restart.h"
38
39/* Forward declarations */
40struct cosmology;
41struct swift_params;
42struct gravity_props;
43struct phys_const;
44struct unit_system;
45
50
51 /* ------ Smoothing lengths parameters ---------- */
52
55
58
61
64
66 float h_max;
67
70
72 float h_min;
73
76
77 /* ------ Neighbour number definition ------------ */
78
81
82 /* ------ Time integration parameters ------------ */
83
86
89
90 /* ------ Temperature parameters ----------------- */
91
94
97
100
103
106
109
112
115
116 /* ------ Particle splitting parameters ---------- */
117
120
123
126
127 /* ------ Viscosity and diffusion ---------------- */
128
131
134
135 /* ------ MHD properties ------------------------- */
136
138// struct mhd_global_data mhd;
139};
140
141void hydro_props_print(const struct hydro_props *p);
143 const struct phys_const *phys_const,
144 const struct unit_system *us,
145 struct swift_params *params);
146
147void hydro_props_update(struct hydro_props *p, const struct gravity_props *gp,
148 const struct cosmology *cosmo);
149
150#if defined(HAVE_HDF5)
151void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p);
152#endif
153
154/* Dump/restore. */
155void hydro_props_struct_dump(const struct hydro_props *p, FILE *stream);
156void hydro_props_struct_restore(const struct hydro_props *p, FILE *stream);
157
158/* Setup for tests */
160
161#endif /* SWIFT_HYDRO_PROPERTIES */
const struct xpart *restrict const struct cosmology * cosmo
Definition hydro.h:74
void hydro_props_init(struct hydro_props *p, const struct phys_const *phys_const, const struct unit_system *us, struct swift_params *params)
void hydro_props_init_no_hydro(struct hydro_props *p)
void hydro_props_struct_dump(const struct hydro_props *p, FILE *stream)
void hydro_props_struct_restore(const struct hydro_props *p, FILE *stream)
void hydro_props_update(struct hydro_props *p, const struct gravity_props *gp, const struct cosmology *cosmo)
void hydro_props_print(const struct hydro_props *p)
Cosmological parameters.
Definition cosmology.h:34
Contains all the constants and parameters of the hydro scheme.
float initial_internal_energy
int use_mass_weighted_num_ngb
float minimal_internal_energy
float particle_splitting_mass_threshold
struct diffusion_global_data diffusion
float hydrogen_ionization_temperature
int max_smoothing_iterations
float target_neighbours
struct viscosity_global_data viscosity
float minimal_temperature
float hydrogen_mass_fraction
float initial_temperature