Header file for Colored LU-SGS method. More...
#include "config.h"

Go to the source code of this file.
Functions | |
| void | parallel_pre_lusgs (UCFD_INT neles, UCFD_INT nface, UCFD_FLOAT factor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *dt, UCFD_FLOAT *diag, UCFD_FLOAT *fspr) |
| Computes Diagonal matrix for Colored LU-SGS method. More... | |
| void | ns_parallel_lower_sweep (UCFD_INT n0, UCFD_INT ne, UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_INT *icolor, UCFD_INT *lcolor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *vec_fnorm, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fspr) |
| Lower sweep of Colored LU-SGS method for Navier-Stokes equations. More... | |
| void | rans_parallel_lower_sweep (UCFD_INT n0, UCFD_INT ne, UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_INT *icolor, UCFD_INT *lcolor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *vec_fnorm, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fspr, UCFD_FLOAT *dsrc) |
| Lower sweep of Colored LU-SGS method for RANS equations. More... | |
| void | ns_parallel_upper_sweep (UCFD_INT n0, UCFD_INT ne, UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_INT *icolor, UCFD_INT *lcolor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *vec_fnorm, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fspr) |
| Upper sweep of Colored LU-SGS method for Navier-Stokes equations. More... | |
| void | rans_parallel_upper_sweep (UCFD_INT n0, UCFD_INT ne, UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_INT *icolor, UCFD_INT *lcolor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *vec_fnorm, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fspr, UCFD_FLOAT *dsrc) |
| Upper sweep of Colored LU-SGS method for RANS equations. More... | |
| void | lusgs_parallel_ns_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb) |
| Updates solution array. More... | |
| void | lusgs_parallel_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb) |
| Updates solution array. More... | |
Header file for Colored LU-SGS method.
Declaration of each function used in Colored LU-SGS method. Parameters are explained here.
Definition in file coloredlusgs.h.
| void lusgs_parallel_ns_update | ( | UCFD_INT | neles, |
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb | ||
| ) |
Updates solution array.
| neles | Number of element cells |
| uptsb | Solution array |
| rhsb | Result of LU-SGS sweeps |
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.
Definition at line 338 of file coloredlusgs.c.

| void lusgs_parallel_update | ( | UCFD_INT | neles, |
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb | ||
| ) |
Updates solution array.
| neles | Number of element cells |
| uptsb | Solution array |
| rhsb | Result of LU-SGS sweeps |
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.
Definition at line 360 of file coloredlusgs.c.
| void ns_parallel_lower_sweep | ( | UCFD_INT | n0, |
| UCFD_INT | ne, | ||
| UCFD_INT | neles, | ||
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| UCFD_INT * | icolor, | ||
| UCFD_INT * | lcolor, | ||
| UCFD_FLOAT * | fnorm_vol, | ||
| UCFD_FLOAT * | vec_fnorm, | ||
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb, | ||
| UCFD_FLOAT * | dub, | ||
| UCFD_FLOAT * | diag, | ||
| UCFD_FLOAT * | fspr | ||
| ) |
Lower sweep of Colored LU-SGS method for Navier-Stokes equations.
| n0 | First index for coloring set |
| ne | Last index for coloring set |
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells |
| icolor | Color Index of each cell |
| lcolor | Color level of each cell |
| fnorm_vol | Surface magnitude/cell volume |
| vec_fnorm | Surface vector |
| uptsb | Solution array |
| rhsb | Residual (RHS) array |
| dub | Difference array for update (output) |
| diag | Diagonal matrix array |
| fspr | Wave speed for each cell face |
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 79 of file coloredlusgs.c.


