Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoSolidFoam / writeHistory.H
blob139b51f192a3447bbd50364f19c4e6a5b8d90c1a
1 //- write force displacement to file
2 if(historyPatchID != -1)
3   {
4     Info << "Writing disp and force of patch "<<historyPatchName<<" to file"
5           << endl;
7      //- for small strain or moving mesh
8     vector force = gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
10     vector avDisp = gAverage(U.boundaryField()[historyPatchID]);
12     //- write to file
13     if(Pstream::master())
14       {
15         OFstream& forceDispFile = *filePtr;
16         forceDispFile << avDisp.x() << " " << avDisp.y() << " " << avDisp.z() << " "
17                       << force.x() << " " << force.y() << " " << force.z() << endl;
18       }
19   }