34 std::vector<ISPHSetupNode_Dot> inputs;
50 std::vector<u32> inputs_id{};
51 for (
auto &in : inputs) {
52 inputs_id.push_back(in.add_node(counter, out));
55 u32 counter_val = counter;
58 out +=
"node_" + std::to_string(counter_val) +
" [label=\"" + name +
"\"];\n";
60 for (
auto i : inputs_id) {
61 out +=
"node_" + std::to_string(i) +
" -> node_" + std::to_string(counter_val)
125 out +=
"digraph G {\n";
126 out +=
"rankdir=LR;\n";
131 out +=
"node_" + std::to_string(counter + 1) +
" [label=\"Simulation\"];\n";
132 out +=
"node_" + std::to_string(final_node) +
" -> node_" + std::to_string(counter + 1)
std::uint32_t u32
32 bit unsigned integer
This class is an interface that all SPH setup nodes must implement. It describe an operation associat...
virtual shamrock::patch::PatchDataLayer next_n(u32 nmax)=0
This function generate patchdata with at most nmax per MPI ranks This function is always assumed as c...
std::string get_dot()
Generate a dot graph for the setup tree.
virtual ISPHSetupNode_Dot get_dot_subgraph()=0
Get a dot subgraph describing the node and its childrens (recursively)
virtual bool is_done()=0
This function return true if the setup is done.
virtual ~ISPHSetupNode()=default
Virtual destructor for the ISPHSetupNode class.
virtual std::string get_name()=0
Get the name of the node.
PatchDataLayer container class, the layout is described in patchdata_layout.
namespace for the sph model modules
std::shared_ptr< ISPHSetupNode > SetupNodePtr
Alias for a shared pointer to an ISPHSetupNode.
This struct is used to generate a dot graph of the setup tree.
u32 add_node(u32 &counter, std::string &out)
This function generate a dot graph for the setup tree.