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

Go to the source code of this file.
Functions | |
| void | serial_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 LU-SGS method. More... | |
| void | ns_serial_lower_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, 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 LU-SGS method for Navier-Stokes equations. More... | |
| void | rans_serial_lower_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, 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 LU-SGS method for RANS equations. More... | |
| void | ns_serial_upper_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, 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 LU-SGS method for Navier-Stokes equations. More... | |
| void | rans_serial_upper_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, 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 LU-SGS method for RANS equations. More... | |
| void | lusgs_serial_ns_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb) |
| Updates solution array. More... | |
| void | lusgs_serial_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *rhsb) |
| Updates solution array. More... | |
Header file for serial LU-SGS method.
Declaration of each function used in LU-SGS method.
Definition in file lusgs.h.
| void lusgs_serial_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 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 313 of file lusgs.c.

| void lusgs_serial_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 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.
| void ns_serial_lower_sweep | ( | UCFD_INT | neles, |
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| 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 LU-SGS method for Navier-Stokes equations.
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells [nface, neles] |
| fnorm_vol | Surface magnitude/cell volume [nface, neles] |
| vec_fnorm | Surface vector [nface, ndims, neles] |
| uptsb | Solution array [nfvars, neles] |
| rhsb | Residual (RHS) array [nfvars, neles] |
| dub | Difference array for update [nfvars, neles] (output) |
| diag | Diagonal matrix array [neles] |
| fspr | Wave speed for each cell face [nface, neles] |
By processing lower sweep, intermediate 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 dub array.
Definition at line 74 of file lusgs.c.


| void ns_serial_upper_sweep | ( | UCFD_INT | neles, |
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| 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 LU-SGS method for Navier-Stokes equations.
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells [nface, neles] |
| fnorm_vol | Surface magnitude/cell volume [nface, neles] |
| vec_fnorm | Surface vector [nface, ndims, neles] |
| uptsb | Solution array [nfvars, neles] |
| rhsb | Residual (RHS) array [nfvars, neles] |
| dub | Difference array for update [nfvars, neles] (output) |
| diag | Diagonal matrix array [neles] |
| fspr | Wave speed for each cell face [nface, neles] |
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 193 of file lusgs.c.


| void rans_serial_lower_sweep | ( | UCFD_INT | neles, |
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| 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 LU-SGS method for RANS equations.
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells [nface, neles] |
| fnorm_vol | Surface magnitude/cell volume [nface, neles] |
| vec_fnorm | Surface vector [nface, ndims, neles] |
| uptsb | Solution array [nvars, neles] |
| rhsb | Residual (RHS) array [nvars, neles] |
| dub | Difference array for update [nvars, neles] (output) |
| diag | Diagonal matrix array [neles] |
| fspr | Wave speed for each cell face [nface, neles] |
| dsrc | Source term derivatives [nvars, neles] |
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 129 of file lusgs.c.

| void rans_serial_upper_sweep | ( | UCFD_INT | neles, |
| UCFD_INT | nface, | ||
| UCFD_INT * | nei_ele, | ||
| 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 LU-SGS method for RANS equations.
| neles | Number of element cells |
| nface | Number of faces depends on element type |
| nei_ele | Indices for neighbor cells [nface, neles] |
| fnorm_vol | Surface magnitude/cell volume [nface, neles] |
| vec_fnorm | Surface vector [nface, ndims, neles] |
| uptsb | Solution array [nvars, neles] |
| rhsb | Residual (RHS) array [nvars, neles] |
| dub | Difference array for update [nvars, neles] (output) |
| diag | Diagonal matrix array [neles] |
| fspr | Wave speed for each cell face [nface, neles] |
| dsrc | Source term derivatives [nvars, neles] |
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 251 of file lusgs.c.

| void serial_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 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 [nface, neles] |
| dt | Time step [neles] |
| diag | Diagonal matrix for LU-SGS method [neles] |
| fspr | Wave speed for each cell face [nface, neles] |
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 43 of file lusgs.c.
