AdH Kraken 0.0.0
Next generation Adaptive Hydraulics
Loading...
Searching...
No Matches
matrix_utilities.c File Reference
#include "adh.h"

Functions

void apply_Dirichlet_BC (SMODEL_SUPER *sm)
 Small wrapper to initialize all structs pertaining to linear system. More...
 
void check_diag (SMODEL_SUPER *sm)
 Function to check for near zero entries and force dirichlet conditions there. More...
 
void split_CSR_mat_vec_mult (double *Ax, int *indptr_diag, int *cols_diag, double *vals_diag, int *indptr_off_diag, int *cols_off_diag, double *vals_off_diag, double *x, int nrows, int *ghosts, int nghost)
 Performs mat/vec multiplication in split CSR format. More...
 

Detailed Description

This file has various functions needed for solving sparse systems in split CSR format

Function Documentation

◆ apply_Dirichlet_BC()

void apply_Dirichlet_BC ( SMODEL_SUPER sm)

Small wrapper to initialize all structs pertaining to linear system.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SuperModel struct
Note

Function to modify linear system to enforce Dirichlet conditions

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SuperModel struct
Note

◆ check_diag()

void check_diag ( SMODEL_SUPER sm)

Function to check for near zero entries and force dirichlet conditions there.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]sm(SMODEL_SUPER*) - pointer to an instant of the SuperModel struct
Note

◆ split_CSR_mat_vec_mult()

void split_CSR_mat_vec_mult ( double *  Ax,
int *  indptr_diag,
int *  cols_diag,
double *  vals_diag,
int *  indptr_off_diag,
int *  cols_off_diag,
double *  vals_off_diag,
double *  x,
int  nrows,
int *  ghosts,
int  nghost 
)

Performs mat/vec multiplication in split CSR format.

Author
Count Corey J. Trahan
Mark Loveland
Bug:
none
Warning
none
Parameters
[in,out]Ax(double*) - the matrix-vector product Ax
[in]indptr_diag(int*) - the first/last index of each row in CSR format (diagonal block wrt processor)
[in]cols_diag(int*) - local (to process) column locations of each nonzero in CSR format (diagonal block wrt processor)
[in]vals_diag(double*) - nonzero values in CSR matrix (diagonal block wrt processor)
[in]indptr_off_diag(int*) - the first/last index of each row in CSR format (off-diagonal block wrt processor)
[in]cols_off_diag(int*) - global column locations of each nonzero in CSR format (off-diagonal block wrt processor)
[in]vals_off_diag(double*) - nonzero values in CSR matrix (off-diagonal block wrt processor)
[in]x(double*) - the vector of the matrix-vector product
[in]nrows(int) - the number of rows on this process (same as # owned d.o.fs)
[in]ghosts(int*) - array of global dof numbers for ghost dofs
[in]nghost(int) - length of ghosts array
Note