54 void apply_bcs (
pstruct *model);
56 void compute_error (
pstruct *model);
57 double compute_l2_error (
pstruct *model);
58 int converged (
double *a,
double *b,
double eps,
const int n,
double *diff);
62 void problem_initialize (
const int,
const double length,
pstruct *model);
63 void solve_gauss (
pstruct *model);
68 int cg(
int n,
double* A,
double* b,
double* x,
double* residual,
int* iterations);
void enforce_dirichlet_bc(const int row_id, const int col_id, const double value, pstruct *model)
Enforces a Dirichlet BC in the model system by nullifying all but the diagonal entry for the row corr...
Definition: laplacian_utils.c:84
double * rhs
Definition: laplacian.h:36
double * phi
Definition: laplacian.h:35
int npts
Definition: laplacian.h:40
void init_masa(pstruct *model)
Initializes MASA library and applies right-hand side forcing function at all solution points...
Definition: laplacian_utils.c:40
void print_matrix(pstruct *model)
Prints model system matrix and right-hand side vector to stdout.
Definition: laplacian_utils.c:108
double h
Definition: laplacian.h:38
void assemble_matrix(const int fd_method, pstruct *model)
Assembles system matrix entries using a finite-difference approximation. The fd_method parameter cont...
Definition: laplacian_utils.c:141
double ** A
Definition: laplacian.h:37
int n
Definition: laplacian.h:39
int pad
Definition: laplacian.h:41
Definition: laplacian.h:34