UCFD_SPARSE  v1.1
Documentation
Loading...
Searching...
No Matches
blusgs.h File Reference

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

#include "config.h"
Include dependency graph for blusgs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ns_serial_pre_blusgs (UCFD_INT neles, UCFD_INT nface, UCFD_FLOAT factor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *dt, UCFD_FLOAT *diag, UCFD_FLOAT *fjmat)
 Computes Diagonal matrix for LU-SGS method. More...
 
void rans_serial_pre_blusgs (UCFD_INT neles, UCFD_INT nface, UCFD_FLOAT factor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *uptsb, UCFD_FLOAT *dt, UCFD_FLOAT *tdiag, UCFD_FLOAT *tjmat, UCFD_FLOAT *dsrc)
 Computes Diagonal matrix for Block LU-SGS method for RANS equations. More...
 
void ns_serial_block_lower_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fjmat)
 Lower sweep of Block LU-SGS method for Navier-Stokes equations. More...
 
void rans_serial_block_lower_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *tdiag, UCFD_FLOAT *tjmat)
 Lower sweep of Block LU-SGS method for RANS equations. More...
 
void ns_serial_block_upper_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fjmat)
 Upper sweep of Block LU-SGS method for Navier-Stokes equations. More...
 
void rans_serial_block_upper_sweep (UCFD_INT neles, UCFD_INT nface, UCFD_INT *nei_ele, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *tdiag, UCFD_FLOAT *tjmat)
 Upper sweep of Block LU-SGS method for RANS equations. More...
 
void blusgs_serial_ns_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *dub, UCFD_FLOAT *subres)
 Updates solution array. More...
 
void blusgs_serial_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *dub, UCFD_FLOAT *subres)
 Updates solution array. More...
 

Detailed Description

Header file for serial LU-SGS method.

Declaration of each function used in LU-SGS method.

Definition in file blusgs.h.

Function Documentation

◆ blusgs_serial_ns_update()

void blusgs_serial_ns_update ( UCFD_INT  neles,
UCFD_FLOAT uptsb,
UCFD_FLOAT dub,
UCFD_FLOAT subres 
)

Updates solution array.

Parameters
nelesNumber of element cells
uptsbSolution array
dubResult of Block LU-SGS sweeps
subresResidual of each sub-iteration

solution array is updated by adding \(\Delta Q\).

Definition at line 386 of file blusgs.c.

◆ blusgs_serial_update()

void blusgs_serial_update ( UCFD_INT  neles,
UCFD_FLOAT uptsb,
UCFD_FLOAT dub,
UCFD_FLOAT subres 
)

Updates solution array.

Parameters
nelesNumber of element cells
uptsbSolution array
dubResult of Block LU-SGS sweeps
subresResidual of each sub-iteration

solution array is updated by adding \(\Delta Q\).

Definition at line 406 of file blusgs.c.

◆ ns_serial_block_lower_sweep()

void ns_serial_block_lower_sweep ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_INT nei_ele,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT diag,
UCFD_FLOAT fjmat 
)

Lower sweep of Block LU-SGS method for Navier-Stokes equations.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
nei_eleIndices for neighbor cells [nface, neles]
fnorm_volSurface magnitude/cell volume [nface, neles]
rhsbResidual (RHS) array [nfvars, neles]
dub(Output) Difference array for update [nvars, neles]
diagDiagonal matrix array [nfvars, nfvars, neles]
fjmatOutward block operator include flux Jacobian at each cell face [nfvars, nfvars, 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.

Note
The last argument array, fjmat is NOT identical with ns_serial_pre_blusgs function.
For more details, refer to the Block LU-SGS in the document.

Definition at line 153 of file blusgs.c.

Here is the call graph for this function:

◆ ns_serial_block_upper_sweep()

void ns_serial_block_upper_sweep ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_INT nei_ele,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT diag,
UCFD_FLOAT fjmat 
)

Upper sweep of Block LU-SGS method for Navier-Stokes equations.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
nei_eleIndices for neighbor cells [nface, neles]
fnorm_volSurface magnitude/cell volume [nface, neles]
rhsbResidual (RHS) array [nfvars, neles]
dub(Output) Difference array for update [nvars, neles]
diagDiagonal matrix array [nfvars, nfvars, neles]
fjmatOutward block operator include flux Jacobian at each cell face [nfvars, nfvars, nface, neles]

By processing upper sweep, next sub-iteration solution \(\Delta Q^(k+1)\) 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.

