Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
NodeFreeAlloc.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
21
22#define NODE_EDGES(X_RO, X_RW) X_RW(shamrock::solvergraph::IEdge, to_free)
23
24namespace shamrock::solvergraph {
25
32 class NodeFreeAlloc : public INode {
33
34 public:
35 NodeFreeAlloc() {}
36
37 EXPAND_NODE_EDGES(NODE_EDGES)
38
39
40 inline void _impl_evaluate_internal() { get_edges().to_free.free_alloc(); }
41
43 inline virtual std::string _impl_get_label() const { return "FreeAlloc"; };
44
46 inline virtual std::string _impl_get_tex() const {
47 std::string tex = R"tex(
48 Free allocation ${to_free}$
49 )tex";
50
51 replace_edges_tex_symbols(tex);
52
53 return tex;
54 }
55 };
56
57} // namespace shamrock::solvergraph
58
59#undef NODE_EDGES
virtual std::string _impl_get_tex() const
Get the TeX representation of the node.
void _impl_evaluate_internal()
Evaluate the node.
virtual std::string _impl_get_label() const
Get the label of the node.