Computational Science Based on HPC
Macros | Functions
thermoutils.h File Reference

This file contains the utility functions used by the heat transfer simulation in 1D and 2D to help in calculations. More...

#include <stdio.h>

Go to the source code of this file.

Macros

#define ll   long long
 

Functions

unsigned ll _cal_num_time (double time_step, double time_limit)
 This is a function calculates the number of steps in the time untils we reach the time limit given the rate of change of the time and the time_limit.
 
ll _cal_num_space (double length, double space_step)
 This is a function calculates the number of steps we will move in the dimentions untils we reach the length given the rate of change of the space and the length of the object.
 

Detailed Description

This file contains the utility functions used by the heat transfer simulation in 1D and 2D to help in calculations.

Function Documentation

◆ _cal_num_space()

ll _cal_num_space ( double  length,
double  space_step 
)

This is a function calculates the number of steps we will move in the dimentions untils we reach the length given the rate of change of the space and the length of the object.

Parameters
lengthThe length of the object.
space_step_xThe rate of change of the space in x-axis.
Returns
number of steps we will move as a long long integer.

◆ _cal_num_time()

unsigned ll _cal_num_time ( double  time_step,
double  time_limit 
)

This is a function calculates the number of steps in the time untils we reach the time limit given the rate of change of the time and the time_limit.

Parameters
time_stepThe rate of change of the time.
time_limitThe time that we want to measure the temperature of the object after.
Returns
number of steps we will move as a long long integer.