Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticSolidFoam / writeHistory.H
blob42df413984ac584beee1ccddbe130ec27e8a3ef6
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 =
9         gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
11     vector disp = gAverage(U.boundaryField()[historyPatchID]);
13     //- write to file
14     if(Pstream::master())
15     {
16         OFstream& forceDispFile = *filePtr;
17         forceDispFile << disp.x() << " "
18             << disp.y() << " "
19             << disp.z() << " "
20             << force.x() << " "
21             << force.y() << " "
22             << force.z() << endl;
23     }