UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
coloredlusgs.h File Reference

Header file for Colored LU-SGS method. More...

This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

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.

Function Documentation

◆ ns_parallel_lower_sweep()

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.

Parameters
n0First index for coloring set
neLast index for coloring set
nelesNumber of element cells
nfvarsNumber of flux variables
nfaceNumber of faces depends on element type
ndimsDimensions
nei_eleIndices for neighbor cells
icolorColor Index of each cell
lcolorColor level of each cell
fnorm_volSurface magnitude/cell volume
vec_fnormSurface vector
uptsbSolution array
rhsbResidual (RHS) array
dubDifference array for update (output)
diagDiagonal matrix array
fsprWave 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 82 of file coloredlusgs.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ns_parallel_upper_sweep()

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.

Parameters
n0First index for coloring set
neLast index for coloring set
nelesNumber of element cells
nfvarsNumber of flux variables
nfaceNumber of faces depends on element type
ndimsDimensions
nei_eleIndices for neighbor cells
icolorColor Index of each cell
lcolorColor level of each cell
fnorm_volSurface magnitude/cell volume
vec_fnormSurface vector
uptsbSolution array
rhsbResidual (RHS) array
dubDifference array for update (output)
diagDiagonal matrix array
fsprWave 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 220 of file coloredlusgs.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parallel_pre_lusgs()

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.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
factorMultiplication factor for diffusive margin
fnorm_volSurface magnitude/cell volume
dtTime step
diagDiagonal matrix for LU-SGS method
fsprWave 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 47 of file coloredlusgs.c.

Here is the caller graph for this function:

◆ parallel_update()

void parallel_update ( int  neles,
int  nvars,
double *  uptsb,
double *  rhsb 
)

Updates solution array.

Parameters
nelesNumber of element cells
nvarsNumber of conservative variables
uptsbSolution array
rhsbResult 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.

index variables are defined to make private

Definition at line 360 of file coloredlusgs.c.

◆ rans_parallel_lower_sweep()

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.

Parameters
n0First index for coloring set
neLast index for coloring set
nelesNumber of element cells
nvarsNumber of conservative variables
nfvarsNumber of flux variables
nfaceNumber of faces depends on element type
ndimsDimensions
nei_eleIndices for neighbor cells
icolorColor Index of each cell
lcolorColor level of each cell
fnorm_volSurface magnitude/cell volume
vec_fnormSurface vector
uptsbSolution array
rhsbResidual (RHS) array
dubDifference array for update (output)
diagDiagonal matrix array
fsprWave 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 146 of file coloredlusgs.c.

Here is the call graph for this function:

◆ rans_parallel_upper_sweep()

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.

Parameters
n0First index for coloring set
neLast index for coloring set
nelesNumber of element cells
nvarsNumber of conservative variables
nfvarsNumber of flux variables
nfaceNumber of faces depends on element type
ndimsDimensions
nei_eleIndices for neighbor cells
icolorColor Index of each cell
lcolorColor level of each cell
fnorm_volSurface magnitude/cell volume
vec_fnormSurface vector
uptsbSolution array
rhsbResidual (RHS) array
dubDifference array for update (output)
diagDiagonal matrix array
fsprWave 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 287 of file coloredlusgs.c.

Here is the call graph for this function: