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
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
shamunits::UnitSystem
Defines a unit system.
Definition
UnitSystem.hpp:77
math.hpp
matrix.hpp
shamunits::Constants
Physical constants.
Definition
Constants.hpp:112
shamunits::Constants::G
constexpr T G()
get the value of G in the current unit system units
Definition
Constants.hpp:175
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8