Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticIncrAcpSolidFoam / createHistory.H
blob2f9f88b8ce1a5d0a1d8c834d152047f4b283c4f2
1 OFstream * filePtr(NULL);
2 word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
3 label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
4 if(historyPatchID == -1)
6     Warning << "history patch " << historyPatchName
7         << " not found. Force-displacement will not be written"
8         << endl;
10 else if(Pstream::master())
12     Info << "Force-displacement for patch " << historyPatchName
13         << " will be written to forceDisp.dat"
14         << endl;
15     filePtr = new OFstream("forceDisp.dat");
16     OFstream& forceDispFile = *filePtr;
17     forceDispFile << "#Disp(mm)\tForce(N)" << endl;