Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
sph
include
shammodels
sph
modules
KillParticles.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 "
shamrock/solvergraph/DistributedBuffers.hpp
"
20
#include "
shamrock/solvergraph/INode.hpp
"
21
#include "
shamrock/solvergraph/PatchDataLayerRefs.hpp
"
22
23
namespace
shammodels::sph::modules
{
24
25
class
KillParticles
:
public
shamrock::solvergraph::INode
{
26
27
public
:
28
KillParticles
() =
default
;
29
30
struct
Edges
{
31
const
shamrock::solvergraph::DistributedBuffers<u32>
&part_to_remove;
32
shamrock::solvergraph::PatchDataLayerRefs
&patchdatas;
33
};
34
35
inline
void
set_edges(
36
std::shared_ptr<
shamrock::solvergraph::DistributedBuffers<u32>
> part_to_remove,
37
std::shared_ptr<shamrock::solvergraph::PatchDataLayerRefs> patchdatas) {
38
__internal_set_ro_edges
({part_to_remove});
39
__internal_set_rw_edges
({patchdatas});
40
}
41
42
inline
Edges get_edges() {
43
return
Edges{
44
get_ro_edge<shamrock::solvergraph::DistributedBuffers<u32>>(0),
45
get_rw_edge<shamrock::solvergraph::PatchDataLayerRefs>(0)};
46
}
47
48
void
_impl_evaluate_internal
();
49
50
inline
virtual
std::string
_impl_get_label
()
const
{
return
"KillParticles"
; };
51
52
virtual
std::string
_impl_get_tex
()
const
;
53
};
54
}
// namespace shammodels::sph::modules
DistributedBuffers.hpp
Defines the DistributedBuffers class for managing distributed device buffers in a solver graph.
INode.hpp
PatchDataLayerRefs.hpp
Defines the PatchDataLayerRefs class for managing distributed references to patch data layers.
shammodels::sph::modules::KillParticles
Definition
KillParticles.hpp:25
shammodels::sph::modules::KillParticles::_impl_get_tex
virtual std::string _impl_get_tex() const
get the tex of the node
Definition
KillParticles.cpp:37
shammodels::sph::modules::KillParticles::_impl_get_label
virtual std::string _impl_get_label() const
get the label of the node
Definition
KillParticles.hpp:50
shammodels::sph::modules::KillParticles::_impl_evaluate_internal
void _impl_evaluate_internal()
evaluate the node
Definition
KillParticles.cpp:21
shamrock::solvergraph::DistributedBuffers
Interface for a solver graph edge representing a field as spans.
Definition
DistributedBuffers.hpp:39
shamrock::solvergraph::INode
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition
INode.hpp:30
shamrock::solvergraph::INode::__internal_set_rw_edges
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
Definition
INode.hpp:181
shamrock::solvergraph::INode::__internal_set_ro_edges
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
Definition
INode.hpp:171
shamrock::solvergraph::PatchDataLayerRefs
Definition
PatchDataLayerRefs.hpp:26
shammodels::sph::modules
namespace for the sph model modules
Definition
AnalysisAngularMomentum.hpp:28
shammodels::sph::modules::KillParticles::Edges
Definition
KillParticles.hpp:30
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8