Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
HydroSoundwave.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
19#include <cmath>
20#include <complex>
21
22namespace shamphys {
23
25 public:
26 f64 cs;
27 f64 k;
28
29 std::complex<f64> rho_tilde;
30 std::complex<f64> v_tilde;
31
32 HydroSoundwave(f64 _cs, f64 _k, std::complex<f64> _rho_tilde, std::complex<f64> _v_tilde)
33 : cs(_cs), k(_k), rho_tilde(_rho_tilde), v_tilde(_v_tilde) {}
34
35 inline f64 get_omega() { return cs * k; }
36
37 struct field_val {
38 f64 rho, v;
39 };
40
41 field_val get_value(f64 t, f64 x);
42 };
43
44} // namespace shamphys
double f64
Alias for double.