Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinULSolidFoam / calculateRelativeResidual.H
blob45ccadbcdfcc559a721500997c8bf63eb7760e40
2     scalarField magDU = mag(DU.internalField());
4     forAll(magDU, cellI)
5     {
6         if (magDU[cellI] < SMALL)
7         {
8             magDU[cellI] = SMALL;
9         }
10     }
12     relativeResidual =
13         gMax
14         (
15             mag
16             (
17                 DU.internalField()
18               - DU.prevIter().internalField()
19             )
20            /magDU
21         );
23 //     resid = (DU - DU.prevIter())/mag(DU);