Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticSolidFoam / createHistory.H
blobc22d8b0bacd2bf37d70200e8e630789a77cb8712
1 OFstream * forceFilePtr(NULL);
2 OFstream * stressFilePtr(NULL);
3 word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
4 label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
5 if(historyPatchID == -1)
6   {
7     Warning << "history patch " << historyPatchName
8             << " not found. Force-displacement will not be written"
9             << endl;
10   }
11  else if(Pstream::master())
12   {
13     fileName historyDir = "history";
14     mkDir(historyDir);
16     {
17       fileName forceFileName(historyDir/"forceDisp_"+historyPatchName+".dat");
18       Info << "\nForce-displacement for patch " << historyPatchName
19            << " will be written to " << forceFileName
20            << endl;
21       forceFilePtr = new OFstream(forceFileName);
22       OFstream& forceDispFile = *forceFilePtr;
23       forceDispFile << "#Disp(mm)\tForce(N)" << endl;
24     }
26     {
27       fileName stressFileName(historyDir/"stressStrain_"+historyPatchName+".dat");
28       Info << "\nStress(Engineering Small Stress)-strain(Engineering Small Strain) for patch "
29            << historyPatchName
30            << " will be written to " << stressFileName
31            << endl;
32       stressFilePtr = new OFstream(stressFileName);
33       OFstream& stressStrainFile = *stressFilePtr;
34       stressStrainFile << "#Strain(-)\tStress(Pa)" << endl;
35     }
36   }