@@ -17,8 +17,65 @@ During a single time step or an intermediate step of the time integration scheme
1717` drift! ` and ` kick! ` are invoked, followed by the functions depicted in this diagram
1818(with key parts highlighted in orange/yellow).
1919
20- ![ Main Program Flow] ( https://github.com/trixi-framework/TrixiParticles.jl/assets/10238714/d7c6eedd-7173-4879-b62e-3e6d4bc5091f )
20+ ``` mermaid
21+ %% Make arrows bend at right angles
22+ %%{ init : { "flowchart" : { "curve" : "stepAfter" }}}%%
2123
24+ %% TD means vertical layout
25+ flowchart TD
26+ %% --- Define color palette and styles ---
27+ classDef start_node fill:#d9ead3,stroke:#333,color:#333
28+ classDef time_integration fill:#d9d2e9,stroke:#333,color:#333
29+ classDef primary_stage fill:#cfe2f3,stroke:#333,color:#333
30+ classDef update fill:#eeeeee,stroke:#333,color:#333
31+ classDef updates fill:#fff2cc,stroke:#333,color:#333
32+ classDef physics fill:#fce5cd,stroke:#333,color:#333
33+
34+ A(simulation) --> B[time integration];
35+
36+ %% Add hidden dummy node to branch the arrow nicely
37+ B --- dummy[ ];
38+ style dummy width:0;
39+ dummy --> C["drift!<br/>(update du/dt)"];
40+
41+ subgraph kick["<div style='padding: 10px; font-weight: bold;'>kick! (update dv/dt)</div>"]
42+ %% Horizontal layout within this subgraph
43+ direction LR;
44+
45+ subgraph updates["<div style='padding: 10px; font-weight: bold;'>update_systems_and_nhs</div>"]
46+ %% Vertical layout within this subgraph
47+ direction TB;
48+
49+ H["update_positions!<br/>(moving boundaries and structures)"];
50+ I["update_nhs!<br/>(update neighborhood search)"];
51+ J["update_quantities!<br/>(recalculate density etc.)"];
52+ K["update_pressure!<br/>(recalculate pressure etc.)"];
53+ L["update_boundary_interpolation!<br/>(interpolate boundary pressure)"];
54+ M["update_final!<br/>(update shifting)"];
55+
56+ H --> I --> J --> K --> L --> M;
57+ end
58+
59+ F["system_interaction!<br/>(e.g. momentum/continuity equation)"];
60+ G["add_source_terms!<br/>(gravity and source terms)"];
61+
62+ updates --> F --> G;
63+ end
64+
65+ dummy --> kick;
66+
67+ %% Color the sub-tasks by their function
68+ class A start_node;
69+ class B time_integration;
70+ class C primary_stage;
71+ class kick primary_stage;
72+ class updates update;
73+ class H,I,J,K,L,M updates;
74+ class F,G physics;
75+
76+ %% Style the arrows
77+ linkStyle default stroke-width:2px,stroke:#555
78+ ```
2279
2380## Structure
2481What we refer to as schemes are various models such as Weakly Compressible Smoothed Particle Hydrodynamics (WCSPH)
0 commit comments