██████╗ ███╗ ███╗ ██████╗ ██████╗ ███╗ ██╗███████╗
╚════██╗████╗ ████║██╔═══██╗██╔═══██╗████╗ ██║██╔════╝
█████╔╝██╔████╔██║██║ ██║██║ ██║██╔██╗ ██║███████╗█████╗
██╔═══╝ ██║╚██╔╝██║██║ ██║██║ ██║██║╚██╗██║╚════██║╚════╝
███████╗██║ ╚═╝ ██║╚██████╔╝╚██████╔╝██║ ╚████║███████║
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗
██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝
██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║
██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║
██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝
- Exercise 1
- Exercise 2
- Simulation
- Next function
- Plot
- Energy check
- varriable stepsize
- some tests are missing
- PARTY!!!
| argument | meaning |
|---|---|
| -h | set initial steplenght |
| -v | calculate the inital velocity |
| -th | set the runtime in hours |
| -td | set the runtime in days |
| -ty | set the runtime in years |
| -u | set the steplenght when saving the data to the file |
| -ec | enables energy check |
| -sc | enables step check (programm gets for long simulations really slow and the simulation gets really bad, probably there is a better solution for comparring 2 steps with one step) |
| -vs | enables varriable stepsize |
| -pmin | set minimap precition |
| -pmax | set maximal precition |
For more defails see https://github.com/siu/minunit
- Write your test in
test.c
#include "../minunit.h"
MU_TEST(test_check) {
mu_check(5 == 7);
}
MU_TEST_SUITE(test_suite) {
MU_RUN_TEST(test_check);
}
int main(int argc, char *argv[]) {
MU_RUN_SUITE(test_suite);
MU_REPORT();
return 0;
}- Compile your test-file
test.c
gcc test.c -lrt -lm
- Run the executable
./path/to/executable/a.out
- Watch output