3 This is a specialization project looking at **Numerical Simulation Comparing the Burridge-Knopoff and Burridge-Knopoff-Pad Model**. Below is a description of the project.
5 The project looks at comparing the Burridge-Knopoff(BK) and Burridge-Knopoff-Pad(BKP) model. These are simulated by solving two differential equations through a numerical scheme. In this project the 2nd order Runge-Kutta scheme is used. See simulation page for overview of the classes and function. This can be achived by clicked the hyperlink or find "Simulation" at the bottom of the Classes page accessible through the bar above. This documentation also include all python code used for visualising, analysing and animating the simulations. These are support to the main implementation.
7 More information about the Simulation code, animtation and other python scripts can be found in the subpages listed in Related Pages in the bar above.
9 The project is based on the **The Burrigde-Knopoff-Pad Model** Thesis by a previous NTNU-student.
14 * **bin**: output executables, from the app and test and spike
15 * **build**: contains all object files,
16 * **doc**: all notes amd configuration files are located here
17 * **html**: doxygen documentation outputted as html
18 * **include**: project header files
19 * **latex**: docygen documentation outputted as tex-files
20 * **lib**: libraries are set here that gets compiled by the project. They should be stored in the local **lib** directory, but is placed here if they are tested on or can not be installed elsewhere for some reason
21 * **results**: all run results are store in a each's own folder together with the code and parameters used for that specific run. This makes it possible to regenerate results even when the main code has changed.
22 * **spike**: small classes to test things and libraries, stored to see if they are useful in future versions
23 * **src**: application and the source files
24 * **test**: test files
26 ## How to run the main code:
28 The main code is the simulations used to run the BK and BKP model which is writte in C++. Here is a short guide on how to run the code.
29 All code and documentation can otherwise be reached through Classes and Files in the bar above.
31 ### Compile and run c++ code
33 To run the code it is required that **CMake** and **Make** is installed. Resources online will tell you how to install these.
34 The required libraries must be installed before compiling(see the **Libraries** section below).
37 $ cd <path_to_project_folder>
51 $ ./bin/<compiled filename>
54 If you want to run with **gdb** debugging options, run
58 $ cmake -DCMAKE_BUILD_TYPE=Debug .
61 If you want to run with **locally** linked libraries. Which can be hardcoded in the CMakeFile in **src/alph**. This is an option when the compiled version needs to be run on a computer without rights to install the required packages.
64 $ cmake -DLOCAL:BOOL=true .
69 ### Generate doxygen documentation(html)
71 Please check you have the following packages installed, if not the doxygen set-up might fail or parts of the output will be different than expected.
74 * Qt, which is a GUI tool
79 If the documentation has not been created in the **html** folder or needs to be updated, run the below command from the parent directory.
83 the produced documentation can then be opened in the preffered browser. Example below is given with firefox.
86 $ firefox html/index.html
88 If generation of latex documentation is enabled this can be found in the folder **latex**. To view the documentation as a pdf simply write
93 from the **latex** folder.
98 ### Eigen(old code from previous thesis)
100 To install the **Eigen** package you need to pull a repository to a folder you have access to.
101 At this time (18.09.2018) this can be found at [eigen git repository](https://github.com/eigenteam/eigen-git-mirror "Eigen git repository").
102 Then it is pratical to make a _environment variable_, so that CMake will recognise it
105 export EIGEN3_INCLUDE_DIR=<path_to_eigen_local_repository>
110 I have used Ubuntu when programming, but should work on Windows and Mac. More information about different installations can be found [here](http://arma.sourceforge.net/download.html "Armadillo installation notes"). For documentation go to the [documentation site](http://arma.sourceforge.net/docs.html "Armadillo documentation site"). If you use ubuntu you can use the prebuilt armadillo package.
117 Lets you see the dependencies for an executable, ex; go to the bin/ folder and do ```ldd readParameters```.