Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticIncrAcpSolidFoam / calculateForceResidual.H
blobb4748027bf5b746c0e57cfaa85e34d7eb64e901a
2     // force residual is the net force on the model
3     // this should got to zero in a converged steady state model
4     // should be altered for parallel runs
5     vector netForce = vector::zero;
6     forAll(mesh.boundary(), patchi)
7     {
8         netForce += sum
9         (
10             mesh.Sf().boundaryField()[patchi]
11             &
12             (
13                 2*mu.boundaryField()[patchi]*symm(gradU.boundaryField()[patchi])
14               + lambda*tr(gradU.boundaryField()[patchi])*I
15             )
16         );
17     }
18     forceResidual = mag(netForce);