Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoSolidFoam / writeHistory.H
blobd51ca7e033af7fb32e11cc9c192b6342b756c813
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]);
9     
10     vector avDisp = gAverage(U.boundaryField()[historyPatchID]);
11      
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   }