feat: add example script for analysis
This commit is contained in:
+6
-1
@@ -1 +1,6 @@
|
||||
.vscode
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
build
|
||||
bin
|
||||
output
|
||||
@@ -31,9 +31,18 @@ running on a cluster you should
|
||||
|
||||
You can then start the simulation using
|
||||
|
||||
$ mpiexec -n 4 bin/karl --parameter_file=simulation_config/test_parameter.json
|
||||
$ mpiexec -n 4 bin/karl --parameter_file simulation_config/test_parameter.json
|
||||
|
||||
You can of course specify some other number of MPI threads or use a different
|
||||
JSON file. If you have to use some non-standard method to start MPI programs
|
||||
(such as poe) instead of mpiexec you might need to check the relevant
|
||||
documentation.
|
||||
|
||||
ANALYSIS OF THE SIMULATION OUTPUT:
|
||||
Python scripts are provided to analyze the output of the simulation. They can be
|
||||
found in the folder "analysis". The script require the python packages
|
||||
numpy, matplotlib, scipy and h5py.
|
||||
|
||||
An example of how to use the analysis scripts is provided in the file "analysis/plot_example.py".
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import plot_densities as pd
|
||||
|
||||
if __name__ == '__main__':
|
||||
filename_simulation_output = input("Enter filename of simulation output: ")
|
||||
output_folder = input("Enter output folder: ")
|
||||
|
||||
species = pd.getSpecies(filename_simulation_output)
|
||||
|
||||
pd.plotAllDensityVsZ(filename_simulation_output, "LastSyncPeriod", species, output_folder)
|
||||
pd.plotAllSpectrumAtZ(filename_simulation_output, 8, "LastSyncPeriod", species, output_folder)
|
||||
@@ -23,7 +23,6 @@ class VectorFieldFromArray : public VectorField {
|
||||
CylinderVector value(const Coordinate& coordinate) const;
|
||||
|
||||
private:
|
||||
// todo: make sure we use fast axis on z to reduce acess time
|
||||
const blitz::Array<double, 3> Fr_;
|
||||
const blitz::Array<double, 3> Fphi_;
|
||||
const blitz::Array<double, 3> Fz_;
|
||||
|
||||
Reference in New Issue
Block a user