Update Code Architecture and Organization authored by Alain O' Miniussi's avatar Alain O' Miniussi
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
The main purpose of a fargo3D simulation is to track the evolution of a planetary system embedded in a disk of gas. Those two entities will be represented by a **Disk** and **PlanetarySystem** class respectively. A single simulation will instantiate one object of each. The main purpose of a fargo3D simulation is to track the evolution of a planetary system embedded in a disk of gas. Those two entities will be represented by a **Disk** and **PlanetarySystem** class respectively. A single simulation will instantiate one object of each.
That simulation is driven by an instance of the **SimulationDriver** class (currently implementing a simple [Command pattern](https://en.wikipedia.org/wiki/Command_pattern), but might evolve into a [Template Method](https://en.wikipedia.org/wiki/Template_method_pattern). It behave like a function object with perform one step of the simulation at each call. That simulation is driven by an instance of the **Simulation** class (currently implementing a simple [Command pattern](https://en.wikipedia.org/wiki/Command_pattern), but might evolve into a [Template Method](https://en.wikipedia.org/wiki/Template_method_pattern). It behave like a function object with perform one step of the simulation at each call.
The simulation configuration is done through a property tree. The simulation configuration is done through a property tree.
...@@ -11,19 +11,19 @@ The main sequence diagram can be seen as follow: ...@@ -11,19 +11,19 @@ The main sequence diagram can be seen as follow:
```plantuml ```plantuml
participant main participant main
participant driver participant simulation
participant disk participant disk
participant planets participant planets
database storage database storage
main -> disk : load initial state main -> disk : load initial state
main -> driver : create main -> simulation : create
loop monitor loop monitor
loop time steps loop time steps
main -> driver : next step main -> simulation : next step
driver -> disk : sub step 1 simulation -> disk : sub step 1
driver -> disk : sub step <N> simulation -> disk : sub step <N>
disk -> planets : rotate disk -> planets : rotate
driver -> main : done simulation -> main : done
end end
main -> disk : write state main -> disk : write state
disk -> storage : dump fields disk -> storage : dump fields
... ...
......