Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticSolidFoam / writeHistory.H
blob4764098881316c28224f48972514f79ebf228781
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;
6      
7      //- for small strain or moving mesh
8      vector force =
9        gSum(mesh.boundary()[historyPatchID].Sf() & sigma.boundaryField()[historyPatchID]);
10      
11      vector disp = gAverage(U.boundaryField()[historyPatchID]);
12      
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    }