mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #693 from akva2/micro_optims
Small micro optimizations
This commit is contained in:
commit
d57c47ff32
@ -181,7 +181,6 @@ public:
|
||||
|
||||
// resize the internal arrays of the linearizer
|
||||
resize_(elemCtx);
|
||||
reset_(elemCtx);
|
||||
|
||||
// compute the local residual and its Jacobian
|
||||
unsigned numPrimaryDof = elemCtx.numPrimaryDof(/*timeIdx=*/0);
|
||||
@ -253,7 +252,8 @@ protected:
|
||||
size_t numPrimaryDof = elemCtx.numPrimaryDof(/*timeIdx=*/0);
|
||||
|
||||
residual_.resize(numDof);
|
||||
jacobian_.setSize(numDof, numPrimaryDof);
|
||||
if (jacobian_.N() != numDof || jacobian_.M() != numPrimaryDof)
|
||||
jacobian_.setSize(numDof, numPrimaryDof);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user