Code Structure

Code Structure

Structure

cellular_raza consists of multiple crates working in tandem. It was designed to have clear separations between conceptual choices and implementation details. This approach allows us to have a greater amount of modularity and flexibility than regular simulation tools.

graph BT
    examples -.-> concepts
    examples --> core
    examples --> building_blocks
    benchmarks --> core
    benchmarks --> building_blocks
    benchmarks -.-> concepts
    core --> concepts
    building_blocks --> concepts

These crates act on varying levels of abstraction to yield a fully working numerical simulation. Since cellular_raza functions on different levels of abstraction, we try to indicate this in the table below.

crate Abstraction Level Purpose
cellular_raza - Bundle together functionality of all other crates.
concepts High Collection of (mainly) traits which need to be implemented to yield a full simulation.
core Intermediate-High Contains numerical solvers, storage handlers and more to actually solve a given system.
building_blocks Intermediate Predefined components of cell-agents and domains which can be put together to obtain a full simulation.
examples Application Showcases and introductions to different simulation approaches.
benchmarks Application Performance testing of various configurations.
flowchart LR
    High --> Intermediate --> Application

Development

Language Files Lines Blank Comment Code Complexity Bytes
Rust 115 34118 3062 4926 26130 1087 1179705
Python 16 2532 337 127 2068 193 85043
License 3 1017 174 0 843 0 54276
TOML 33 655 72 11 572 0 17861
Jupyter 2 544 0 0 544 0 50002
YAML 6 467 49 112 306 0 11395
SVG 3 334 0 0 334 0 28964
HTML 5 258 6 8 244 0 9551
Markdown 13 154 27 0 127 0 8472
gitignore 12 67 3 0 64 0 461
Shell 3 43 11 3 29 0 884
Autoconf 1 2 0 0 2 0 58
Total 212 40191 3741 5187 31263 1280 1446672