This repository contains a template for a BioDynaMo simulation. It consists of
the two folders src/
and test/
. The src/
folder contains the simulation.
All custom classes and functions that users create to simulate a system
should ideally end up here. The test/
folder contains examples for unit tests.
We strongly encourage our users to follow a test driven development process,
i.e. create unit tests for all fundamental building blocks of their simulation.
By doing so, you can always be sure that a certain function or a class behaves
as you expect it to. The .cc
files in test/
are automatically linked against
the GoogleTest framework. For more information, please consult the appropriate
GitHub page or the
Googletest primer.
Whenever you interact with this repository, make sure you have sourced BioDynaMo
correctly. If it's sourced, you'll see a [bdm-1.X.YY]
in your terminal
(be aware that some terminals might not show it explicitly).
Anytime that you open a new terminal, you have to source it again.
. <path_to_biodynamo>/build/bin/thisbdm.sh
You can verify that BioDynaMo has been sourced correctly by running
biodynamo demo
. In the following, we want to explain how to build, run, and
test your simulation.
Option 1:
biodynamo build
Option 2:
mkdir build && cd build
cmake ..
make -j <number_of_processes_for_build>
Before running the simulation, you need to build it. If you haven't done so, please go back to step 1.
Option 1:
biodynamo run
Option 2:
./build/SimpleDemo
Before running the unit tests, you need to build them. If you haven't done so, please go back to step 1.
Option 1:
biodynamo test
Option 2:
./build/SimpleDemo-test
Option 2:
cd build && ctest && cd ..