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 **GasDisk** 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.
...
...
@@ -12,21 +12,21 @@ The main sequence diagram can be seen as follow:
```plantuml
participant main
participant driver
participant gasDisk
participant disk
participant planets
database storage
main -> gasDisk : load initial state
main -> disk : load initial state
main -> driver : create
loop monitor
loop time steps
main -> driver : next step
driver -> gasDisk : sub step 1
driver -> gasDisk : sub step <N>
driver -> disk : sub step 1
driver -> disk : sub step <N>
gasDisk -> planets : rotate
driver -> main : done
end
main -> gasDisk : write state
gasDisk -> storage : dump fields
main -> disk : write state
disk -> storage : dump fields
main -> planets : monitor
planets -> storage : write position and masses
main -> storage : write disk info
...
...
@@ -42,13 +42,13 @@ class SystemPhysic <<(S,#FF7700)>> {
The most part of the program is spent manipulating **PolarGrid**[^2] instances. A polar grid is basically a 3D field of continuous floating point data organized on a grid with as `[nr radial][ni layer][ns sector]` if we use $`nr*ni*ns`$ grids.
The most part of the program is spent manipulating **ScalarField**[^2] instances. A scalar field is basically a 3D field of continuous floating point data organized on a grid with as `[nr radial][ni layer][ns sector]` if we use $`nr*ni*ns`$ grids.
This object only store the data as a [std::valarray<double>](http://www.cplusplus.com/reference/valarray/)[^4] object field, but also export it as an old fashioned C pointer[^3].
...
...
@@ -134,7 +134,7 @@ The "almost" is important, as in the short term, it will allow close to trivial
* **DiskPhysic** provide the physical parameter of the disk. It is close to a direct mapping of the user provided property tree.
* **SystemPhysic** paly a similar role for the planetary system.
* **DiskGrid** is . It describe discretization of the (possibly flat) cylinder containing the gas. That include the grid points, aperture, etc.. and some usefull pre computed values. More than one **DiskGrid** object exist when the grid resolution is modified and a polar grid need to be re-mapped.
* **GridDispatch** is . It describe discretisation of the (possibly flat) cylinder containing the gas. That include the grid points, aperture, etc.. and some useful pre computed values. More than one **GridDispatch** object exist when the grid resolution is modified and a polar grid need to be re-mapped.
## Boundaries Conditions
...
...
@@ -146,7 +146,6 @@ Boundaries condition are implemented through **BoundariesHandler** [function obj
-------
[^1]: In particular, the diagram does not detail the configuration aspects in details.
[^2]: Not a very smart name, but **Field** was already used at the time. It might change in the future.
[^3]: Mostly for backward compatibility/laziness/lack of time.
[^4]: Intel has [special optimizations](https://software.intel.com/en-us/articles/using-improved-stdvalarray-with-intelr-c-compiler) for `std::valarray`, has not been tested yet.