Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamphys
include
shamphys
collapse.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
17
18
#include "
shambackends/math.hpp
"
19
#include "
shammath/matrix.hpp
"
20
#include "
shamunits/Constants.hpp
"
21
#include "
shamunits/UnitSystem.hpp
"
22
23
namespace
shamphys {
24
25
template
<
class
T>
26
T free_fall_time(T rho, T G) {
27
return
sycl::sqrt(3 *
shamunits::pi<T>
/ (32 * G * rho));
28
}
29
30
template
<
class
T>
31
T free_fall_time(T rho,
const
shamunits::UnitSystem<T> usys = {}) {
32
return
free_fall_time(rho, shamunits::Constants{usys}.G());
33
}
34
35
}
// namespace shamphys
Constants.hpp
UnitSystem.hpp
math.hpp
matrix.hpp
shamunits::pi
constexpr T pi
Value of pi Usage : auto pi = shamunits::pi<T>;.
Definition
Constants.hpp:94
Generated on
for Shamrock by
1.15.0