mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Order operations in the same way as existing code.
This commit is contained in:
parent
9ff81d2a42
commit
ec944ff5e3
@ -405,7 +405,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void linearize_()
|
void linearize_()
|
||||||
{
|
{
|
||||||
const bool well_local = false;
|
const bool well_local = true;
|
||||||
resetSystem_();
|
resetSystem_();
|
||||||
unsigned numCells = model_().numTotalDof();
|
unsigned numCells = model_().numTotalDof();
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -448,14 +448,16 @@ private:
|
|||||||
Scalar storefac = volume / dt;
|
Scalar storefac = volume / dt;
|
||||||
adres = 0.0;
|
adres = 0.0;
|
||||||
LocalResidual::computeStorage(adres, intQuantsIn, 0);
|
LocalResidual::computeStorage(adres, intQuantsIn, 0);
|
||||||
adres *= storefac;
|
|
||||||
setResAndJacobi(res, bMat, adres);
|
setResAndJacobi(res, bMat, adres);
|
||||||
// TODO: check recycleFirst etc.
|
// TODO: check recycleFirst etc.
|
||||||
// first we use it as storage cache
|
// first we use it as storage cache
|
||||||
if (model_().newtonMethod().numIterations() == 0) {
|
if (model_().newtonMethod().numIterations() == 0) {
|
||||||
model_().updateCachedStorage(globI, /*timeIdx=*/1, res);
|
model_().updateCachedStorage(globI, /*timeIdx=*/1, res);
|
||||||
}
|
}
|
||||||
residual_[globI] -= model_().cachedStorage(globI, 1); //*storefac;
|
res -= model_().cachedStorage(globI, 1);
|
||||||
|
res *= storefac;
|
||||||
|
bMat *= storefac;
|
||||||
|
// residual_[globI] -= model_().cachedStorage(globI, 1); //*storefac;
|
||||||
residual_[globI] += res;
|
residual_[globI] += res;
|
||||||
jacobian_->addToBlock(globI, globI, bMat);
|
jacobian_->addToBlock(globI, globI, bMat);
|
||||||
// wells sources for now (should be moved out)
|
// wells sources for now (should be moved out)
|
||||||
|
Loading…
Reference in New Issue
Block a user