Philosophy of examples and how to run them

From Medusa: Coordinate Free Mehless Method implementation
Revision as of 08:04, 3 August 2018 by BlazS (talk | contribs)

Jump to: navigation, search

The essence of our examples is to present the functionality of the library in an accessible and digestible manner. The examples present different solutions to problems ranging in difficulty from the simple Poisson's equation to Fluid mechanics. Accompanying each example are Matlab scripts which were used to produce the figures the reader meets throughout this section, both the scripts and examples are made to work as is, so the reader can simply run the examples on their machine.

Out of source builds are preferred, the building is done in the build/ directory. When you are in the example folder you want to use, run

mkdir -p build
cd build
cmake ..
make

to build all targets. Note that you only have to run cmake once, after that only make is sufficient. Binaries are placed into bin/ folder and libraries are placed into lib/ folder.

To build a single target you only need to run (after running cmake)

make example

To run the built example, go to bin/ and run

./example