Difference between revisions of "Philosophy of examples and how to run them"

From Medusa: Coordinate Free Mehless Method implementation
Jump to: navigation, search
Line 1: Line 1:
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.
+
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.
  
IN PROGRESS
+
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
 +
<syntaxhighlight>
 +
mkdir -p build
 +
cd build
 +
cmake ..
 +
make
 +
</syntaxhighlight>
 +
 
 +
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)
 +
<syntaxhighlight>
 +
make example
 +
</syntaxhighlight>
 +
 
 +
To run the built example, go to bin/ and run
 +
<syntaxhighlight>
 +
./example
 +
</syntaxhighlight>

Revision as of 09:04, 3 August 2018

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