Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shammodels
sph
include
shammodels
sph
modules
SetWhenMask.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/typeAliasVec.hpp
"
21
#include "
shamrock/solvergraph/IFieldSpan.hpp
"
22
#include "
shamrock/solvergraph/Indexes.hpp
"
23
#include "
shamsolvergraph/node/INode.hpp
"
24
#include <string>
25
26
#define NODE_EDGES(X_RO, X_RW) \
27
X_RO(shamrock::solvergraph::Indexes<u32>, part_counts) \
28
X_RO(shamrock::solvergraph::IFieldSpan<u32>, mask) \
29
X_RW(shamrock::solvergraph::IFieldSpan<T>, field_to_set)
30
31
namespace
shammodels::sph::modules
{
32
43
template
<
class
T>
44
class
SetWhenMask :
public
shamrock::solvergraph::INode
{
45
46
T val_to_set;
47
u32
nvar;
48
49
public
:
50
SetWhenMask(T val_to_set,
u32
nvar = 1) : val_to_set(val_to_set), nvar(nvar) {}
51
52
EXPAND_NODE_EDGES(NODE_EDGES)
53
54
void
_impl_evaluate_internal
();
55
56
inline
virtual
std::string
_impl_get_label
()
const
{
return
"SetWhenMask"
; };
57
58
virtual
std::string
_impl_get_tex
()
const
;
59
};
60
61
}
// namespace shammodels::sph::modules
62
63
#undef NODE_EDGES
IFieldSpan.hpp
INode.hpp
Indexes.hpp
u32
std::uint32_t u32
32 bit unsigned integer
Definition
aliases_int.hpp:27
shammodels::sph::modules::SetWhenMask::_impl_get_label
virtual std::string _impl_get_label() const
get the label of the node
Definition
SetWhenMask.hpp:56
shammodels::sph::modules::SetWhenMask::_impl_evaluate_internal
void _impl_evaluate_internal()
evaluate the node
Definition
SetWhenMask.cpp:28
shammodels::sph::modules::SetWhenMask::_impl_get_tex
virtual std::string _impl_get_tex() const
get the tex of the node
Definition
SetWhenMask.cpp:56
shamrock::solvergraph::INode
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition
INode.hpp:31
shammodels::sph::modules
namespace for the sph model modules
Definition
AnalysisAngularMomentum.hpp:28
typeAliasVec.hpp
Generated on
for Shamrock by
1.15.0