Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
SodTube.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
20namespace shamphys {
21
22 class SodTube {
23 public:
24 f64 gamma;
25 f64 rho_1, rho_5;
26 f64 P_1, P_5;
27 f64 vx_1, vx_5;
28
29 SodTube(f64 _gamma, f64 _rho_1, f64 _P_1, f64 _rho_5, f64 _P_5);
30
31 struct field_val {
32 f64 rho, vx, P;
33 };
34
35 field_val get_value(f64 t, f64 x);
36
37 private:
38 f64 c_1, c_5;
39
40 f64 soundspeed(f64 P, f64 rho);
41
42 f64 solve_P_4();
43 };
44
45} // namespace shamphys
double f64
Alias for double.