Peano
Loading...
Searching...
No Matches
signal_velocity.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of SWIFT.
3 * Coypright (c) 2022 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_SIGNAL_VELOCITY_H
20#define SWIFT_SIGNAL_VELOCITY_H
21
22/* Config parameters. */
23#include <config.h>
24
25#ifndef NONE_MHD
26
27/* Include MHD definition of signal velocity */
28#include "mhd.h"
29
43__attribute__((always_inline)) INLINE static float signal_velocity(
44 const float dx[3], const struct part *restrict pi,
45 const struct part *restrict pj, const float mu_ij, const float beta) {
46
47 return mhd_signal_velocity(dx, pi, pj, mu_ij, beta);
48}
49
50#else
51
52/* Include hydro definition of signal velocity */
53#include "hydro.h"
54
68__attribute__((always_inline)) INLINE static float signal_velocity(
69 const float dx[3], const struct part *restrict pi,
70 const struct part *restrict pj, const float mu_ij, const float beta) {
71
72 return hydro_signal_velocity(dx, pi, pj, mu_ij, beta);
73}
74
75#endif
76
77#endif /* SWIFT_SIGNAL_VELOCITY_H */
const float dx[3]
Definition hydro_iact.h:54
#define INLINE
Defines inline.
Definition inline.h:36
const struct part *restrict const struct part *restrict const float const float beta
const struct part *restrict const struct part *restrict pj
__attribute__((always_inline)) INLINE static float signal_velocity(const float dx[3]
Compute the signal velocity between two gas particles, MHD case.
const struct part *restrict const struct part *restrict const float mu_ij
Particle fields for the SPH particles.
Definition hydro_part.h:99