[Box] variable switch at boundary
It seems that there is a bug in the variable switch for box at the boundary.
In the initPriVarSwitch_
method, the states of Dirichlet nodes are corrected.
This method is called in newtonBegin
, which however is called after the initialization
of uLastIter
.
Therefore, when calling the newtonUpdate
method, the corrected states of uCurrentIter
are overwritten.
We could fix this by either calling initPriVarSwitch_
before uLastIter
is initialized
or by setting this vector after newtonBeginStep
.
So we could simply change
if (numSteps_ > 0)
uLastIter = uCurrentIter;
to
if (numSteps_ >= 0)
uLastIter = uCurrentIter;
Edited by Martin Schneider