In the scalfmm directory, you can locate several folders. The sources folder called Src, the examples/tests folder Tests, the unit tests folders UTests, the Addons folder which contains one sub-folder per addon, the doc directory where you can find some documentation and the data folder which contains particles files or any other data needed per the simulation examples.
Here we focus mainly on the Tests and UTests folders, and we encourage users to look directly in the code file to see how things are made.
Most of the examples need some user parameters or let the user shows some values. This is done with the FParameters class. You can open an example and find the parameters directives, like in the Tests/Utils/testStatsTree.cpp:
This means that in the console, you can tape:
In this part we will run a simulation with Spherical Harmonics and rotation optimization: ./Examples/Release/RotationFMM .
In the test file we can read:
It means, that the test file is reading FMA file (see FMA format) which can be changed but here we still use this format. We can pass a file in parameter with the -fin option. So let first create with generateDistributions 2.000.000 particles in a unit cube and store the particle in a file with the FMA format:
Which create a file called my2kkpartfile.fma.
With the Spherical harmonic expansion kernel we can choose the P=4 accuracy parameter for this kernel. RotationFMM
Here some drivers.
In this folder you will find the unit tests. There are some related to data structures (like vector or list) and some others related to real FMM.
In you compile ScalFMM and enabled the Tests (by passing a parameter to CMake or by using ccmake) any cpp file that will put into the Tests/ directories will be compiled and linked to ScalFMM. Therefore it can be a quick way to create and test with scalfmm without creating your own project and thinking about the compilation and link stages. Put your file in the test directories, enable the Tests in the cmake, be sure that the CMake is generated (type cmake.. again in the build dir), and then make your_cpp_file_without_extension