UCFD_SPARSE  v1.1
Documentation
Loading...
Searching...
No Matches
coloredblusgs.c File Reference

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

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

Go to the source code of this file.

Macros

#define nsmatdim   NFVARS*NFVARS
 
#define ransmatdim   NTURBVARS*NTURBVARS
 

Functions

void ns_parallel_pre_blusgs (UCFD_INT neles, UCFD_INT nface, UCFD_FLOAT factor, UCFD_FLOAT *fnorm_vol, UCFD_FLOAT *dt, UCFD_FLOAT *diag, UCFD_FLOAT *fjmat)
 
void rans_parallel_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)
 
void ns_parallel_block_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 *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *diag, UCFD_FLOAT *fjmat)
 
void rans_parallel_block_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 *rhsb, UCFD_FLOAT *dub, UCFD_FLOAT *tdiag, UCFD_FLOAT *tjmat)
 
void blusgs_parallel_ns_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *dub, UCFD_FLOAT *subres)
 
void blusgs_parallel_update (UCFD_INT neles, UCFD_FLOAT *uptsb, UCFD_FLOAT *dub, UCFD_FLOAT *subres)
 

Detailed Description

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

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

Block LU-SGS time integration method with Multi-coloring algorithm.
Multi-thread computation is enabled using <omp.h> header file.
In contrast to LU-SGS method, Block LU-SGS method uses block operator instead of spectral radius.

Note
In case of RANS equations, add rans_parallel_pre_blusgs function right after the ns_parallel_pre_blusgs function.
There is only block_sweep function instead of block_lower_sweep or block_upper_sweep in blusgs.c.
To execute properly, n0 and ne arguments must be input in appropriate order.
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 coloredblusgs.c.

Macro Definition Documentation

◆ nsmatdim

#define nsmatdim   NFVARS*NFVARS

Definition at line 31 of file coloredblusgs.c.

◆ ransmatdim

#define ransmatdim   NTURBVARS*NTURBVARS

Definition at line 32 of file coloredblusgs.c.

Function Documentation

◆ blusgs_parallel_ns_update()

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

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

Definition at line 272 of file coloredblusgs.c.

◆ blusgs_parallel_update()

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

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

Definition at line 293 of file coloredblusgs.c.

◆ ns_parallel_block_sweep()

void ns_parallel_block_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 rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT diag,
UCFD_FLOAT fjmat 
)

Lower/Upper sweep of Block LU-SGS with multi-coloring algorithm.
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 155 of file coloredblusgs.c.

Here is the call graph for this function:

◆ ns_parallel_pre_blusgs()

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

This function computes diagonal matrices of the implicit operator using multi-thread computing.
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.

Definition at line 40 of file coloredblusgs.c.

Here is the call graph for this function:

◆ rans_parallel_block_sweep()

void rans_parallel_block_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 rhsb,
UCFD_FLOAT dub,
UCFD_FLOAT tdiag,
UCFD_FLOAT tjmat 
)

Lower/Upper sweep of Block LU-SGS with multi-coloring algorithm.
This function is used for RANS equations. solution array is stored in dub array.

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

Definition at line 215 of file coloredblusgs.c.

Here is the call graph for this function:

◆ rans_parallel_pre_blusgs()

void rans_parallel_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 
)

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 turbulent variables in RANS equations.

Definition at line 91 of file coloredblusgs.c.

Here is the call graph for this function: