mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-18 13:22:56 -06:00
Start encapsulating ifs_tpfa driving forces into a managing structure.
This commit is contained in:
parent
d1e8525c4d
commit
0d5431aaba
@ -105,7 +105,10 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
ifs_tpfa_assemble(gg, &trans_[0], &src[0], &gpress_omegaweighted_[0], h_);
|
||||
ifs_tpfa_forces F;
|
||||
F.src = &src[0];
|
||||
|
||||
ifs_tpfa_assemble(gg, &F, &trans_[0], &gpress_omegaweighted_[0], h_);
|
||||
|
||||
linsolver_.solve(h_->A, h_->b, h_->x);
|
||||
|
||||
|
@ -186,8 +186,8 @@ ifs_tpfa_construct(struct UnstructuredGrid *G)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
void
|
||||
ifs_tpfa_assemble(struct UnstructuredGrid *G,
|
||||
const struct ifs_tpfa_forces *F,
|
||||
const double *trans,
|
||||
const double *src,
|
||||
const double *gpress,
|
||||
struct ifs_tpfa_data *h)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -223,7 +223,9 @@ ifs_tpfa_assemble(struct UnstructuredGrid *G,
|
||||
}
|
||||
}
|
||||
|
||||
h->b[c] += src[c];
|
||||
if ((F != NULL) && (F->src != NULL)) {
|
||||
h->b[c] += F->src[c];
|
||||
}
|
||||
}
|
||||
|
||||
h->A->sa[0] *= 2;
|
||||
|
@ -38,13 +38,18 @@ struct ifs_tpfa_data {
|
||||
};
|
||||
|
||||
|
||||
struct ifs_tpfa_forces {
|
||||
const double *src;
|
||||
};
|
||||
|
||||
|
||||
struct ifs_tpfa_data *
|
||||
ifs_tpfa_construct(struct UnstructuredGrid *G);
|
||||
|
||||
void
|
||||
ifs_tpfa_assemble(struct UnstructuredGrid *G,
|
||||
const struct ifs_tpfa_forces *F,
|
||||
const double *trans,
|
||||
const double *src,
|
||||
const double *gpress,
|
||||
struct ifs_tpfa_data *h);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user