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

Preconditioners for Krylov subspace methods. More...

#include "precon.h"
#include "inverse.h"
#include <stdlib.h>
#include <omp.h>
Include dependency graph for precon.c:

Go to the source code of this file.

Macros

#define blkdim   BLOCK*BLOCK
 

Functions

ucfd_status_t bilu_prepare (int bn, int *iw, int *row_ptr, int *col_ind, int *diag_ind, double *nnz_data)
 Block fill-in Incomplete LU preconditioner for BSR matrix format. More...
 
void bilu_psolve (int bn, int *row_ptr, int *col_ind, int *diag_ind, double *nnz_data, double *b)
 Solver function for BILU preconditioner. More...
 
ucfd_status_t lusgs_prepare (int bn, int *diag_ind, double *nnz_data)
 LU-SGS preconditioner for BSR matrix format. More...
 
void lusgs_psolve (int bn, int *row_ptr, int *col_ind, int *diag_ind, double *nnz_data, double *b)
 Solver function for LU-SGS preconditioner. More...
 
void none_psolve (int bn, int *row_ptr, int *col_ind, int *diag_ind, double *nnz_data, double *b)
 Unpreconditioned solver. More...
 

Detailed Description

Preconditioners for Krylov subspace methods.

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

Preconditioner plays a crucial role in Krylov subspace methods, improving convergence characteristics. There are two preconditioner types, BILU and LU-SGS.

(1) BILU (Block fill-in Incomplete LU) fill-in process is allowed in each block.

(2) LU-SGS (Lower-Upper Symmetric Gauss-Seidel) Preconditioning version of LU-SGS method, modified for BSR format.

Author
Date
April 2025
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 precon.c.

Macro Definition Documentation

◆ blkdim

#define blkdim   BLOCK*BLOCK

Definition at line 30 of file precon.c.

Function Documentation

◆ bilu_prepare()

ucfd_status_t bilu_prepare ( int  bn,
int *  iw,
int *  row_ptr,
int *  col_ind,
int *  diag_ind,
double *  nnz_data 
)

Block fill-in Incomplete LU preconditioner for BSR matrix format.

This function refactors non-zero values of BSR matrix applying block fill-in process.

Definition at line 35 of file precon.c.

Here is the call graph for this function:

◆ bilu_psolve()

void bilu_psolve ( int  bn,
int *  row_ptr,
int *  col_ind,
int *  diag_ind,
double *  nnz_data,
double *  b 
)

Solver function for BILU preconditioner.

This function applies preconditioner matrix into arbitrary input vector b. In other words, solve Px = b.

Definition at line 100 of file precon.c.

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

◆ lusgs_prepare()

ucfd_status_t lusgs_prepare ( int  bn,
int *  diag_ind,
double *  nnz_data 
)

LU-SGS preconditioner for BSR matrix format.

LU decomposition is applied in every diagonal matrix.

Definition at line 167 of file precon.c.

Here is the call graph for this function:

◆ lusgs_psolve()

void lusgs_psolve ( int  bn,
int *  row_ptr,
int *  col_ind,
int *  diag_ind,
double *  nnz_data,
double *  b 
)

Solver function for LU-SGS preconditioner.

This function applies preconditioner matrix into arbitrary input vector b. In other words, solve Px = b.

Definition at line 187 of file precon.c.

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

◆ none_psolve()

void none_psolve ( int  bn,
int *  row_ptr,
int *  col_ind,
int *  diag_ind,
double *  nnz_data,
double *  b 
)

Unpreconditioned solver.

Definition at line 255 of file precon.c.

Here is the caller graph for this function: