exsp4e/exercice_3d988b9517e22master
exercice_3
README.md
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
Run the code
To run the code follow the instructions:
- create a new directory in the exercice_3 directory and go into that folder:
$ mkdir build $ cd build
- check wether your paths are set correctly
$ ccmake ../
- compile the code:
$ cmake ../ $ make
- run the code with following arguments: -..:
$ ./src/particle inputs
To run the python script (create_heat_distribution) from ex: 4.3
- remain in the build folder and from there (!! you need python3 with the anaconda module) :
$ ipython $ %../src/%run 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
- Remarks for Marti: