Colored LU-SGS time integration method for unstructured grid. More...
Go to the source code of this file.
Functions | |
void | parallel_pre_lusgs (int neles, int nface, double factor, double *fnorm_vol, double *dt, double *diag, double *fspr) |
Computes Diagonal matrix for Colored LU-SGS method. More... | |
void | ns_parallel_lower_sweep (int n0, int ne, int neles, int nfvars, int nface, int ndims, int *nei_ele, int *icolor, int *lcolor, double *fnorm_vol, double *vec_fnorm, double *uptsb, double *rhsb, double *dub, double *diag, double *fspr) |
Lower sweep of Colored LU-SGS method for Navier-Stokes equations. More... | |
void | rans_parallel_lower_sweep (int n0, int ne, int neles, int nvars, int nfvars, int nface, int ndims, int *nei_ele, int *icolor, int *lcolor, double *fnorm_vol, double *vec_fnorm, double *uptsb, double *rhsb, double *dub, double *diag, double *fspr, double *dsrc) |
Lower sweep of Colored LU-SGS method for RANS equations. More... | |
void | ns_parallel_upper_sweep (int n0, int ne, int neles, int nfvars, int nface, int ndims, int *nei_ele, int *icolor, int *lcolor, double *fnorm_vol, double *vec_fnorm, double *uptsb, double *rhsb, double *dub, double *diag, double *fspr) |
Upper sweep of Colored LU-SGS method for Navier-Stokes equations. More... | |
void | rans_parallel_upper_sweep (int n0, int ne, int neles, int nvars, int nfvars, int nface, int ndims, int *nei_ele, int *icolor, int *lcolor, double *fnorm_vol, double *vec_fnorm, double *uptsb, double *rhsb, double *dub, double *diag, double *fspr, double *dsrc) |
Upper sweep of Colored LU-SGS method for RANS equations. More... | |
void | parallel_update (int neles, int nvars, double *uptsb, double *rhsb) |
Updates solution array. More... | |
Colored LU-SGS time integration method for unstructured grid.
======================================================================================================================
LU-SGS time integration method applying Multi-coloring algorithm.
Multi-thread computation is enabled using <omp.h> header file.
To compute solution of the next time step, refer to the following steps.
(1) Preparing LU-SGS :
Computes diagonal matrix of the Implicit operator.
(2) Lower sweep :
First step of LU-SGS method, which computes intermediate solution difference array.
(3) Upper sweep :
Second step of LU-SGS method, which computes next solution difference array.
(4) Update :
Time integration by adding current solution with next time step solution difference
icolor
and lcolor
array are used instead of mapping
, unmapping
array which are used in serial LU-SGS. Be aware that they have different values albeit the number of arguments and each data type is totally identical.Definition in file coloredlusgs.c.
void ns_parallel_lower_sweep | ( | int | n0, |
int | ne, | ||
int | neles, | ||
int | nfvars, | ||
int | nface, | ||
int | ndims, | ||
int * | nei_ele, | ||
int * | icolor, | ||
int * | lcolor, | ||
double * | fnorm_vol, | ||
double * | vec_fnorm, | ||
double * | uptsb, | ||
double * | rhsb, | ||
double * | dub, | ||
double * | diag, | ||
double * | fspr | ||
) |
Lower sweep of Colored LU-SGS method for Navier-Stokes equations.
This function computes diagonal matrix of the implicit operator. In LU-SGS method, implicit operator is replaced with spectral radius
, so that all element except diagonal is zero. Therefore, diag
array can be allocated as one-dimensional, which has less memory requirement.
Diffusive margin of wave speed is applied.
Definition at line 82 of file coloredlusgs.c.
void ns_parallel_upper_sweep | ( | int | n0, |
int | ne, | ||
int | neles, | ||
int | nfvars, | ||
int | nface, | ||
int | ndims, | ||
int * | nei_ele, | ||
int * | icolor, | ||
int * | lcolor, | ||
double * | fnorm_vol, | ||
double * | vec_fnorm, | ||
double * | uptsb, | ||
double * | rhsb, | ||
double * | dub, | ||
double * | diag, | ||
double * | fspr | ||
) |
Upper sweep of Colored LU-SGS method for Navier-Stokes equations.
By processing upper sweep, next time step solution \(\Delta Q\) is computed. This function is used for Euler or Navier-Stokes equations, which has the same flux shape.
Solution array is stored in rhsb
array, since right-hand-side array is no longer needed.
Definition at line 220 of file coloredlusgs.c.
void parallel_pre_lusgs | ( | int | neles, |
int | nface, | ||
double | factor, | ||
double * | fnorm_vol, | ||
double * | dt, | ||
double * | diag, | ||
double * | fspr | ||
) |
Computes Diagonal matrix for Colored LU-SGS method.
This function computes diagonal matrix of the implicit operator. In LU-SGS method, implicit operator is replaced with spectral radius
, so that all element except diagonal is zero. Therefore, diag
array can be allocated as one-dimensional, which has less memory requirement.
Diffusive margin of wave speed is applied.
Definition at line 47 of file coloredlusgs.c.
void parallel_update | ( | int | neles, |
int | nvars, | ||
double * | uptsb, | ||
double * | rhsb | ||
) |
Updates solution array.
solution array is updated by adding \(\Delta Q\). Be aware that rhsb
array in function parameter is the difference array after upper sweep, not the right-hand-side array.
index variables are defined to make private
Definition at line 360 of file coloredlusgs.c.
void rans_parallel_lower_sweep | ( | int | n0, |
int | ne, | ||
int | neles, | ||
int | nvars, | ||
int | nfvars, | ||
int | nface, | ||
int | ndims, | ||
int * | nei_ele, | ||
int * | icolor, | ||
int * | lcolor, | ||
double * | fnorm_vol, | ||
double * | vec_fnorm, | ||
double * | uptsb, | ||
double * | rhsb, | ||
double * | dub, | ||
double * | diag, | ||
double * | fspr, | ||
double * | dsrc | ||
) |
Lower sweep of Colored LU-SGS method for RANS equations.
By processing lower sweep, intermediate solution \(\Delta Q^*\) is computed. This function is used for RANS equations.
solution array is stored in dub
array.
Definition at line 146 of file coloredlusgs.c.
void rans_parallel_upper_sweep | ( | int | n0, |
int | ne, | ||
int | neles, | ||
int | nvars, | ||
int | nfvars, | ||
int | nface, | ||
int | ndims, | ||
int * | nei_ele, | ||
int * | icolor, | ||
int * | lcolor, | ||
double * | fnorm_vol, | ||
double * | vec_fnorm, | ||
double * | uptsb, | ||
double * | rhsb, | ||
double * | dub, | ||
double * | diag, | ||
double * | fspr, | ||
double * | dsrc | ||
) |
Upper sweep of Colored LU-SGS method for RANS equations.
By processing upper sweep, next time step solution \(\Delta Q\) is computed. This function is used for RANS equations.
Solution array is stored in rhsb
array, since right-hand-side array is no longer needed.
Definition at line 287 of file coloredlusgs.c.