Replace tabs by 4 spaces in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticSolidFoam / writeHistory.H
blob1bd3449a25c397d7e6879255c976346ff97e42ce
1 //- write force displacement to file
2 if(historyPatchID != -1)
3   {
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        }
24    }