linear_system.h 776 Bytes
Newer Older
1
2
3
4
5
6
7
8
#ifndef LINEAR_SYSTEM_H
#define LINEAR_SYSTEM_H

#include "mesh.h"

typedef struct LinearSystemStruct LinearSystem;

typedef struct {
9
  char *tag;
10
11
12
13
  int field;
  double v;
}StrongBoundary;

14
LinearSystem *linear_system_new(Mesh *mesh, int n_fields, int n_boundaries, const StrongBoundary *boundaries);
15
16
17
18
19
20
void linear_system_add_to_matrix(LinearSystem *lsys, int el0, int el1, const double *local_matrix);
void linear_system_add_to_rhs(LinearSystem *lsys, int el0, const double *local_vector);
void linear_system_zero_matrix_and_rhs(LinearSystem *lsys);
void linear_system_solve(LinearSystem *lsys, double *solution);
void linear_system_free(LinearSystem *lsys);
double linear_system_get_rhs_norm(LinearSystem *lsys);
Matthieu Constant's avatar
Matthieu Constant committed
21

22
void initialize_linear_solver(int argc, char **argv);
23
24

#endif