Forward compatibility: flex
[foam-extend-3.2.git] / applications / solvers / solidMechanics / viscoElasticSolidFoam / calcResidual.H
blob83e32c4c0ad7bd2068b297004b41dbfaf57a4bc4
2     scalarField magDU = mag(DU.internalField());
4     forAll(magDU, cellI)
5     {
6         if (magDU[cellI] < SMALL)
7         {
8             magDU[cellI] = SMALL;
9         }
10     }
12     residual =
13         gMax
14         (
15             mag
16             (
17                 DU.internalField()
18               - DU.prevIter().internalField()
19             )
20            /magDU
21         );