Note
The last argument array, fjmat is NOT identical with ns_serial_pre_blusgs function.
For more details, refer to the Block LU-SGS in the document.

Definition at line 272 of file blusgs.c.

Here is the call graph for this function:

◆ ns_serial_pre_blusgs()

void ns_serial_pre_blusgs ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_FLOAT  factor,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT dt,
UCFD_FLOAT diag,
UCFD_FLOAT fjmat 
)

Computes Diagonal matrix for 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 [nface, neles]
dtTime step [neles]
diag(Output) Diagonal matrix for LU-SGS method [nfvars, nfvars, neles]
fjmatInward block operator include flux Jacobian at each cell face [nfvars, nfvars, nface, neles]

This function computes diagonal matrices of the implicit operator. In Block LU-SGS method, implicit operator is approximated with block operator. Diagonal matrices is composed of block operator matrix, which size is n-by-n. n is the number of conservative variables in Navier-Stokes equations, or the number of turbulent variables in RANS equations.

Definition at line 39 of file blusgs.c.

Here is the call graph for this function:

◆ rans_serial_block_lower_sweep()

void rans_serial_block_lower_sweep ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_INT nei_ele,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT tdiag,
UCFD_FLOAT tjmat 
)

Lower sweep of Block LU-SGS method for RANS equations.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
nei_eleIndices for neighbor cells [nface, neles]
fnorm_volSurface magnitude/cell volume [nface, neles]
rhsbResidual (RHS) array [nvars, neles]
dub(Output) Difference array for update [nvars, neles]
tdiagTurbulent diagonal matrix array [ntvars, ntvars, neles]
tjmatOutward block operator include flux Jacobian at each cell face [ntvars, ntvars, nface, neles]

Lower sweep of Block LU-SGS.
This function is used for RANS equations. solution array is stored in dub array.

Note
The last argument array, tjmat is NOT identical with ns_serial_pre_blusgs function.
For more details, refer to the Block LU-SGS in the document.

Definition at line 212 of file blusgs.c.

Here is the call graph for this function:

◆ rans_serial_block_upper_sweep()

void rans_serial_block_upper_sweep ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_INT nei_ele,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT tdiag,
UCFD_FLOAT tjmat 
)

Upper sweep of Block LU-SGS method for RANS equations.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
nei_eleIndices for neighbor cells [nface, neles]
fnorm_volSurface magnitude/cell volume [nface, neles]
rhsbResidual (RHS) array [nvars, neles]
dub(Output) Difference array for update [nvars, neles]
tdiagTurbulent diagonal matrix array [ntvars, ntvars, neles]
tjmatOutward block operator include flux Jacobian at each cell face [ntvars, ntvars, nface, neles]

Upper sweep of Block LU-SGS.
This function is used for RANS equations. solution array is stored in dub array.

Note
The last argument array, tjmat is NOT identical with ns_serial_pre_blusgs function.
For more details, refer to the Block LU-SGS in the document.

Definition at line 331 of file blusgs.c.

Here is the call graph for this function:

◆ rans_serial_pre_blusgs()

void rans_serial_pre_blusgs ( UCFD_INT  neles,
UCFD_INT  nface,
UCFD_FLOAT  factor,
UCFD_FLOAT fnorm_vol,
UCFD_FLOAT uptsb,
UCFD_FLOAT dt,
UCFD_FLOAT tdiag,
UCFD_FLOAT tjmat,
UCFD_FLOAT dsrc 
)

Computes Diagonal matrix for Block LU-SGS method for RANS equations.

Parameters
nelesNumber of element cells
nfaceNumber of faces depends on element type
factorMultiplication factor for diffusive margin
fnorm_volSurface magnitude/cell volume [nface, neles]
uptsbCurrent solution array [nvars, neles]
dtTime step [neles]
tdiag(Output) Turbulent diagonal matrix array [ntvars, ntvars, neles]
tjmatInward block operator include flux Jacobian at each cell face [ntvars, ntvars, nface, neles]
dsrcSource term derivatives [nvars, neles]

This function computes diagonal matrices of the implicit operator of RANS equations. In Block LU-SGS method, implicit operator is approximated with block operator. Diagonal matrices is composed of block operator matrix, which size is n-by-n. n is the number of conservative variables in Navier-Stokes equations, or the number of turbulent variables in RANS equations.

Definition at line 90 of file blusgs.c.

Here is the call graph for this function: