Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
This example is meant as a minimal example of how to use only the statistics component of alsvinn::alsuq
.
First you need too build alsvinn, see the documentation.
This should be straightforward:
mkdir build cd build cmake .. -DCMAKE_PREFIX_PATH=<path to either alsvinn/build or alsvinn-install-path> -DCMAKE_BUILD_TYPE=Release make
We want to compute the structure functions of "random noise". To this end, we want to use the statistics module of alsvinn.
We create a separate function to create the statitics:
To create statistics, we need to make a new instance of the statisticsFactory
then we setup the parameter struct
notice how we use boost::property_tree for inserting parameters passed directly to the statistics (p and numberOfH), while we set the other parameters to the parameter struct directly
And lastly, we create and return the statistics.