Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
HydroSoundwave.cpp
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
17
18auto shamphys::HydroSoundwave::get_value(f64 t, f64 x) -> field_val {
19 static constexpr std::complex<double> i(0.0, 1.0);
20
21 std::complex<f64> val = std::exp(i * (get_omega() * t - k * x));
22
23 return {std::real(val * rho_tilde), std::real(val * v_tilde)};
24}
double f64
Alias for double.