![]() |
AdH Kraken 0.0.0
Next generation Adaptive Hydraulics
|
#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... | |
This file has various functions needed for solving sparse systems in split CSR format
void apply_Dirichlet_BC | ( | SMODEL_SUPER * | sm | ) |
Small wrapper to initialize all structs pertaining to linear system.
[in,out] | sm | (SMODEL_SUPER*) - pointer to an instant of the SuperModel struct |
Function to modify linear system to enforce Dirichlet conditions
[in,out] | sm | (SMODEL_SUPER*) - pointer to an instant of the SuperModel struct |
void check_diag | ( | SMODEL_SUPER * | sm | ) |
Function to check for near zero entries and force dirichlet conditions there.
[in,out] | sm | (SMODEL_SUPER*) - pointer to an instant of the SuperModel struct |
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.
[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 |