Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
sph
include
shammodels
sph
modules
SinkParticlesUpdate.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
#include "
shambackends/typeAliasVec.hpp
"
20
#include "
shambackends/vec.hpp
"
21
#include "
shammodels/sph/SinkPartStruct.hpp
"
22
#include "
shammodels/sph/SolverConfig.hpp
"
23
#include "
shammodels/sph/modules/SolverStorage.hpp
"
24
#include "
shamrock/scheduler/ShamrockCtx.hpp
"
25
26
namespace
shammodels::sph::modules
{
27
28
template
<
class
Tvec,
template
<
class
>
class
SPHKernel>
29
class
SinkParticlesUpdate
{
30
public
:
31
using
Tscal = shambase::VecComponent<Tvec>;
32
static
constexpr
u32
dim =
shambase::VectorProperties<Tvec>::dimension
;
33
using
Kernel = SPHKernel<Tscal>;
34
35
using
Config
=
SolverConfig<Tvec, SPHKernel>
;
36
using
Storage
=
SolverStorage<Tvec, u32>
;
37
38
ShamrockCtx
&context;
39
Config
&solver_config;
40
Storage
&storage;
41
42
using
Sink
=
SinkParticle<Tvec>
;
43
44
SinkParticlesUpdate
(
ShamrockCtx
&context,
Config
&solver_config,
Storage
&storage)
45
: context(context), solver_config(solver_config), storage(storage) {}
46
47
void
accrete_particles(Tscal dt);
48
void
predictor_step(Tscal dt);
49
void
compute_sph_forces();
50
void
compute_ext_forces();
51
void
corrector_step(Tscal dt);
52
53
private
:
54
inline
PatchScheduler
&scheduler() {
return
shambase::get_check_ref
(context.sched); }
55
};
56
57
}
// namespace shammodels::sph::modules
ShamrockCtx.hpp
SinkPartStruct.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
PatchScheduler
The MPI scheduler.
Definition
PatchScheduler.hpp:85
ShamrockCtx
Definition
ShamrockCtx.hpp:42
shammodels::sph::SolverStorage
Definition
SolverStorage.hpp:48
shammodels::sph::modules::SinkParticlesUpdate
Definition
SinkParticlesUpdate.hpp:29
shambase::get_check_ref
T & get_check_ref(const std::unique_ptr< T > &ptr, SourceLocation loc=SourceLocation())
Takes a std::unique_ptr and returns a reference to the object it holds. It throws a std::runtime_erro...
Definition
memory.hpp:110
shammodels::sph::modules
namespace for the sph model modules
Definition
AnalysisAngularMomentum.hpp:28
SolverConfig.hpp
SolverStorage.hpp
sham::VectorProperties
Definition
vec.hpp:25
shammodels::sph::SinkParticle
Definition
SinkPartStruct.hpp:24
shammodels::sph::SolverConfig
The configuration for a sph solver.
Definition
SolverConfig.hpp:272
typeAliasVec.hpp
vec.hpp
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8