opm-simulators
Loading...
Searching...
No Matches
prec.h
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include "bsr.h"
8
12typedef
13struct prec_t
14{
15 // lower triangular factor
16 bsr_matrix *L;
17 // diagonal factor
18 bsr_matrix *D;
19 // upper triangular factor
20 bsr_matrix *U;
21 // number of off-diagonal ilu0 updates
22 int noffsets;
23 // triplets uniquely identifying off-diagonal ilu0 updates
24 int(*offsets)[3];
25}
26prec_t;
27
33prec_t *prec_alloc();
34
40void prec_free(prec_t *P);
41
48void prec_init(prec_t *P, bsr_matrix const *A);
49
58int prec_analyze(bsr_matrix *M, int (*offsets)[3]);
59
66void prec_dilu_factorize(prec_t *P, bsr_matrix *A);
67
74void prec_ilu0_factorize(prec_t *P, bsr_matrix *A);
75
84void prec_mapply3c(prec_t *P, double *x);
85
94void prec_dapply3c(prec_t *P, double *x);
95
101void prec_downcast(prec_t *P);
102
108void prec_info(prec_t *P);
109
110#ifdef __cplusplus
111}
112#endif
Mixed-precision bsr matrix.
Definition bsr.h:12
Preconditioner struct.
Definition prec.h:14