UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
blusgs.c File Reference

Block LU-SGS time integration method for unstructured grid. More...

#include <stdio.h>
#include "blusgs.h"
#include "flux.h"
#include "inverse.h"
Include dependency graph for blusgs.c:

Go to the source code of this file.

Functions

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

Detailed Description

Block LU-SGS time integration method for unstructured grid.

======================================================================================================================

Block LU-SGS time integration method (Single thread only).
In contrast to LU-SGS method, Block LU-SGS method uses block operator instead of spectral radius.
Computation process is same with LU-SGS.
For more information, refer to the lusgs.c.

Note
In case of RANS equations, add rans_serial_pre_blusgs function right after the ns_serial_pre_blusgs function.
Also, add rans_serial_{}_sweep function right after the ns_serial_{}_sweep function.
Be aware that ns and rans pre_blusgs/sweep functions must be paired with each sweep step.
Author
Date
Nov 2024
Version
1.0
Copyright
Copyright (c) 2024, Namhyoung Kim and Jin Seok Park, Inha University, All rights reserved.
License
This project is release under the terms of the MIT License (see LICENSE file).

Definition in file blusgs.c.

Function Documentation

◆ ns_serial_block_lower_sweep()

void ns_serial_block_lower_sweep ( int  neles,
int  nfvars,
int  nface,
int *  nei_ele,
int *  mapping,
int *  unmapping,
double *  fnorm_vol,
double *  rhsb,
double *  dub,
double *  diag,
double *  fjmat 
)

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

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 154 of file blusgs.c.

Here is the call graph for this function:

◆ ns_serial_block_upper_sweep()

void ns_serial_block_upper_sweep ( int  neles,
int  nfvars,
int  nface,
int *  nei_ele,
int *  mapping,
int *  unmapping,
double *  fnorm_vol,
double *  rhsb,
double *  dub,
double *  diag,
double *  fjmat 
)

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

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 278 of file blusgs.c.

Here is the call graph for this function:

◆ ns_serial_pre_blusgs()

void ns_serial_pre_blusgs ( int  neles,
int  nfvars,
int  nface,
double  factor,
double *  fnorm_vol,
double *  dt,
double *  diag,
double *  fjmat 
)

Computes Diagonal matrix for LU-SGS method.

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 ( int  neles,
int  nvars,
int  nfvars,
int  nface,
int *  nei_ele,
int *  mapping,
int *  unmapping,
double *  fnorm_vol,
double *  rhsb,
double *  dub,
double *  tdiag,
double *  tjmat 
)

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

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 215 of file blusgs.c.

Here is the call graph for this function:

◆ rans_serial_block_upper_sweep()

void rans_serial_block_upper_sweep ( int  neles,
int  nvars,
int  nfvars,
int  nface,
int *  nei_ele,
int *  mapping,
int *  unmapping,
double *  fnorm_vol,
double *  rhsb,
double *  dub,
double *  tdiag,
double *  tjmat 
)

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

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 339 of file blusgs.c.

Here is the call graph for this function:

◆ rans_serial_pre_blusgs()

void rans_serial_pre_blusgs ( int  neles,
int  nvars,
int  nfvars,
int  nface,
double  factor,
double  betast,
double *  fnorm_vol,
double *  uptsb,
double *  dt,
double *  tdiag,
double *  tjmat,
double *  dsrc 
)

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

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:

◆ serial_update()

void serial_update ( int  neles,
int  nvars,
double *  uptsb,
double *  dub,
double *  subres 
)

Updates solution array.

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

Definition at line 396 of file blusgs.c.

Here is the caller graph for this function: