Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamphys
include
shamphys
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
18
#include "
shambase/aliases_float.hpp
"
19
#include <cmath>
20
#include <complex>
21
22
namespace
shamphys {
23
24
class
HydroSoundwave
{
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
aliases_float.hpp
f64
double f64
Alias for double.
Definition
aliases_float.hpp:20
shamphys::HydroSoundwave
Definition
HydroSoundwave.hpp:24
shamphys::HydroSoundwave::field_val
Definition
HydroSoundwave.hpp:37
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8