| void ns_parallel_upper_sweep | ( | UCFD_INT | n0, |
| UCFD_INT | ne, | ||
| UCFD_INT | neles, | ||
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| UCFD_INT * | icolor, | ||
| UCFD_INT * | lcolor, | ||
| UCFD_FLOAT * | fnorm_vol, | ||
| UCFD_FLOAT * | vec_fnorm, | ||
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb, | ||
| UCFD_FLOAT * | dub, | ||
| UCFD_FLOAT * | diag, | ||
| UCFD_FLOAT * | fspr | ||
| ) |
Upper sweep of Colored LU-SGS method for Navier-Stokes equations.
| n0 | First index for coloring set |
| ne | Last index for coloring set |
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells |
| icolor | Color Index of each cell |
| lcolor | Color level of each cell |
| fnorm_vol | Surface magnitude/cell volume |
| vec_fnorm | Surface vector |
| uptsb | Solution array |
| rhsb | Residual (RHS) array |
| dub | Difference array for update (output) |
| diag | Diagonal matrix array |
| fspr | Wave speed for each cell face |
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 208 of file coloredlusgs.c.


| void parallel_pre_lusgs | ( | UCFD_INT | neles, |
| UCFD_INT | nface, | ||
| UCFD_FLOAT | factor, | ||
| UCFD_FLOAT * | fnorm_vol, | ||
| UCFD_FLOAT * | dt, | ||
| UCFD_FLOAT * | diag, | ||
| UCFD_FLOAT * | fspr | ||
| ) |
Computes Diagonal matrix for Colored LU-SGS method.
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| factor | Multiplication factor for diffusive margin |
| fnorm_vol | Surface magnitude/cell volume |
| dt | Time step |
| diag | Diagonal matrix for LU-SGS method |
| fspr | Wave speed for each cell face |
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 46 of file coloredlusgs.c.

| void rans_parallel_lower_sweep | ( | UCFD_INT | n0, |
| UCFD_INT | ne, | ||
| UCFD_INT | neles, | ||
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| UCFD_INT * | icolor, | ||
| UCFD_INT * | lcolor, | ||
| UCFD_FLOAT * | fnorm_vol, | ||
| UCFD_FLOAT * | vec_fnorm, | ||
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb, | ||
| UCFD_FLOAT * | dub, | ||
| UCFD_FLOAT * | diag, | ||
| UCFD_FLOAT * | fspr, | ||
| UCFD_FLOAT * | dsrc | ||
| ) |
Lower sweep of Colored LU-SGS method for RANS equations.
| n0 | First index for coloring set |
| ne | Last index for coloring set |
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells |
| icolor | Color Index of each cell |
| lcolor | Color level of each cell |
| fnorm_vol | Surface magnitude/cell volume |
| vec_fnorm | Surface vector |
| uptsb | Solution array |
| rhsb | Residual (RHS) array |
| dub | Difference array for update (output) |
| diag | Diagonal matrix array |
| fspr | Wave speed for each cell face |
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 139 of file coloredlusgs.c.

| void rans_parallel_upper_sweep | ( | UCFD_INT | n0, |
| UCFD_INT | ne, | ||
| UCFD_INT | neles, | ||
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| UCFD_INT * | icolor, | ||
| UCFD_INT * | lcolor, | ||
| UCFD_FLOAT * | fnorm_vol, | ||
| UCFD_FLOAT * | vec_fnorm, | ||
| UCFD_FLOAT * | uptsb, | ||
| UCFD_FLOAT * | rhsb, | ||
| UCFD_FLOAT * | dub, | ||
| UCFD_FLOAT * | diag, | ||
| UCFD_FLOAT * | fspr, | ||
| UCFD_FLOAT * | dsrc | ||
| ) |
Upper sweep of Colored LU-SGS method for RANS equations.
| n0 | First index for coloring set |
| ne | Last index for coloring set |
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells |
| icolor | Color Index of each cell |
| lcolor | Color level of each cell |
| fnorm_vol | Surface magnitude/cell volume |
| vec_fnorm | Surface vector |
| uptsb | Solution array |
| rhsb | Residual (RHS) array |
| dub | Difference array for update (output) |
| diag | Diagonal matrix array |
| fspr | Wave speed for each cell face |
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 270 of file coloredlusgs.c.
