mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: do not resize jacobian unless necessary
setSize always reallocates
This commit is contained in:
@@ -252,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);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user