Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoAcpSolidFoam / writeHistory.H
blob4541eb4fef7c848f3c3d89651f6c1bf83eab1bc7
1 //- write force displacement to file
2 if(historyPatchID != -1)
4     Info << "Found patch "<<historyPatchName<<", writing y force and displacement 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     }