![]() |
Computational Science Based on HPC
|
This file contains collection of all simulations calls. More...
Go to the source code of this file.
Functions | |
| char * | damped_os_serial (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| function simulates simple harmonic motion (Simple Spring Motion). | |
| char * | damped_os_parallel_v1 (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| function simulates simple harmonic motion (Simple Spring Motion). | |
| char * | damped_os_parallel_v2 (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| This function simulates simple harmonic motion (Simple Spring Motion). | |
| char * | elastic_pendulum (double r, double length, double mass, double gravity, double k, double Ao, double Xo, double Yo, double Vo, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| function simulates the motion of (elastic pendulum/2D-spring/spring pendulum) system. | |
| double | damped_os_parallel_execution_time_v1 (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| This function calculate the execution time of simulating simple harmonic motion (Simple Spring Motion). | |
| double | damped_os_parallel_execution_time_v2 (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| This function calculate execution time simulating simple harmonic motion (Simple Spring Motion). | |
| double | damped_os_parallel_execution_time_v3 (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files, int num_of_threads) |
| This function calculate execution time simulating simple harmonic motion (Simple Spring Motion). | |
| char * | damped_os_serial_execution (double max_amplitude, double length, double mass, double gravity, double k, double Ao, double Vo, double FI, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| This function calculates execution time of simulating simple harmonic motion (Simple Spring Motion). | |
| char * | elastic_pendulum_execution (double r, double length, double mass, double gravity, double k, double Ao, double Xo, double Yo, double Vo, double time_limit, double step_size, double damping_coefficent, int number_of_files) |
| This function calculates the execution time of simulating the motion of (elastic pendulum/2D-spring/spring pendulum) system. | |
| int | heat_equation_1D_P1_MPI (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and each core writes the result to a separate file. | |
| int | heat_equation_1D_P1_OPENMP (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and writes the result to a file. | |
| int | heat_equation_2D_P1_MPI (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and each core writes the result to a separate file. | |
| int | heat_equation_2D_P1_OPENMP (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and each core writes the result to a separate file. | |
| char * | heat_equation_1D_serial (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and write the result to a file. | |
| char * | heat_equation_2D_serial (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and write the result to a file. | |
| double | heat_equation_execution_time_1D_P1_MPI (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O. | |
| double | heat_equation_execution_time_1D_P1_OPENMP (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O. | |
| double | heat_equation_execution_time_2D_P1_MPI (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O. | |
| double | heat_equation_execution_time_2D_P1_OPENMP (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O. | |
| double | heat_equation_execution_time_1D_serial (double time_step, double time_limit, double space_step, long long precision) |
| This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O. | |
| double | heat_equation_execution_time_2D_serial (double time_step, double time_limit, double spaceX_step, double spaceY_step, long long precision) |
| This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O. | |
| void | finalize () |
| finalize the MPI and de-allocate the resources. | |
This file contains collection of all simulations calls.
| double damped_os_parallel_execution_time_v1 | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
This function calculate the execution time of simulating simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using MPI and Openmp together, The Number of iteration are divided upon number of processes using MPI, while each processes is calculating its values Openmp used to run the calculations per process in parallel way
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| double damped_os_parallel_execution_time_v2 | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
This function calculate execution time simulating simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using MPI, The Number of iteration are divided upon number of processes using MPI.
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| double damped_os_parallel_execution_time_v3 | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files, | ||
| int | num_of_threads | ||
| ) |
This function calculate execution time simulating simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using Openmp, The for loop is divided upon multiple threads.
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| num_of_threads | number of threads needed to execute the code |
| char * damped_os_parallel_v1 | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
function simulates simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using MPI and Openmp together, The Number of iteration are divided upon number of processes using MPI, while each processes is calculating its values Openmp used to run the calculations per process in parallel way
Output of this simulation will be resulted in file named "PROCESS-RANK_damped_os_parallel_v1_displacement_YYYY-MM-DD HH:MM:SS.txt"
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| char * damped_os_parallel_v2 | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
This function simulates simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using MPI, The Number of iteration are divided upon number of processes using MPI.
Output of this simulation will be resulted in file named "PROCESS-RANK_damped_os_parallel_v2_displacement_YYYY-MM-DD HH:MM:SS.txt"
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| char * damped_os_serial | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
function simulates simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using serial algorithm
Output of this simulation will be resulted in file named "damped_os_serial_displacement_YYYY-MM-DD HH:MM:SS.txt"
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
Example:
| char * damped_os_serial_execution | ( | double | max_amplitude, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Vo, | ||
| double | FI, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
This function calculates execution time of simulating simple harmonic motion (Simple Spring Motion).
using numerical solution of stepwise precision using equation (e^(-damping_coefficent / (2 * mass)) * t)*sin(wt+fi)), where this equation calculates the displacement of mass on y-axis, this function also calculates the acceleration and velocity in each time step. This function is implemented using serial algorithm
| max_amplitude | starting position of the mass where the simulation will start |
| length | the maximum length of the spring (uncompressed spring) |
| mass | mass of bob |
| gravity | gravity of the system |
| k | stiffness of the spring |
| Ao | initial acceleration |
| Vo | initial velocity |
| FI | FI constant which will be added to the (wt) inside the sine calculation |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| char * elastic_pendulum | ( | double | r, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Xo, | ||
| double | Yo, | ||
| double | Vo, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
function simulates the motion of (elastic pendulum/2D-spring/spring pendulum) system.
Using LaGrange mechanics to get the equation of motion of the whole system and solving the differential equation using Fourth order Runge-Kutta ODE to get the displacement of body suspended on spring at time t. This system's motion is chaotic motion so it can't be parallelized. This simulation prints the position of mass w.r.t X-Axis and Y-Axis.
Output of this simulation will be resulted in file named "elastic_pendulum_x_YYYY-MM-DD HH:MM:SS.txt" and "elastic_pendulum_y_YYYY-MM-DD HH:MM:SS.txt"
| r | rest length of spring |
| length | max length of spring |
| mass | mass of bob suspended in spring |
| gravity | gravity of the system |
| k | stiffness of spring |
| Ao | initial acceleration |
| Xo | initial point on X-axis where simulation starts |
| Yo | initial point on Y-axis where simulation starts |
| Vo | initial velocity |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| char * elastic_pendulum_execution | ( | double | r, |
| double | length, | ||
| double | mass, | ||
| double | gravity, | ||
| double | k, | ||
| double | Ao, | ||
| double | Xo, | ||
| double | Yo, | ||
| double | Vo, | ||
| double | time_limit, | ||
| double | step_size, | ||
| double | damping_coefficent, | ||
| int | number_of_files | ||
| ) |
This function calculates the execution time of simulating the motion of (elastic pendulum/2D-spring/spring pendulum) system.
Using LaGrange mechanics to get the equation of motion of the whole system and solving the differential equation using Fourth order Runge-Kutta ODE to get the displacement of body suspended on spring at time t. This system's motion is chaotic motion so it can't be parallelized. This simulation prints the position of mass w.r.t X-Axis and Y-Axis.
| r | rest length of spring |
| length | max length of spring |
| mass | mass of bob suspended in spring |
| gravity | gravity of the system |
| k | stiffness of spring |
| Ao | initial acceleration |
| Xo | initial point on X-axis where simulation starts |
| Yo | initial point on Y-axis where simulation starts |
| Vo | initial velocity |
| time_limit | the time when the simulation will stop |
| step_size | how much the simulation will skip per iteration |
| damping_coefficent | damping factor affecting on the system |
| number_of_files | will be removed in next update |
| void finalize | ( | ) |
finalize the MPI and de-allocate the resources.
Example:
| int heat_equation_1D_P1_MPI | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and each core writes the result to a separate file.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform. Then we parallelize the function using MPI, as we divide the object into equal parts and each core calculates the temperature of its part.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
Example:
| int heat_equation_1D_P1_OPENMP | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and writes the result to a file.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform. Then, we parallelize the function using OPENMP, as we provide specific number of threads and make the iterations of the loop are divided into equal-sized chunks, and each chunk is assigned to a thread. Then, we write the result to a file.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
Example:
| char * heat_equation_1D_serial | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and write the result to a file.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
| int heat_equation_2D_P1_MPI | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and each core writes the result to a separate file.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform. Then we parallelize the function using MPI, as we divide the object into equal parts and each core calculates the temperature of its part.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
Example:
| int heat_equation_2D_P1_OPENMP | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and each core writes the result to a separate file.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform. Then, we parallelize the function using OPENMP, as we provide specific number of threads and make the iterations of the loop are divided into equal-sized chunks, and each chunk is assigned to a thread. Then, we write the result to a file.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
Example:
| char * heat_equation_2D_serial | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and write the result to a file.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
Example:
| double heat_equation_execution_time_1D_P1_MPI | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform. Then we parallelize the function using MPI, as we divide the object into equal parts and each core calculates the temperature of its part. Then, we return the execution time without I/O.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
Example:
| double heat_equation_execution_time_1D_P1_OPENMP | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform. Then, we parallelize the function using OPENMP, as we provide specific number of threads and make the iterations of the loop are divided into equal-sized chunks, and each chunk is assigned to a thread. Then, return the execution time without I/O.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
| double heat_equation_execution_time_1D_serial | ( | double | time_step, |
| double | time_limit, | ||
| double | space_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 1D object as wire, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 1D object as wire and the change in its tempreture over time using fourier transform.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step | The rate of change of the space. |
| precision | The number of vectors we use in the calculations. |
Example:
| double heat_equation_execution_time_2D_P1_MPI | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform. Then we parallelize the function using MPI, as we divide the object into equal parts and each core calculates the temperature of its part. Then, we return the execution time without I/O.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
Example:
| double heat_equation_execution_time_2D_P1_OPENMP | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform. Then, we parallelize the function using OPENMP, as we provide specific number of threads and make the iterations of the loop are divided into equal-sized chunks, and each chunk is assigned to a thread. Then, return the execution time without I/O.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
| double heat_equation_execution_time_2D_serial | ( | double | time_step, |
| double | time_limit, | ||
| double | spaceX_step, | ||
| double | spaceY_step, | ||
| long long | precision | ||
| ) |
This is a function that simulates the heat transfer in 2D object, and return the execution time without I/O.
In this simulation, we simulate heat propagation in 2D object as square or rectangle and the change in its tempreture over time using fourier transform.
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
| space_step_x | The rate of change of the space in x-axis. |
| space_step_y | The rate of change of the space in y-axis. |
| precision | The number of vectors we use in the calculations. |
Example: