Peka2D_v5
v5.0
|
#include "water.h"
Functions | |
EXPORT_DLL void | c_compute_cell_mass (int nTasks, t_arrays *arrays) |
This function recounts and stores the total mass of all active cells. More... | |
EXPORT_DLL void | c_initialize_delta (int nTasks, t_arrays *arrays) |
This function initializes the variation of conserved variables in the arrays structure to 0.0 and the array solidWallByCell to 0. More... | |
EXPORT_DLL void | c_wall_rotated_calculus (int nTasks, t_arrays *arrays) |
This function computes the variation of conserved variables (dh, dhu, dhv) using the ARoe method at active walls. It includes source terms (bed slope and bed friction), positivity, entropy and wet/dry fixes. Additionally, it updates aux arrays and the list of active cells. More... | |
EXPORT_DLL void | c_get_dtmin (int nTasks, t_arrays *arrays) |
This function finds the minimum time step out of the vector localDt. If the whole domain is dry, it is set to 1.0 seconds. More... | |
EXPORT_DLL void | c_update_contributions (int nTasks, t_arrays *arrays) |
This function computes the right-hand side of the equations to update each physical variable. More... | |
EXPORT_DLL void | c_checkpos_h (int nTasks, t_arrays *arrays, int *check) |
This function checks the positivity of the water depth. If there is a cell where the depth is negative (-tol), it write a notification flag in variable check. More... | |
EXPORT_DLL void | c_reduce_dt (t_arrays *arrays) |
This function multiplies the time step by a factor of 0.8 if the there is a change to get negative water depths (as checked in function c_checkpos_h). More... | |
EXPORT_DLL void | c_set_new_dt (t_arrays *arrays) |
This function sets the new time step according to the dumping and final times. If the precomputed time step is too big, it is reduced to match the desired time. More... | |
EXPORT_DLL void | c_update_cells (int nTasks, t_arrays *arrays) |
This function updates the water depth and water discharges (in wet cells). More... | |
EXPORT_DLL void | c_check_wetdry (int nTasks, t_arrays *arrays) |
This function checks the presence of wet/dry fronts and writes flags to correct them later. More... | |
EXPORT_DLL void | c_update_wetdry_cells (int nTasks, t_arrays *arrays) |
This function corrects the wet/dry fronts found in function c_check_wetdry. More... | |
EXPORT_DLL void | c_compute_mass_error (t_arrays *arrays) |
This function computes the mass error of the current state with respect to the previous one (in %). More... | |
EXPORT_DLL void | c_reconstruct_active_elements (int nTasks, t_arrays *arrays) |
This function computes the mass error of the current state with respect to the previous one (in %). More... | |
EXPORT_DLL void | c_add_active_cells (t_arrays *arrays, int id) |
This function adds the newly wetted cells to the active cells set. More... | |
EXPORT_DLL void | c_add_active_walls (t_arrays *arrays, int id) |
This function adds wall identified by index id to the active walls set. More... | |
EXPORT_DLL void c_add_active_cells | ( | t_arrays * | arrays, |
int | id | ||
) |
This function adds the newly wetted cells to the active cells set.
arrays | This pointer variable passes the arrays structure. |
id | This integer variable passes the index of the wetted cell. |
EXPORT_DLL void c_add_active_walls | ( | t_arrays * | arrays, |
int | id | ||
) |
This function adds wall identified by index id to the active walls set.
arrays | This pointer variable passes the arrays structure. |
id | This integer variable passes the index of the wetted cell. |
EXPORT_DLL void c_check_wetdry | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function checks the presence of wet/dry fronts and writes flags to correct them later.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_checkpos_h | ( | int | nTasks, |
t_arrays * | arrays, | ||
int * | check | ||
) |
This function checks the positivity of the water depth. If there is a cell where the depth is negative (-tol), it write a notification flag in variable check.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
check | This integer acts as a flag to check the positivity of the water depth and is used in calculate.cpp to reduced the time step. |
EXPORT_DLL void c_compute_cell_mass | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function recounts and stores the total mass of all active cells.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_compute_mass_error | ( | t_arrays * | arrays | ) |
This function computes the mass error of the current state with respect to the previous one (in %).
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_get_dtmin | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function finds the minimum time step out of the vector localDt. If the whole domain is dry, it is set to 1.0 seconds.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. arrays->dt is modifed. |
EXPORT_DLL void c_initialize_delta | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function initializes the variation of conserved variables in the arrays structure to 0.0 and the array solidWallByCell to 0.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_reconstruct_active_elements | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function computes the mass error of the current state with respect to the previous one (in %).
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_reduce_dt | ( | t_arrays * | arrays | ) |
This function multiplies the time step by a factor of 0.8 if the there is a change to get negative water depths (as checked in function c_checkpos_h).
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_set_new_dt | ( | t_arrays * | arrays | ) |
This function sets the new time step according to the dumping and final times. If the precomputed time step is too big, it is reduced to match the desired time.
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_update_cells | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function updates the water depth and water discharges (in wet cells).
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_update_contributions | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function computes the right-hand side of the equations to update each physical variable.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. arrays->dt is modifed. |
EXPORT_DLL void c_update_wetdry_cells | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function corrects the wet/dry fronts found in function c_check_wetdry.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |
EXPORT_DLL void c_wall_rotated_calculus | ( | int | nTasks, |
t_arrays * | arrays | ||
) |
This function computes the variation of conserved variables (dh, dhu, dhv) using the ARoe method at active walls. It includes source terms (bed slope and bed friction), positivity, entropy and wet/dry fixes. Additionally, it updates aux arrays and the list of active cells.
nTasks | This integer variable passes the number of times the computation needs to be done. |
arrays | This pointer variable passes the arrays structure. |