Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
eos_config.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
20#include "shambackends/sycl.hpp"
23
24namespace shamphys {
25
37 template<class Tscal>
40 Tscal cs;
41 };
42
55 template<class Tscal>
58 Tscal gamma;
59 };
60
73 template<class Tscal>
74 inline bool operator==(
76 return lhs.gamma == rhs.gamma;
77 }
78
91 template<class Tscal>
93 Tscal K;
94 Tscal gamma;
95 };
96
109 template<class Tscal>
110 inline bool operator==(
112 return (lhs.K == rhs.K) && (lhs.gamma == rhs.gamma);
113 }
114
127 template<class Tscal>
129 Tscal mu_e;
130 };
131
144 template<class Tscal>
145 inline bool operator==(const EOS_Config_Fermi<Tscal> &lhs, const EOS_Config_Fermi<Tscal> &rhs) {
146 return lhs.mu_e == rhs.mu_e;
147 }
148
158 template<class Tscal>
161 Tscal cs0;
162
164 Tscal q;
165
167 Tscal r0;
168 };
169
182 template<class Tscal>
183 inline bool operator==(
186 return (lhs.cs0 == rhs.cs0) && (lhs.q == rhs.q) && (lhs.r0 == rhs.r0);
187 }
188
200 template<class Tscal>
202 Tscal h_over_r = 0.05;
203 };
204
217 template<class Tscal>
218 inline bool operator==(
221 return (lhs.h_over_r == rhs.h_over_r);
222 }
223
258 template<class Tscal>
272
286 template<class Tscal>
287 inline bool operator==(
290 return (lhs.cs0 == rhs.cs0) && (lhs.q == rhs.q) && (lhs.r0 == rhs.r0)
291 && (lhs.n_sinks == rhs.n_sinks);
292 }
293
294} // namespace shamphys
std::uint32_t u32
32 bit unsigned integer
bool operator==(const EOS_Config_Adiabatic< Tscal > &lhs, const EOS_Config_Adiabatic< Tscal > &rhs)
Equal operator for the EOS_Config_Adiabatic struct.
Configuration struct for adiabatic equation of state.
Tscal gamma
Adiabatic index.
Configuration struct for Fermi equation of state.
Tscal mu_e
mu_e is the mean molecular weight
Configuration struct for isothermal equation of state.
Configuration struct for the locally isothermal equation of state extended from Farris 2014 to includ...
u32 n_sinks
Number of sinks to consider for the equation of state.
Tscal q
Power exponent of the soundspeed profile.
Configuration struct for the locally isothermal equation of state from Farris 2014.
Configuration struct for the locally isothermal equation of state from Lodato Price 2007.
Tscal cs0
Soundspeed at the reference radius.
Tscal q
Power exponent of the soundspeed profile.
Configuration struct for polytropic equation of state.