diff --git a/exercice_4/README.md b/exercice_4/README.md index 6cc11c0..a90350a 100644 --- a/exercice_4/README.md +++ b/exercice_4/README.md @@ -1,41 +1,52 @@ # Readme exercice 4 code by Marti Bosch (marti.bosch@epfl.ch) and Marc Schwaerzel (marc.schwaerzel@epfl.ch) ## Exercise 1 ## Exercise 2 2.2 We used shared pointers for the pybind of the classes compute and compute_temperature in order not to desallocate when python's reference count goes to 0. A unique pointer could lead to a segmentation fault (memory allocation issues). 2.3 We used the method where we put setters directely in the compute_temperature.py in order to access private members from outside the class.But there is a smarter way to access private members --> reread class notes and implement them. ## Exercise 3 created bind for csvwriter, evol.setNsteps, evol.setDumpFreq and evol.evolve... -still need something for self.system_evolution.addCompute(compute_temp) ln50 of main ## Instructions to run the code To run the code follow the instructions: 1) Create a new directory in the exercice_4 directory and go into that folder: $ mkdir build $ cd build 2) Check whether your paths are set correctly $ ccmake ../ 2) Compile the code: $ cmake ../ $ make -3) Then run as follows +3) Find an input file and move it into our current build file: + e.g. take the input file created with generate_heat_distribution.py from exercice_3 + (see README from exercice_3 to use the python function) - $ ./particles --help +4) Make a folder to store the ouputs files + $ mkdir dumps + +5) Then run as follows + + $ python ./src/main.py arg1 arg2 arg3 arg4 arg5 - Usage: ./particles nsteps dump_freq input.csv particle_type timestep - particle type can be: planet, ping_pong, material_point + where: arg1 is the number of steps (e.g. 1000) + arg2 is the dump frequency (e.g. 10) + arg3 is the input filename (e.g. step-00000.csv from last ex) + arg4 is the particle type (e.g. material_point) + arg5 is the timestep (e.g. 1) + +