Readme exercice 3: code created by Marti Bosch (marti.bosch@epfl.ch) and Marc Schwaerzel (marc.schwaerzel@epfl.ch) # Exercise 1 In progress: The particle objects are organised in the folowing way: the MaterialPoint, PingPongBall and Planet object inherit from the Particle class. Their respective factories inherit from the PatriclesFactoryInterface. And the different tests inherit from the Test class. The different compute inherit from the mother Compute. In our exercice, we will use the MaterialPoint object that inherits from Particle and will use the ComputeTemperature that inherits from compute. We will also use the Matrix and the FFT modules in order to compute our propagation of the heat. Matrix will treat all operations in relation with matrices and fft will compute the fast fourrier transforms. # Exercise 2 # Exercise 3 I added the compute frequencies as I understood it from the internet, examples and in particuar the numpy.fft.fftfreq # Exercise 4 # 4.4 The boundary conditions of the temperature fields have been set to 0 in the compute_boundary.hh and compute_boundary.cc. A function that sets the minimum of the temperatures array to 0 has been created. # Run the code To run the code follow the instructions: 1) create a new directory in the exercice_3 directory and go into that folder: $ mkdir build $ cd build 2) check wether your paths are set correctly $ ccmake ../ 2) compile the code: $ cmake ../ $ make 3) run the code with following arguments: -..: $ ./src/particle arg1 arg2 arg3 arg4 arg5 where: arg1 is the number of steps arg2 is the frequency to dump arg3 is the name of the input arg4 is the particle type (e.g. material_point - in our exercice) arg5 is the timesteps # Run the create_heat_distribution To run the python script (create_heat_distribution) from ex: 4.3 1) remain in the build folder and from there (!! you need python3 with the anaconda module) : $ ipython $ %run ../src/generate_heatdistribution.py arg1 arg2 arg3 where: arg1 is the number of particle (if you want a 2d 512x512 filed you shoud put 242144) arg2 is the radius of the heat source arg3 is the name of the input file created