Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
OperationSequence.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
20
21namespace shamrock::solvergraph {
22
23 class OperationSequence : public INode {
24 std::vector<std::shared_ptr<INode>> nodes;
25 std::string name;
26
27 public:
28 OperationSequence(std::string name, std::vector<std::shared_ptr<INode>> &&_nodes)
29 : nodes(std::forward<std::vector<std::shared_ptr<INode>>>(_nodes)), name(name) {
30 if (nodes.size() == 0) {
32 "OperationSequence must have at least one node");
33 }
34 }
36
37 inline std::string _impl_get_label() const { return name; }
38
39 std::string _impl_get_dot_graph_partial() const;
40
41 inline virtual std::string _impl_get_dot_graph_node_start() const {
42 return nodes[0]->get_dot_graph_node_start();
43 }
44 inline virtual std::string _impl_get_dot_graph_node_end() const {
45 return nodes[nodes.size() - 1]->get_dot_graph_node_end();
46 }
47
48 std::string _impl_get_tex() const;
49 };
50
51} // namespace shamrock::solvergraph
Inode is node between data edges, takes multiple inputs, multiple outputs.
Definition INode.hpp:30
virtual std::string _impl_get_dot_graph_node_end() const
get the dot graph of the node end
std::string _impl_get_tex() const
get the tex of the node
virtual std::string _impl_get_dot_graph_node_start() const
get the dot graph of the node start
std::string _impl_get_label() const
get the label of the node
std::string _impl_get_dot_graph_partial() const
get the dot graph of the node partial
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.