mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Follow file conventions in mult_csr_matrix().
This commit is contained in:
parent
323914eaba
commit
00b1ce27f0
@ -11,20 +11,26 @@
|
|||||||
#include <opm/core/pressure/tpfa/ifs_tpfa.h>
|
#include <opm/core/pressure/tpfa/ifs_tpfa.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
static void
|
static void
|
||||||
mult_csr_matrix(const struct CSRMatrix* A,
|
mult_csr_matrix(const struct CSRMatrix *A,
|
||||||
const double* u,
|
const double *u,
|
||||||
double* v)
|
double *v)
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
{
|
{
|
||||||
size_t i, j;
|
int j;
|
||||||
for (j = 0; j < A->m; ++j) {
|
size_t i;
|
||||||
v[j] = 0;
|
|
||||||
for (i = (size_t) (A->ia[j]); i < (size_t) (A->ia[j+1]); ++i) {
|
for (i = 0, j = 0; i < A->m; i++) {
|
||||||
v[j] += A->sa[i]*u[A->ja[i]];
|
v[i] = 0.0;
|
||||||
|
|
||||||
|
for (; j < A->ia[i + 1]; j++) {
|
||||||
|
v[i] += A->sa[j] * u[ A->ja[j] ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct ifs_tpfa_impl {
|
struct ifs_tpfa_impl {
|
||||||
double *fgrav; /* Accumulated grav contrib/face */
|
double *fgrav; /* Accumulated grav contrib/face */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user