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
19
20#include "shambackends/sycl.hpp"
21
22namespace shamphys {
23
35 template<class Tscal>
38 Tscal cs;
39 };
40
53 template<class Tscal>
56 Tscal gamma;
57 };
58
71 template<class Tscal>
72 inline bool operator==(
74 return lhs.gamma == rhs.gamma;
75 }
76
89 template<class Tscal>
91 Tscal K;
92 Tscal gamma;
93 };
94
107 template<class Tscal>
108 inline bool operator==(
110 return (lhs.K == rhs.K) && (lhs.gamma == rhs.gamma);
111 }
112
122 template<class Tscal>
124 Tscal cs0;
125 Tscal rho0;
126 Tscal gamma0;
127 };
128
138 template<class Tscal>
139 inline bool operator==(
141 return (lhs.cs0 == rhs.cs0) && (lhs.rho0 == rhs.rho0) && (lhs.gamma0 == rhs.gamma0);
142 }
143
156 template<class Tscal>
158 Tscal mu_e;
159 };
160
173 template<class Tscal>
174 inline bool operator==(const EOS_Config_Fermi<Tscal> &lhs, const EOS_Config_Fermi<Tscal> &rhs) {
175 return lhs.mu_e == rhs.mu_e;
176 }
177
187 template<class Tscal>
190 Tscal cs0;
191
193 Tscal q;
194
196 Tscal r0;
197 };
198
211 template<class Tscal>
212 inline bool operator==(
215 return (lhs.cs0 == rhs.cs0) && (lhs.q == rhs.q) && (lhs.r0 == rhs.r0);
216 }
217
229 template<class Tscal>
231 Tscal h_over_r = 0.05;
232 };
233
246 template<class Tscal>
247 inline bool operator==(
250 return (lhs.h_over_r == rhs.h_over_r);
251 }
252
287 template<class Tscal>
301
315 template<class Tscal>
316 inline bool operator==(
319 return (lhs.cs0 == rhs.cs0) && (lhs.q == rhs.q) && (lhs.r0 == rhs.r0)
320 && (lhs.n_sinks == rhs.n_sinks);
321 }
322
323} // 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 the barotropic equation of state.
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.